Skip to content
docs

WalletAccountReadOnlyZcash

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

Watch-only Zcash account: balances, quotes, receipts, message verification. No key.

  • IWalletAccountReadOnly

new WalletAccountReadOnlyZcash(address, config?): WalletAccountReadOnlyZcash

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

string

ZcashConfig = {}

WalletAccountReadOnlyZcash

protected readonly _client: ZcashClient | undefined

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


protected readonly _config: ZcashConfig

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


protected readonly _network: ZcashNetwork

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


readonly address: string

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

The transparent 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”.

IWalletAccountReadOnly.chain


readonly scriptKind: ScriptKind

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

Script type of the address.


readonly scriptPubKey: Uint8Array

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

The address’s scriptPubKey.

get maxFee(): bigint

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

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

bigint

getAddress(): Promise<string>

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

The transparent address.

Promise<string>

IWalletAccountReadOnly.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>

IWalletAccountReadOnly.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>


getTokenBalance(_token): Promise<bigint>

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

Always throws: Zcash has no tokens.

string

Promise<bigint>

IWalletAccountReadOnly.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>

IWalletAccountReadOnly.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>


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

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

ZIP-317 fee of a spend in zatoshis.

ZcashSpend

Promise<{ fee: bigint; }>

IWalletAccountReadOnly.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; }>

IWalletAccountReadOnly.quoteTransfer


protected requireClient(what): ZcashClient

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

string

ZcashClient


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>


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>

IWalletAccountReadOnly.verify