Skip to main content

@orbinum/protocol

@orbinum/protocol is the public TypeScript package for Orbinum: chain access, address handling, encoding, payment slips and proofs, disclosure keys, private staking reads and the precompile bindings. It runs in browsers, Node, React Native and edge workers. This page is its reference, together with the two packages that generate proofs. To install it and make a first read, see Get Started.


Packages​

PackageLicenseWhat it is
@orbinum/protocolMITChain client, encodings, payment slips and proofs, disclosure keys, Merkle geometry, runtime event fields
@orbinum/proof-generatorGPL-3.0-or-laterThe Groth16 prover and its artifact loaders
@orbinum/circuitsGPL-3.0-or-laterProving and verifying artifacts for the three circuits

@orbinum/protocol is published as ESM and CJS with type definitions. Its peer dependencies, polkadot-api and @polkadot/util-crypto, must be installed for any import:

npm install @orbinum/protocol polkadot-api @polkadot/util-crypto

Entry points​

ImportWhat it holds
@orbinum/protocolEverything on this page unless a row says otherwise
@orbinum/protocol/browserBrowser wallet extensions: hasInjectedExtensions, getInjectedExtensions, connectInjectedExtension, getSubstrateSignerFromExtension and the types SignPayload, SignRaw. Kept out of the root so a Node host never loads polkadot-api/pjs-signer; off-page every function reports no extension instead of throwing
@orbinum/protocol/internalCurve and memo primitives Orbinum's wallet builds on (fastMulBase, fastMulPoint, secretMulPoint, isInPrimeSubgroup, MemoFormat, bytesToBjjScalar). No compatibility promise across minor versions; a dApp or backend never needs it

The browser helpers are not exported from the root: an import of connectInjectedExtension from @orbinum/protocol fails to compile.

The memo format the pool enforces: MEMO_FORMAT_OFFSET, MEMO_FORMAT_TAGGED, MEMO_FORMAT_HANDSHAKE, MEMO_TAG_OFFSET, MEMO_TAG_SIZE and memoFormatOf(memo), the format a full 180-byte memo declares or null. See The memo format and its tags.

Orbinum's wallet takes every formula it shares with a verifier from @orbinum/protocol (noteCommitment, stealthOwnerPk, memoViewTag, encodePrivacyAddress, decodePrivacyAddress and the sender claims), so a wallet and a verifier compute them from one definition.

@orbinum/proof-generator depends on one exact @orbinum/circuits release, and pins the SHA-256 of the prover's WebAssembly binary and of every circuit artifact at build time. A browser checks each download against those pins, so a CDN or a mirror cannot serve a different proving key.


The custody boundary​

The public packages hold no keys. Anything that needs a user's spending key or viewing key runs in the user's wallet. The public package opens a note only to verify a payment: with the payer's proof and a public address, or with a viewing key a backend was given on purpose.

The public packagesThe wallet
Read chain state, pool state and eventsDerives the user's keys from a signature
Compute a note commitment from its four fieldsChooses a note's owner key and blinding
Generate a shield proofSeals the 180-byte encrypted memo of a note
Submit a shield (signed) and submit a spend whose proof is already builtBuilds the witness and the proof of a transfer or unshield
Seal a payment slip toward a recipient's viewing keyOpens memos, finds its notes, decides which notes to spend
Create and verify disclosure keys from a note's preimageDerives the one-time keys of notes the chain mints
Verify a payment proof with the recipient's public address, or a slip with a viewing keyBuilds the bound spends that enter and exit a private pool
Read private pools and price their sharesKeeps the vault: notes, channels and key counters, encrypted

A dApp, a backend or an auditor needs only the left column; a private payment, a spend or a private stake is something it asks the user to make in their wallet. @orbinum/protocol encodes and decodes orbpriv3: privacy addresses (encodePrivacyAddress, decodePrivacyAddress, decodePaymentAddress).

What the wallet does on the right is specified, not hidden, so anyone can check what it publishes:

TopicWhere
The keys and what each one can doKeys & Identity
A note, its commitment and nullifier, the memo envelopeNotes
How the wallet finds its notes: memo format and tags, channels, scanning, the compact restoreNote Discovery
What a spend must satisfySpend Validity
What the vault holds and how it is protected, from the user's sidePrivate Vault
What is visible, and to whomPrivacy Architecture

Connecting​

OrbinumClient.connect(config) opens one connection and hangs every module from it.

import { OrbinumClient } from '@orbinum/protocol';

const client = await OrbinumClient.connect({
substrateWs: 'wss://rpc.testnet.orbinum.io',
evmRpc: 'https://rpc.testnet.orbinum.io',
});

const stats = await client.privacy.getPoolStats();
console.log(stats.commitmentCount, 'leaves');

client.destroy();
FieldMeaning
substrateWsWebSocket URL of a node. The client opens the connection and destroy() closes it
connectTimeoutMsHandshake timeout with substrateWs. Default 15_000
metadataCacheWith substrateWs only: a MetadataCache (get(codeHash), set(codeHash, metadata)) that keeps the runtime metadata, hundreds of KB, between connections. It is downloaded again only when the runtime's code hash changes; a failing cache reads as a miss and never fails the connection. Entries are scoped to the endpoint
papiAn already-connected polkadot-api client, used instead of substrateWs. destroy() leaves it running
substrateHttpWith papi only: an HTTP endpoint for substrate.batchRequest
evmRpcEVM JSON-RPC URL. Without it evm, evmExplorer and precompiles are null
evmRpcPeerA second EVM endpoint, used only to tell a pending EVM transaction from one stranded on evmRpc

connect throws when the node does not answer within the timeout, or when it runs a runtime older than MIN_SPEC_VERSION, whose calls the package does not encode: Unsupported runtime: spec N, this SDK needs spec M or later. Endpoints and chain constants are in Network & Tooling.

Long-lived applications​

OrbinumClient has no heartbeat and no reconnection: a dropped connection shows up only as failing requests. OrbinumClientProvider wraps one with both.

import { OrbinumClientProvider } from '@orbinum/protocol';

const provider = new OrbinumClientProvider({ substrateWs: 'wss://rpc.testnet.orbinum.io' });
const unsubscribe = provider.onStatusChange(({ status, error }) => console.log(status, error ?? ''));
provider.connect();

const client = await provider.getOrbinumClient();
BehaviourValue
Statusidle, connecting, connected, disconnected, reconnecting
Heartbeatsystem_health every 5 s (heartbeatIntervalMs), 4 s timeout (heartbeatTimeoutMs)
TeardownAfter 2 consecutive failed probes, or 6 while a transaction awaits finalization
ReconnectExponential backoff from 3 s to 30 s with jitter (reconnectBaseMs, reconnectMaxMs); the backoff resets after 10 s of stable connection (stableAfterMs)
HandshakeconnectTimeoutMs, default 8_000
MetadatametadataCache, as for connect

getOrbinumClient() returns the live client or the attempt in flight, and throws in any other state. tryGetOrbinumClient() returns null instead. reset() returns to idle.


Client modules​

ModuleCoversWithout evmRpc
client.substrateThe shared transport: request, batchRequest, getBlockHash, getBlock, queryBlockEvents, and polkadotClient for raw polkadot-api accessAvailable
client.shieldedPoolThe pool's extrinsics (boundSpend included), plus minSpendFee(), pendingFees(account, assetId), isKnownRoot(root, { minBlocksLeft }), treeSize() (leaves over every tree), leaf(index) (the commitment at a leaf, or null) and taggedMemosFromLeaf() (the first leaf under the memo-format rule, or null while none is recorded; a value that is not a u32 throws)Available
client.privacyThe privacy_* RPC: roots, Merkle proofs, subtree roots, nullifier status, pool statistics; getFinalizedLeafIndex(commitmentHex) reads a commitment's leaf at the finalized headAvailable
client.balancesaccount(address): free, reserved, frozen and nonce at the best block; transferKeepAlive(dest, value, signer)Available
client.stakingStaking reads (account, config, admission, exposure, pendingPayouts, autoPayout…) and calls (bond, nominate, validate, payoutStakersByPage…). See StakingAvailable
client.poolsNomination pools: reads, member calls and the roles' calls, including createWithPoolId, updateRoles(id, roles, signer) and setMetadata(id, profile, signer)Available
client.privateStakingPrivate pools: pool, pools, poolOfAsset, minEntry, quote, exitUnbondingEras, memberAddress, entryRefusal, exitRefusal, and the root's setPrivate. See Private Staking with the SDKAvailable
client.chainisValidator(ss58), through chain_isValidatorAvailable
client.zkVerifiergetAllCircuitVersions(), getCircuitVersionInfo(circuitId): active and accepted versions and their VK hashes. verificationStats(circuitId, version) and allVerificationStats(): how many proofs each key checked. proofSystem(circuitId, version): the system a key is for (Groth16)Available
client.ismpRead-only ISMP queries: latestHeight, challengePeriod, requests, responses, events, childTrieProof, channelHeightAvailable
client.evmEVM JSON-RPC: balances, calls, gas, receipts, sendRawTransactionnull
client.evmExplorerBlocks, transactions, address and token-transfer queries over EVM RPCnull
client.precompilesshieldedPool (shield, estimateShieldGas) and crypto (ECRecover, SHA-256, RIPEMD-160, identity, Curve25519)null

How to read pool state with these modules is in Reading Pool State.

Shielded-pool calls​

MethodOriginArguments
shield(params, signer)Signed: the signer is the public depositorShieldParams
shieldBatch({ items }, signer)SignedUp to 20 ShieldParams
claimFees({ assetId, amount }, signer)Signed by the validator accountPays its pending spend fees to it. See Spend Fees
privateTransfer(params)UnsignedTwo nullifiers, two outputs, merkleRoots, fee, proof
unshield(params)UnsignedNullifier, root, amount, recipient, fee, optional change, proof
boundSpend(params)UnsignedBoundSpendParams: an unshield's arguments without recipientAddress, plus the action the proof commits to. See ZK-NPoS: Private Staking

ShieldParams is { assetId, amount, commitment, encryptedMemo, proof, circuitVersion }: amount in planck as a bigint, commitment as 32-byte little-endian hex, encryptedMemo as 180 bytes, proof as the 128-byte compressed proof. The signer is a SubstrateSigner — see Signers.

The three spends take no signer: the chain accepts them only unsigned, and the proof authorises them. Every signing path in the package refuses a spend, including one nested in a utility.batch or sudo, and assertNotSignedSpend(tx) runs the same check for a host with its own signing path. Every check a spend must pass is in Spend Validity. From an EVM wallet, client.precompiles.shieldedPool.shield(params, signer) sends the same deposit through the precompile, where signer is (tx: { to, data, value?, gasPrice? }) => Promise<txHash>; see ShieldedPool precompile.

Signers​

Signed calls take a SubstrateSigner. Which constructor builds it depends on the account's key type:

ExportEntry pointBuilds the signer of
getSubstrateSignerrootAn sr25519 or ECDSA keypair held by the host
getEcdsaTextSigner(evmAddress, sign)rootAn EVM account: sign is the wallet's personal_sign (EIP-191) over the transaction's readable text
getEd25519TextSigner(address, sign)rootAn ed25519 account: a local keypair, a Solana wallet's signMessage, or an extension's signRaw
getSubstrateSignerFromExtension/browserAn sr25519 or ECDSA account of a browser wallet extension
connectInjectedExtension(name, origin?)/browserConnects an extension. Its ed25519 accounts already carry a getEd25519TextSigner signer as txCreator; other accounts are unchanged

The runtime accepts an ed25519 signature only over the readable text of the transaction, never over the raw signing payload. getEd25519TextSigner renders that text, naming calls from the transaction's own metadata, and passes it to sign. It then verifies the signature locally and tags it by what the key signed:

Signed formTypical sourceTag
The bare textA keypair, Solana signMessage0x03 (Ed25519Text)
The text wrapped in <Bytes>An extension's signRaw0x04 (Ed25519WrappedText)

A signature by another key or over other bytes throws Ed25519TextSignatureError, and nothing is sent. The text format and the signature variants are in EVM ↔ Substrate Mapping.


Transaction results and errors​

Every extrinsic method resolves on finalization with a TxResult:

type TxResult = {
txHash: string;
blockHash: string;
blockNumber: number;
ok: boolean; // false when the extrinsic was included but its dispatch failed
error?: string; // e.g. 'Module(ShieldedPool.InsufficientPendingFees)', only when ok is false
fee?: string; // planck, decimal: the inclusion's TransactionFeePaid. Absent for an unsigned spend
};

ok describes the dispatch, not the submission. An included extrinsic that the pallet rejected resolves with a real txHash and ok: false; it does not throw. The method throws when the transaction never reaches a block: the node refuses it at admission, the signer declines, or the connection fails.

Every call takes an optional last argument, SubmitOptions. onSigned(txHash) is called once the transaction is signed, before anything can drop it, so a host can record the hash it will look for after a lost connection; onBroadcast() fires when the node accepts it; resolveAt: 'best' resolves at best-block inclusion instead of finalization.

Refusals before signing​

A call the chain would refuse, and still charge a fee for, is refused before signing: a minimum not met, a role the signer lacks, a pool that is not open. The method throws a ProtocolRefusal:

import { protocolRefusal } from '@orbinum/protocol';

try {
await client.privateStaking.setPrivate(poolId, true, signer);
} catch (error) {
const refusal = protocolRefusal(error); // ProtocolRefusal | null
if (!refusal) throw error;
console.log(refusal.call, refusal.reason, refusal.detail); // 'setPrivate', 'NotRoot', { poolId }
}
FieldContents
callThe SDK call refused: bond, nominate, setCommission, setPrivate…
reasonA RefusalReason, named as the chain's error: BelowMinimumBond, NotRoot, PoolNotOpen, NotPrivate…
detailThe numbers behind it: minimum, targets, bound, left, role, field, poolId

protocolRefusal(error) also recognises a refusal thrown by a second copy of the package, which an instanceof check would miss. Malformed arguments are not refusals: they throw a plain Error.

Classifying errors​

HelperUse
classifyChainError(raw)Maps a raw error or TxResult.error to a PalletErrorKind: already-spent, ghost-note, stale-proof, amount, asset, shape, proof, capacity, balance, unknown
extractPalletError(raw)The pallet error name inside a raw error, or null
parseModuleError(raw){ pallet, error } from a Module(Pallet.Error) string, or null
dispatchErrorPath(value)The Pallet.Error path of a decoded dispatch error, or null
classifyTxError(raw)A failure outside the pallets, as a TxErrorKind: dropped, pending, outdated, cannot-pay-fees, bad-signature, disconnected
extractPoolRejection(raw), poolRejectionKind(raw)The admission code of a refused unsigned spend (Custom error: N) and its kind. Codes are in Spend Validity
isServerBusyError(error)The node refused a Merkle proof request as busy (-32009)
isConnectionLossError(error), txLandedAfterError(error, landed), recoveredTxResult(txHash)Tell whether a transaction landed after the connection died while watching it

MIN_SPEND_FEE exports the fee floor, 0.001 ORB in planck, for offline use; client.shieldedPool.minSpendFee() reads the runtime's value.


Payment slips​

A payment slip is an orbslip1: string that the sender of a private transfer gives the recipient after the transfer lands. It points the recipient's wallet at the note it was paid, so the wallet adds it without scanning the pool.

A slip carries only data that is already public on chain, sealed toward the recipient:

FieldContents
commitmentHexThe recipient output's commitment, 32-byte little-endian hex
encryptedMemoThat output's 180-byte encrypted memo, as hex
leafIndexOptional. Its leaf index, informational
txHashOptional. The transfer's hash, a reference the recipient can show

The fields are public, but pairing them off chain reveals that this recipient expects this payment, so the slip is encrypted. A slip grants no spend power, and a forged one adds nothing: the recipient's wallet recomputes the commitment from the opened memo and checks it against the chain.

Sealing​

import { encodePaymentSlip, fromHex, sealPaymentSlip } from '@orbinum/protocol';

const envelope = sealPaymentSlip(fromHex(recipientIvkHex), {
commitmentHex, // the recipient's output, from CommitmentsInserted
encryptedMemo, // its memo, as 0x hex
leafIndex,
txHash,
});
const slip = encodePaymentSlip(envelope); // 'orbslip1:…'

recipientIvkHex is the 32-byte packed viewing public key, the ivk field of the recipient's privacy address. decodePrivacyAddress(address)?.viewingPublicKeyHex reads it from an orbpriv3: string after checking its checksum and its points. sealPaymentSlip throws for a key that is not exactly 32 bytes or is not a point of Baby JubJub's prime-order subgroup.

Opening​

import { decodePaymentSlip, openPaymentSlip } from '@orbinum/protocol';

const envelope = decodePaymentSlip(slip);
const fields = envelope && openPaymentSlip(recipientIvsk, envelope); // PaymentSlipFields | null

Opening takes the recipient's incoming viewing secret key, so it runs in the recipient's wallet. Both functions return null and never throw: a wrong scheme, a bad checksum, a wrong key, a truncated slip, a commitment that is not 32 bytes, a memo that is not 180 bytes or an invalid leafIndex all give null. A malformed txHash is dropped and the rest is kept. Turning the fields into a spendable note means opening the memo, which is wallet work. The user flow is in Payment Slips.

Wire format​

orbslip1:<payload>:<checksum>
PartContents
Schemeorbslip1: (PAYMENT_SLIP_SCHEME). The version is in the name
payloadbase64url of the envelope written as 0x-prefixed hex text
checksum8 lowercase hex characters: the first 4 bytes of SHA-256 over orbslip1: + payload. It catches typos and truncation, not tampering
EnvelopeephPk(32) ‖ nonce_suffix(8) ‖ ciphertext ‖ MAC(16), at most 4,096 bytes
CipherChaCha20-Poly1305 over the JSON fields. Key: HKDF-SHA256 of the ECDH shared secret with info = "orbinum-payment-slip-v1". Nonce: "SLP1" ‖ the 8-byte suffix

A fresh ephemeral key is generated for every slip. A full slip is about 1,670 characters. QR_SINGLE_CODE_MAX_CHARS (1,800) is the capacity of one QR code at error correction level M; the encoder does not enforce it, so check the length before rendering a slip as a single QR code.

Verifying a slip on a backend​

verifyPayment(slip, { key, tree, expected, finality? }) checks a slip on a server that holds the recipient's viewing key (decodeViewingKey('orbview1:…')): the note opens, is the key's owner's, pays exactly expected, and is in the note tree. It returns the payment's commitmentHex, value, asset, sender and leaf index; it does not return the slip's txHash or stated leaf index, which whoever sealed the slip could set freely. A slip proves that a note to you exists, not who made it, so orders from the public settle on payment proofs instead. See Verifying Payments.


Payment proofs​

A payment proof is an orbproof1: string that the payer's wallet makes beside the slip. A recipient's server checks it with the recipient's public orbpriv3: address alone: no secret on the server.

orbproof1:<commitment>:<encryptedMemo>:<ephemeralSecretKey>:<checksum>
PartContents
commitmentThe payment note's commitment, 32-byte little-endian hex
encryptedMemoIts 180-byte encrypted memo, hex
ephemeralSecretKeyThe 32-byte ephemeral secret the memo was sealed with. With it and the address's viewing public key, the server reaches the shared secret the recipient's wallet reaches
checksum8 hex characters: the first 4 bytes of SHA-256 over everything before it. A typo guard, not authentication

A proof holds no transaction hash, leaf index or label: nothing a payer could change to make one payment settle two orders. It is not sealed, so whoever holds it reads that one payment's amount, asset and declared sender, and nothing about the payer's other notes or keys.

ExportUse
verifyPaymentProof(proof, { address, tree, expected, finality? })The full check: the proof's ephemeral is the memo's ([ephSk]·B), the memo's view tag matches, the note opens to address and recomputes to the commitment, the asset and amount are exactly expected, and the commitment is in the tree. Reasons: invalid-proof, wrong-asset, wrong-amount, not-on-chain, not-final
checkPaymentProof(proof, { address, expected })The same without the chain, for a caller that asks its node itself
encodePaymentProof(fields), decodePaymentProof(text)The wire format. decodePaymentProof returns null for anything malformed and writes hex in lower case, so one payment has one commitmentHex
decodePaymentAddress(text)An orbpriv3: address with its points, or null for a bad checksum, an off-curve owner key or a viewing key outside the prime subgroup
encodeViewingKey(key), decodeViewingKey(text)The orbview1: export of a viewing key, for verifyPayment

finality defaults to 'finalized': the commitment must be in a finalized block, and a payment that has landed but is not final yet is reported as not-final. 'best' accepts the node's best block, which a reorganisation can revert. A note whose sender is named by address is refused as invalid-proof, since only a viewing key proves that claim.

Each GitHub release of the package also attaches orbinum-verify.wasm, a WASI command that runs checkPaymentProof from any language. The backend flow, the WASI module and the checks to make before shipping are in Verifying Payments.


Proofs​

@orbinum/proof-generator builds Groth16 proofs over BN254 from the artifacts in @orbinum/circuits. Without custody it can prove a shield: the shield circuit's private inputs are the note's owner key and blinding, which the depositor chooses. Transfer and unshield proofs need the spending key, so the wallet builds them.

generateProof(circuitType, inputs, options?): Promise<{
proof: string; // 0x hex of the 128-byte compressed proof
publicSignals: string[]; // 0x hex, 32-byte little-endian
circuitType: CircuitType;
}>
OptionMeaning
providerWhere artifacts come from. Default: NodeArtifactProvider under Node, WebArtifactProvider in a browser or worker
circuitVersionMust equal the version the provider resolves, or generateProof throws CircuitVersionMismatchError before proving
backend'snarkjs' (default) or 'arkworks'
singleThreadProve on one thread instead of one worker per core. Needed on memory-constrained devices
CircuitActive version on chainPublic inputsPrivate inputs
shield1commitment, value, asset_idowner_pubkey, blinding
transfer3See Transfer CircuitWallet only
unshield3See Unshield CircuitWallet only

The chain's active versions are readable at run time with client.zkVerifier.getAllCircuitVersions().

Generating a shield proof​

import { CircuitType, NodeArtifactProvider, generateProof } from '@orbinum/proof-generator';
import { commitmentHexOf, fromHex, type ShieldParams } from '@orbinum/protocol';
import { poseidon4 } from 'poseidon-lite';

const value = 10n ** 18n; // 1 ORB
const assetId = 0n;
const ownerPk = 123456789n; // the note owner's Baby JubJub Ax, chosen by the wallet
const blinding = 987654321n; // a random field element, chosen by the wallet
const commitment = poseidon4([value, assetId, ownerPk, blinding]);

const { proof } = await generateProof(
CircuitType.Shield,
{
commitment: commitment.toString(),
value: value.toString(),
asset_id: assetId.toString(),
owner_pubkey: ownerPk.toString(),
blinding: blinding.toString(),
},
{ provider: new NodeArtifactProvider(), circuitVersion: 1, singleThread: true },
);

const params: ShieldParams = {
assetId: 0,
amount: value,
commitment: commitmentHexOf(commitment),
encryptedMemo: new Uint8Array(180), // the wallet seals the real memo
proof: fromHex(proof),
circuitVersion: 1,
};

The chain accepts any 180-byte memo, but a note shielded without a memo sealed to its owner cannot be found by a scan. In a one-shot Node script, singleThread: true lets the process exit: the multi-threaded prover keeps worker threads alive after it returns.

Artifacts and the WebAssembly prover​

ExportPackageUse
NodeArtifactProvider({ packageRoot?, circuitVersions? })proof-generatorReads the installed @orbinum/circuits through its manifest.json and checks each file's SHA-256
WebArtifactProvider({ baseUrl?, circuitVersions? })proof-generatorFetches from the pinned @orbinum/circuits release on unpkg, or a mirror at baseUrl, and checks each file against the SHA-256 pinned at build time
initWasm({ wasmUrl? }), setWasmUrl(url)proof-generatorWhere a browser loads groth16_proofs_bg.wasm. Default: the pinned CDN. The bytes must match the pinned SHA-256. Node reads the file from node_modules
compressSnarkjsProofWasm(proof)proof-generatorCompresses a proof made directly with snarkjs ({ pi_a, pi_b, pi_c }) to the 128-byte form the chain takes
getCircuitPaths(circuit, version?)circuitsAbsolute paths of one version's wasm, r1cs, zkey, ark and verificationKey (Node). Default: the active version
CIRCUITScircuits['transfer', 'unshield', 'shield']

circuitVersions pins a circuit to a version other than the manifest's active one, for example { unshield: 3 }.


Other helpers​

AreaExportsOwner page
Disclosure keyscreateNoteDisclosureKey, decodeNoteDisclosureKey, commitmentHexOfVerifying Disclosure Keys
Merkle foresttreeIdOf({ leafIndex }), isValidLeafIndex, LEAVES_PER_TREE, blockPath, SubtreeRootTree, buildLocalPath, verifyPathMerkle Forest
AddressesevmToSubstrate, substrateToEvm, addressToAccountIdHex, accountIdHexToSs58, substrateSs58ToAccountIdHex, isUnifiedAddress, isImplicitEvmAccount, solanaToSs58, ss58ToSolana, ORBINUM_SS58_PREFIXEVM ↔ Substrate Mapping
Pallet accountspalletAccountId, palletSubAccountId, isPalletAccount, ORBINUM_PALLET_IDS, SHIELDED_POOL_ACCOUNT, ISMP_TREASURY_ACCOUNT, privateMemberAddress(poolId), privateMemberPoolId(account), poolAccounts(id)ZK-NPoS: Private Staking
Note formulasnoteCommitment, ownerPkPoint, stealthScalar, stealthOwnerPk, isOwnedBy, memoEncryptionKey, memoViewTag, memoEphPk, encodePrivacyAddress, decodePrivacyAddress, the sender claims (decodeSenderClaim, senderAddressClaim…)Note Discovery
Bound spendsboundSpendDigest(genesisHash, action, changeMemo), encodeBoundAction, decodeBoundActionZK-NPoS: Private Staking
Runtime eventsEVENT_FIELDS (every pallet's events and their field names, generated from the runtime's metadata; EVENT_FIELDS_SPEC is its spec), eventFieldNames(pallet, event), and the types RuntimePallet, RuntimeEvent, EventFieldName, EventFields: a field the runtime does not declare fails to compileIndexing Events
DecodersinsertedLeaves, mintedLeaves, decodeShieldBatchOperation, decodeSessionKeys, authorFromSlot, timestampFromExtrinsics, parseTransactionTextIndexing Events
EVM token logsERC_EVENT_TOPICS, ercEventName, ERC_SELECTORS, decodeTokenTransfers(log) (ERC-20, ERC-721, ERC-1155 single and batch), decodeAbiString, decodeAbiUintEVM Compatibility
Privacy RPCclient.privacy.*Reading Pool State
AmountsformatBalance(raw, { decimals, symbol, showSymbol, precision }), parseAmount(input, decimals), formatPercent—