WalletAccountReadOnlyZcash
Defined in: wallet-zcash/src/read-only-account.ts:19
Watch-only Zcash account: balances, quotes, receipts, message verification. No key.
Extended by
Section titled “Extended by”Implements
Section titled “Implements”IWalletAccountReadOnly
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WalletAccountReadOnlyZcash(
address,config?):WalletAccountReadOnlyZcash
Defined in: wallet-zcash/src/read-only-account.ts:31
Parameters
Section titled “Parameters”address
Section titled “address”string
config?
Section titled “config?”ZcashConfig = {}
Returns
Section titled “Returns”WalletAccountReadOnlyZcash
Properties
Section titled “Properties”_client
Section titled “_client”
protectedreadonly_client:ZcashClient|undefined
Defined in: wallet-zcash/src/read-only-account.ts:28
_config
Section titled “_config”
protectedreadonly_config:ZcashConfig
Defined in: wallet-zcash/src/read-only-account.ts:27
_network
Section titled “_network”
protectedreadonly_network:ZcashNetwork
Defined in: wallet-zcash/src/read-only-account.ts:29
address
Section titled “address”
readonlyaddress:string
Defined in: wallet-zcash/src/read-only-account.ts:21
The transparent address.
readonlychain: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”.
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.chain
scriptKind
Section titled “scriptKind”
readonlyscriptKind:ScriptKind
Defined in: wallet-zcash/src/read-only-account.ts:26
Script type of the address.
scriptPubKey
Section titled “scriptPubKey”
readonlyscriptPubKey:Uint8Array
Defined in: wallet-zcash/src/read-only-account.ts:24
The address’s scriptPubKey.
Accessors
Section titled “Accessors”maxFee
Section titled “maxFee”Get Signature
Section titled “Get Signature”get maxFee():
bigint
Defined in: wallet-zcash/src/read-only-account.ts:48
Fee ceiling in zatoshis: ZcashConfig.maxFee or the default.
Returns
Section titled “Returns”bigint
Methods
Section titled “Methods”getAddress()
Section titled “getAddress()”getAddress():
Promise<string>
Defined in: wallet-zcash/src/read-only-account.ts:53
The transparent address.
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.getAddress
getBalance()
Section titled “getBalance()”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).
Returns
Section titled “Returns”Promise<bigint>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.getBalance
getMaxSpendable()
Section titled “getMaxSpendable()”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.
Parameters
Section titled “Parameters”number | bigint
string
Returns
Section titled “Returns”Promise<ZcashMaxSpendableResult>
getTokenBalance()
Section titled “getTokenBalance()”getTokenBalance(
_token):Promise<bigint>
Defined in: wallet-zcash/src/read-only-account.ts:62
Always throws: Zcash has no tokens.
Parameters
Section titled “Parameters”_token
Section titled “_token”string
Returns
Section titled “Returns”Promise<bigint>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.getTokenBalance
getTransactionReceipt()
Section titled “getTransactionReceipt()”getTransactionReceipt(
hash):Promise<ZcashReceipt|undefined>
Defined in: wallet-zcash/src/read-only-account.ts:107
Undefined until the transaction is mined.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ZcashReceipt | undefined>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.getTransactionReceipt
planSpend()
Section titled “planSpend()”
protectedplanSpend(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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<SpendPlan>
quoteSendTransaction()
Section titled “quoteSendTransaction()”quoteSendTransaction(
tx):Promise<{fee:bigint; }>
Defined in: wallet-zcash/src/read-only-account.ts:86
ZIP-317 fee of a spend in zatoshis.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<{ fee: bigint; }>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.quoteSendTransaction
quoteTransfer()
Section titled “quoteTransfer()”quoteTransfer(
o):Promise<{fee:bigint; }>
Defined in: wallet-zcash/src/read-only-account.ts:92
ZIP-317 fee of a transfer in zatoshis.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<{ fee: bigint; }>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.quoteTransfer
requireClient()
Section titled “requireClient()”
protectedrequireClient(what):ZcashClient
Defined in: wallet-zcash/src/read-only-account.ts:42
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”tipHeight()
Section titled “tipHeight()”
protectedtipHeight():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.
Returns
Section titled “Returns”Promise<number | undefined>
verify()
Section titled “verify()”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.
Parameters
Section titled “Parameters”message
Section titled “message”string | Uint8Array<ArrayBufferLike>
signature
Section titled “signature”string
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”IWalletAccountReadOnly.verify