API reference
TypeScript (@qorechain/sdk)
The TypeScript packages ship full TSDoc on their public surface, and a
TypeDoc configuration is wired into the core package. To
generate the HTML API reference for @qorechain/sdk:
# from the monorepo root
pnpm --filter @qorechain/sdk docs:api
This runs the docs:api script (typedoc) defined in packages/ts, producing
the API site under that package's docs/ output directory. The generated output
is not committed — run the command locally or wire it into your own docs
pipeline.
The documentation site's own TypeDoc config lives at docs/typedoc.json; it
points at the core package's entry point so you can regenerate from the docs
project as well.
Public surface at a glance
The deliberate, supported exports of @qorechain/sdk:
- Client:
createClient, typesQoreChainClient,CreateClientOptions,ConnectTxOptions,ClientFees. - Networks: presets, lookup/list helpers, and config types (networks module).
- Utilities:
toBase/fromBase(denom), address encoding/validation. - Accounts:
generateMnemonic,validateMnemonic,deriveNativeAccount,deriveEvmAccount,deriveSvmAccount; account types. - Unified accounts (0.6.0):
deriveUnifiedAccount,unifiedAccountFromSeed(0.13.0: needs aQRC1recovery code or an independent 32-byte PQC secret),addressesFrom20,qoreAddresses, and theQRC1recovery-code helpersgeneratePqcRecoveryCode,isValidRecoveryCode,normalizeRecoveryCode,pqcKeyFromRecoveryCode,pqcRecoveryCodeFromSecret. (unifiedAccountFromPhantomSignatureandconnectPhantomUnifiedwere removed in 0.8.0 and throw.) - PQC:
generatePqcKeypair,pqcSign,pqcVerify, length constants, algorithm IDs/helpers,PqcSigner,HybridSigner,buildHybridSignatureExtension,HYBRID_SIG_TYPE_URL. - PQC key lifecycle (0.9.0):
ensurePqcRegistered(reads the status over REST,PqcKeyMismatchError),fetchPqcStatus,isRegisteredPqcKey,buildRegisterPqcKeyMsg,signProofOfPossession/verifyProofOfPossession(PROOF_OF_POSSESSION_DOMAIN),validateRegisteredPqcKey,isDegeneratePqcPublicKey,migrateToHybrid,migratePqcKeyHybrid,isUpgradeApplied/requireUpgradeApplied(CHAIN_UPGRADE_V3_2_2,CHAIN_UPGRADE_V3_2_3,CHAIN_UPGRADE_V3_2_4). - Read clients:
RestClient(incl.getPermissionSchema),JsonRpcClient,QorClient, HTTP helpers (getJson,postJsonRpc,buildUrl,joinUrl,QoreHttpError); typed query clients for every module, includingamm,license,abstractaccount(permissionSchema), and themultilayerAnchor/Anchorsstate-anchor queries. On the public endpoints some typed REST helpers call routes the gateway does not serve:getAiStats,getFeeEstimate,getXqorePosition,getInflationRateandgetReputation.getBurnStats,getAllBalances,getBridgeChains,getPermissionSchemaand (since 0.9.0, which fixed its pluralaccountspath to the served singular/qorechain/pqc/v1/account/{address})getPqcAccountwork. - Cross-VM:
getCrossVmMessage,getPendingCrossVmMessages,getCrossVmParams. - QoreChain Native:
createCosmWasmClient,connectCosmWasmSigner,queryContractSmart,getContractInfo,instantiate,execute,uploadCode. - Transactions:
estimateFee,directSignerFromPrivateKey,TxClient(hybrid when connected withpqcKeypair, 0.9.0;HYBRID_VERIFY_GAS),MSG_SEND_TYPE_URL, hybrid helpers (encodeHybridExtension,attachHybridExtension,buildHybridTx,signAndBroadcastHybrid); structured error decoding viadecodeTxError(incl.abstractaccountcodes 5/6/10/11 andpqccode 21; since 0.10.0 it also names a refusal that arrives as text during fee simulation). - eth-native signing (0.6.0):
signClassicalEth,signHybridEth(secp256k1 overkeccak256(SignDoc), pubkey type/cosmos.evm.crypto.v1.ethsecp256k1.PubKey, plus the ML-DSA-87 hybrid extension),EthNativeSigner,accountAuthInfo. - Authenticator lanes (0.7.0): message composers
msg.abstractaccount.registerAuthenticator/revokeAuthenticator/executeEvm/executeCosmosandmsg.pqcrotation (also exported standalone asexecuteEvmMsg,executeCosmosMsg,registerEthAuthenticatorMsg,revokeAuthenticatorMsg,rotatePqcKeyMsg); byte-exact sign-bytesevmAuthSignBytes,cosmosAuthSignBytes,rotationSignBytes; wallet buildersbuildPhantomExecuteEvm/buildPhantomExecuteCosmos(ed25519signMessage) andbuildMetaMaskExecuteEvm/buildMetaMaskExecuteCosmos(EIP-191personal_sign); key rotationrotatePqcKeyMsgFromMnemonic,derivePqcLegacy. See the Authenticators guide (the module behind these lanes is switched off on mainnet and enabled on the testnet). - Hybrid sign-bytes (0.8.0+): the
signBytesVersionoption ("auto" | "v1" | "v2") onbuildHybridTx,signAndBroadcastHybrid,signHybridEthandEthNativeSigner;resolveSignBytesVersion,SIGN_BYTES_V2_UPGRADES,isHybridSignBytesRejection,hybridSignBytesV1/hybridSignBytesV2,migrationSignBytes,bridgeAttestationSignBytes. - EVM authorization window (0.8.2+):
openEvmWindowMsg(nativeOnlyandallowedTargetsfrom 0.9.0),closeEvmWindowMsg,fetchEvmWindow,classifyEvmWindowRejection,isEvmWindowRejection,MAX_EVM_WINDOW_BLOCKS,MAX_EVM_WINDOW_TXS,MAX_EVM_WINDOW_TARGETS. See EVM authorization window. - EIP-7702 consent (0.9.0):
authorizeEvmDelegationMsg,clearEvmDelegationMsg,fetchEvmDelegationConsent,evmDelegationTupleNonce,classifyEvmDelegationRejection,EVM_DELEGATION_CLEAR,MAX_EVM_DELEGATION_CONSENT_BLOCKS. - Abstract-account digest v2 (0.9.0):
evmAuthSignBytesV2,resolveEvmAuthDigestVersion;validateSpendingRules. - Chain v3.2.4 (0.10.0): staking tiers (
msg.stakingtier.lockDelegation/unlockEarly/claimBonus/updateParams,validateLockDelegation,STAKING_LOCK_MONTHS,fetchStakingTierParams,fetchStakingLocks,fetchStakingTierPool);fetchAuthNonce;fetchProtocolFeatures/isProtocolFeatureEnabled;possessionProvenon the PQC status;ibcTimeoutTimestamp;CHAIN_UPGRADE_V3_2_4. See What 0.10.0 added. - Chain v3.2.5 (0.12.0): the ML-KEM-1024 key registry (
msg.pqc.registerKemKey/removeKemKey,validateKemPublicKey,fetchKemKey,parseKemKey,KEM_ALGORITHM_ML_KEM_1024,ML_KEM_1024_PUBLIC_KEY_SIZE); exact gas for hybrid transactions (exactHybridGas,EXACT_GAS_MULTIPLIER,EXACT_GAS_HEADROOM,TxClient.estimateGasDetails); abstract-account reads (fetchSpendingRules,fetchAuthenticators) andmsg.abstractaccount.updateConfig; checked governance parameter builders (validateCrossVmUpdateParams,validateRdkUpdateParams);CHAIN_UPGRADE_V3_2_5; thelocalnetpreset. See What 0.12.0 adds. - Canonical PQC derivation (0.8.3+):
derivePqcCanonical(account, mnemonic),canonicalAccount(account); the PQC registration message isbuildRegisterPqcKeyMsg(used byensurePqcRegistered).derivePqcLegacyis deprecated for new keys.
@qorechain/evm
createEvmClient, evmAccountFromPrivateKey, the erc20 helpers, contract
wrappers (deployContract, readContract, writeContract), the precompiles
bindings, the precompile-backed helpers simulateWithRiskScore, aiRiskScore and
aiAnomalyCheck, PRECOMPILE_ADDRESSES, and the ABIs (ERC20_ABI,
IQORE_PQC_ABI, IQORE_AI_ABI, IQORE_CONSENSUS_ABI). The precompile-backed
bindings and helpers are not active on the public networks (see
EVM Precompiles).
@qorechain/svm
createSvmClient, DEFAULT_SVM_RPC_URL, svmKeypairFromSecretKey,
svmAddress, the program builders (createMemoInstruction,
createTransferTokenInstruction, createAssociatedTokenAccountInstruction,
getAssociatedTokenAddress, createInvokeInstruction), and the program-id
constants.
Other languages
| Language | Generated docs | Install |
|---|---|---|
| Python | PyPI — docstrings on the public API | pip install qorechain-sdk at 0.14.0 (import qorsdk) |
| Go | pkg.go.dev (godoc) | go get github.com/qorechain/qorechain-sdk/packages/go/...@v0.14.0 (tag packages/go/v0.14.0) |
| Rust | docs.rs (rustdoc) | cargo add qorechain-sdk (0.14.0; import qorechain) |
| Java | Maven Central javadoc | io.github.qorechain:qorechain-sdk:0.14.0 |
Each package mirrors the same surface (network presets, denom/address
utilities, HD derivation — including unified eth-native accounts — PQC
primitives and hybrid signing, typed messages and queries, the authenticator
lanes, and REST + qor_ JSON-RPC read clients), documented inline in the
source so the language-native doc tooling renders it. The TypeScript wallet
builders (buildPhantom* / buildMetaMask*) and the browser-wallet adapters
are TypeScript-only.