Skip to content

API reference ​

Use the chapter links for examples. The package entry point lists actual exports; the source contracts contain complete TypeScript shapes. Your editor reads the same declarations from the installed package.

Package exports ​

ExportPurposeGuide
defineNetwork, encodeNetworkParametersValidate and register network parametersNetworks
getConsensusContextDerive consensus context from a registered network and target heightNetworks
parseZec, formatZecExact ZEC/zatoshi conversionAmounts
accountIndex, diversifierIndex, txId, blockHashValidate typed identifiersIdentifiers
httpTransport, readGenesisHash, createPublicClientJSON-RPC transport and public readsPublic client
grpc, createLightClientLightwallet transport and readsLight client
createWalletClientOpen the local wallet and recover recorded workWallet setup
createZcashClientGroup existing same-network clientsIntroduction
resolveBirthdayResolve a scan starting pointAccounts
accountFromViewingKey, viewing, addressesStandalone viewing and address operationsReceiving
createCustomSigner, pcztSigner integration and standalone PCZT toolsSigning
isZcashErrorNarrow a structured SDK failureErrors

@zcashlabs/zcash.js/grpc-node additionally exports createGrpcNodeTransport for explicit Node byte-transport use.

Wallet methods ​

GroupMethodsEffect
accountscreate, import, list, get, remove, attachSigner, restoreSigner, detachSignerLocal account records and signer bindings
addressescurrent, next, list, atRead or record receive-address exposure
PlanningproposeRetain an immutable proposal and its locks
Executionsend, shieldPlan/execute and explicitly dispatch payment work
Stagesbuild, prove, sign, finalizePrepare artifacts; finalize retains bytes without submission
pcztexport, importExchange artifacts associated with an operation
operationslist, get, resume, abandonInspect/recover work or retire an unbuilt proposal
SubmissionbroadcastSubmit retained bytes for an operation
QueriesgetBalance, getHistory, getTransaction, listNotes, listUtxosRead local scan/accounting state
Syncsync, getSyncStatus, watchSyncScan or observe progress
LifetimecloseDrain work and close the wallet

A PendingPayment exposes operationId, snapshot, events, broadcast, and wait. A wallet exposes network and the startup recovery report.

Public and light methods ​

Public clientLight client
getTipgetTip, getServerInfo
getBlock, getBlockHeaderstreamCompactBlocks
getTransaction, getTransactionStatusgetTransaction
getUtxosgetAddressUtxos, getAddressBalance
getTreeState, getSubtreeRootsgetTreeState, getSubtreeRoots
watchTransaction, waitForTransactionstreamAddressTransactions, streamMempool
broadcastTransactionbroadcastTransaction

Most asynchronous methods accept an optional signal. Pass only the documented options: unknown fields can reject. Streams need sequential consumption and explicit cleanup. Source observations include sourceId and observedAt; they are source evidence, not a full-node consensus verdict.