@qubitor/sdk
v0.2.0
Published
Official Qubitor SDK for QBT balances, PQ-native accounts, Qubitor RPC, and wallet integration.
Readme
@qubitor/sdk
Official TypeScript SDK for Qubitor developers.
The SDK exposes Qubitor network metadata, standard JSON-RPC helpers, QBT balance reads, Qubitor account status reads, wallet-grade PQ account actions, indexer reads, faucet deployment helpers, PQ-native transaction helpers, and PQ-native message proofs. It intentionally does not include wallet vault storage, passcodes, private key sync, server env files, faucet seeds, relayer secrets, or testnet launch artifacts.
The default testnet client uses https://testrpc.qubitor.org/rpc. The chain
metadata also includes https://testrpc2.qubitor.org/rpc as the secondary
public endpoint.
import {
createQubitorClient,
createPQAccount,
getQbtBalance,
sendPQTransaction,
} from "@qubitor/sdk";
const client = createQubitorClient({ networkName: "testnet" });
const account = createPQAccount();
const balance = await getQbtBalance(client, account.address);
const txHash = await sendPQTransaction(client, {
nonce: await client.getTransactionCount(account.address),
gasTipCap: 1_000_000_000n,
gasFeeCap: 2_000_000_000n,
gas: 21_000n,
to: "0x000000000000000000000000000000000000dEaD",
value: 1_000_000_000_000_000_000n,
pqPublicKey: account.publicKey,
pqPrivateKey: account.privateKey,
});
console.log(balance, txHash);Wallet-grade helpers
@qubitor/[email protected] also exposes the high-level primitives used by Quanta
Wallet, bridge UIs, explorers, and third-party dapps:
readQubitorAccountSnapshot(address, config)reads live QBT balance, latest block, deployment state, readiness, and security mode from Qubitor RPC.readQubitorAccountActivity(address, config)and proof helpers read Explorer Lite indexer data fromhttps://testexplorer.qubitor.org/api/indexer.requestQubitorFaucet(address, config, { publicKey, salt, deployAccount })requests public testnet QBT and can deploy the Qubitor Account through faucet support.readQubitorPQTransferAuthorization,sendQubitorPQTransfer,readQubitorPQRotateAuthorization, androtateQubitorPQKeyimplement the Qubitor Account execute/rotation path with nativeQubitorPQTxV1submission.submitQubitorPQRawTransactionprefersqubitor_sendRawPQTransactionon public testnet and supports/pq-dev/send-rawas an explicit/fallback submitter.readQubitorPQFeeCapsuses live gas price and applies bounded retry bumps for underpriced replacement errors.signQubitorMessage,signQubitorTypedData, andverifyQubitorMessageProofproduce and verify ML-DSA-65 proofs instead of legacy EOA signatures.verifyQubitorNetwork(config)checks RPC reachability, chain ID, explorer, indexer, and canonical system contract configuration.
Default application flows should use Qubitor PQ accounts. Legacy EOA compatibility should be labeled clearly by wallets and apps.
