Skip to main content

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, types QoreChainClient, 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 a QRC1 recovery code or an independent 32-byte PQC secret), addressesFrom20, qoreAddresses, and the QRC1 recovery-code helpers generatePqcRecoveryCode, isValidRecoveryCode, normalizeRecoveryCode, pqcKeyFromRecoveryCode, pqcRecoveryCodeFromSecret. (unifiedAccountFromPhantomSignature and connectPhantomUnified were 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, including amm, license, abstractaccount (permissionSchema), and the multilayer Anchor/Anchors state-anchor queries. On the public endpoints some typed REST helpers call routes the gateway does not serve: getAiStats, getFeeEstimate, getXqorePosition, getInflationRate and getReputation. getBurnStats, getAllBalances, getBridgeChains, getPermissionSchema and (since 0.9.0, which fixed its plural accounts path to the served singular /qorechain/pqc/v1/account/{address}) getPqcAccount work.
  • Cross-VM: getCrossVmMessage, getPendingCrossVmMessages, getCrossVmParams.
  • QoreChain Native: createCosmWasmClient, connectCosmWasmSigner, queryContractSmart, getContractInfo, instantiate, execute, uploadCode.
  • Transactions: estimateFee, directSignerFromPrivateKey, TxClient (hybrid when connected with pqcKeypair, 0.9.0; HYBRID_VERIFY_GAS), MSG_SEND_TYPE_URL, hybrid helpers (encodeHybridExtension, attachHybridExtension, buildHybridTx, signAndBroadcastHybrid); structured error decoding via decodeTxError (incl. abstractaccount codes 5/6/10/11 and pqc code 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 over keccak256(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 / executeCosmos and msg.pqc rotation (also exported standalone as executeEvmMsg, executeCosmosMsg, registerEthAuthenticatorMsg, revokeAuthenticatorMsg, rotatePqcKeyMsg); byte-exact sign-bytes evmAuthSignBytes, cosmosAuthSignBytes, rotationSignBytes; wallet builders buildPhantomExecuteEvm / buildPhantomExecuteCosmos (ed25519 signMessage) and buildMetaMaskExecuteEvm / buildMetaMaskExecuteCosmos (EIP-191 personal_sign); key rotation rotatePqcKeyMsgFromMnemonic, 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 signBytesVersion option ("auto" | "v1" | "v2") on buildHybridTx, signAndBroadcastHybrid, signHybridEth and EthNativeSigner; resolveSignBytesVersion, SIGN_BYTES_V2_UPGRADES, isHybridSignBytesRejection, hybridSignBytesV1 / hybridSignBytesV2, migrationSignBytes, bridgeAttestationSignBytes.
  • EVM authorization window (0.8.2+): openEvmWindowMsg (nativeOnly and allowedTargets from 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; possessionProven on 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) and msg.abstractaccount.updateConfig; checked governance parameter builders (validateCrossVmUpdateParams, validateRdkUpdateParams); CHAIN_UPGRADE_V3_2_5; the localnet preset. See What 0.12.0 adds.
  • Canonical PQC derivation (0.8.3+): derivePqcCanonical(account, mnemonic), canonicalAccount(account); the PQC registration message is buildRegisterPqcKeyMsg (used by ensurePqcRegistered). derivePqcLegacy is 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​

LanguageGenerated docsInstall
PythonPyPI — docstrings on the public APIpip install qorechain-sdk at 0.14.0 (import qorsdk)
Gopkg.go.dev (godoc)go get github.com/qorechain/qorechain-sdk/packages/go/...@v0.14.0 (tag packages/go/v0.14.0)
Rustdocs.rs (rustdoc)cargo add qorechain-sdk (0.14.0; import qorechain)
JavaMaven Central javadocio.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.