Skip to content
docs

WalletAccountZcash

Defined in: wallet-zcash/src/account.ts:42

Signing Zcash account — BIP-44 P2PKH at m/44’/133’/0’/0/i (t1…). The key never enters this package: every input is one signer.sign(...) call over the ZIP-244 signature digest computed here (ecdsa, DER-encoded + SIGHASH_ALL into the scriptSig); messages are ecdsa-recoverable over the Zcash magic hash.

Every spend is resolved to a full description (“what you sign”) and run through the hard safety checks (fee ceiling, recipient/amount exactness, change ownership) before signing AND before broadcast — also for caller-supplied raw hex.

  • IWalletAccount

new WalletAccountZcash(signer, publicKey, path, config?): WalletAccountZcash

Defined in: wallet-zcash/src/account.ts:61

publicKey is the signer’s compressed secp256k1 key (33 bytes); it is needed synchronously for the address.

Signer

Uint8Array

string

ZcashConfig = {}

WalletAccountZcash

WalletAccountReadOnlyZcash.constructor

protected readonly _client: ZcashClient | undefined

Defined in: wallet-zcash/src/read-only-account.ts:28

WalletAccountReadOnlyZcash._client


protected readonly _config: ZcashConfig

Defined in: wallet-zcash/src/read-only-account.ts:27

WalletAccountReadOnlyZcash._config


protected readonly _network: ZcashNetwork

Defined in: wallet-zcash/src/read-only-account.ts:29

WalletAccountReadOnlyZcash._network


readonly address: string

Defined in: wallet-zcash/src/read-only-account.ts:21

The transparent address.

WalletAccountReadOnlyZcash.address


readonly chain: string

Defined in: wallet-zcash/src/read-only-account.ts:22

CAIP-2 chain id, e.g. “eip155:1”, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp”, “ton:-239”, “tron:0x2b6653dc”, “bip122:000000000019d6689c085ae165831e93”.

IWalletAccount.chain

WalletAccountReadOnlyZcash.chain


readonly needsNetwork: true = true

Defined in: wallet-zcash/src/account.ts:44

UTXOs and the tip height come from the network before signing.

IWalletAccount.needsNetwork


readonly path: string

Defined in: wallet-zcash/src/account.ts:46

Derivation path, or external for an external signer.


readonly publicKey: Uint8Array

Defined in: wallet-zcash/src/account.ts:48

Compressed secp256k1 public key.


readonly scriptKind: ScriptKind

Defined in: wallet-zcash/src/read-only-account.ts:26

Script type of the address.

WalletAccountReadOnlyZcash.scriptKind


readonly scriptPubKey: Uint8Array

Defined in: wallet-zcash/src/read-only-account.ts:24

The address’s scriptPubKey.

WalletAccountReadOnlyZcash.scriptPubKey


readonly signerKind: "key" | "seed" | "external"

Defined in: wallet-zcash/src/account.ts:56

What holds the key: seed, key (one imported key) or external.

get index(): number | undefined

Defined in: wallet-zcash/src/account.ts:76

Account index for the standard m/44’/133’/0’/0/i path.

number | undefined


get maxFee(): bigint

Defined in: wallet-zcash/src/read-only-account.ts:48

Fee ceiling in zatoshis: ZcashConfig.maxFee or the default.

bigint

WalletAccountReadOnlyZcash.maxFee

describeTransaction(tx): Promise<ZcashTxDescription>

Defined in: wallet-zcash/src/account.ts:175

“What you sign”: the fully resolved spend (signed, NOT broadcast) or a caller’s raw hex.

ZcashTransaction

Promise<ZcashTxDescription>


dispose(): void

Defined in: wallet-zcash/src/account.ts:244

Zeroize this account’s key material.

void

IWalletAccount.dispose


getAddress(): Promise<string>

Defined in: wallet-zcash/src/read-only-account.ts:53

The transparent address.

Promise<string>

IWalletAccount.getAddress

WalletAccountReadOnlyZcash.getAddress


getBalance(): Promise<bigint>

Defined in: wallet-zcash/src/read-only-account.ts:56

Confirmed plus incoming mempool value (the transports do not expose pending spends of our own outputs).

Promise<bigint>

IWalletAccount.getBalance

WalletAccountReadOnlyZcash.getBalance


getMaxSpendable(opts?): Promise<ZcashMaxSpendableResult>

Defined in: wallet-zcash/src/read-only-account.ts:98

Everything spendable in ONE transaction to a single output, no change.

number | bigint

string

Promise<ZcashMaxSpendableResult>

WalletAccountReadOnlyZcash.getMaxSpendable


getTokenBalance(_token): Promise<bigint>

Defined in: wallet-zcash/src/read-only-account.ts:62

Always throws: Zcash has no tokens.

string

Promise<bigint>

IWalletAccount.getTokenBalance

WalletAccountReadOnlyZcash.getTokenBalance


getTransactionReceipt(hash): Promise<ZcashReceipt | undefined>

Defined in: wallet-zcash/src/read-only-account.ts:107

Undefined until the transaction is mined.

string

Promise<ZcashReceipt | undefined>

IWalletAccount.getTransactionReceipt

WalletAccountReadOnlyZcash.getTransactionReceipt


protected planSpend(spend): Promise<SpendPlan>

Defined in: wallet-zcash/src/read-only-account.ts:67

Coin selection for a spend (ZIP-317 fee). Validates the recipient and the dust floor first.

ZcashSpend

Promise<SpendPlan>

WalletAccountReadOnlyZcash.planSpend


quoteSendTransaction(tx): Promise<{ fee: bigint; }>

Defined in: wallet-zcash/src/account.ts:193

ZIP-317 fee of a spend in zatoshis.

ZcashTransaction

Promise<{ fee: bigint; }>

IWalletAccount.quoteSendTransaction

WalletAccountReadOnlyZcash.quoteSendTransaction


quoteTransfer(o): Promise<{ fee: bigint; }>

Defined in: wallet-zcash/src/read-only-account.ts:92

ZIP-317 fee of a transfer in zatoshis.

ZcashTransferOptions

Promise<{ fee: bigint; }>

IWalletAccount.quoteTransfer

WalletAccountReadOnlyZcash.quoteTransfer


protected requireClient(what): ZcashClient

Defined in: wallet-zcash/src/read-only-account.ts:42

string

ZcashClient

WalletAccountReadOnlyZcash.requireClient


sendTransaction(tx, options?): Promise<TransferResult>

Defined in: wallet-zcash/src/account.ts:198

Sign and broadcast.

ZcashTransaction

WriteOptions = {}

Promise<TransferResult>

IWalletAccount.sendTransaction


sign(message): Promise<string>

Defined in: wallet-zcash/src/account.ts:86

Zcash message signature (zcashd signmessage encoding), base64.

string | Uint8Array<ArrayBufferLike>

Promise<string>

IWalletAccount.sign


signTransaction(tx, options?): Promise<string>

Defined in: wallet-zcash/src/account.ts:181

Sign without broadcasting. Returns the raw transaction hex. Raw hex input gets the checks sendTransaction runs (prevouts through the client) and is returned unchanged, never re-signed.

ZcashTransaction

WriteOptions = {}

Promise<string>

IWalletAccount.signTransaction


protected tipHeight(): Promise<number | undefined>

Defined in: wallet-zcash/src/read-only-account.ts:122

Chain tip for lock time / expiry; undefined when the transport cannot tell.

Promise<number | undefined>

WalletAccountReadOnlyZcash.tipHeight


toReadOnlyAccount(): IWalletAccountReadOnly

Defined in: wallet-zcash/src/account.ts:239

The same address as a WalletAccountReadOnlyZcash.

IWalletAccountReadOnly

IWalletAccount.toReadOnlyAccount


transfer(o, writeOptions?): Promise<TransferResult>

Defined in: wallet-zcash/src/account.ts:214

Native ZEC only (token is rejected). Subject to transferMaxFee.

ZcashTransferOptions

WriteOptions = {}

Promise<TransferResult>

IWalletAccount.transfer


verify(message, signature): Promise<boolean>

Defined in: wallet-zcash/src/read-only-account.ts:115

Recover the key from a Zcash message signature and compare its P2PKH address with ours.

string | Uint8Array<ArrayBufferLike>

string

Promise<boolean>

IWalletAccount.verify

WalletAccountReadOnlyZcash.verify


static fromPrivateKey(privateKey, publicKey, path, config?): WalletAccountZcash

Defined in: wallet-zcash/src/account.ts:71

Back-compat: wrap a raw derived key in a LocalSigner (the account takes ownership; it cannot derive).

Uint8Array

Uint8Array

string

ZcashConfig = {}

WalletAccountZcash