IWalletAccount
Defined in: account.ts:135
A read-only account plus the ability to sign and broadcast.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlychain:string
Defined in: account.ts:94
CAIP-2 chain id, e.g. “eip155:1”, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp”, “ton:-239”, “tron:0x2b6653dc”, “bip122:000000000019d6689c085ae165831e93”.
Inherited from
Section titled “Inherited from”needsNetwork
Section titled “needsNetwork”
readonlyneedsNetwork:boolean
Defined in: account.ts:140
True when signTransaction itself needs the network (TON seqno, Solana
blockhash, BTC UTXOs, Tron ref block). EVM signs offline.
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: account.ts:154
Zeroize this account’s key material.
Returns
Section titled “Returns”void
getAddress()
Section titled “getAddress()”getAddress():
Promise<string>
Defined in: account.ts:96
The account’s address in the chain’s canonical form.
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.getAddress
getBalance()
Section titled “getBalance()”getBalance():
Promise<bigint>
Defined in: account.ts:98
Native balance in base units.
Returns
Section titled “Returns”Promise<bigint>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.getBalance
getTokenBalance()
Section titled “getTokenBalance()”getTokenBalance(
token):Promise<bigint>
Defined in: account.ts:100
Balance of a token (contract, mint, jetton master) in its base units.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<bigint>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.getTokenBalance
getTokenInfo()?
Section titled “getTokenInfo()?”
optionalgetTokenInfo(token):Promise<TokenInfo>
Defined in: account.ts:106
Decimals, symbol, name, supply and holder-relevant TokenFlags of a token, read from the chain. Throws NotATokenError when the address is not a token there. Chain packages that cannot read token metadata leave it out.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<TokenInfo>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.getTokenInfo
getTransactionReceipt()
Section titled “getTransactionReceipt()”getTransactionReceipt(
hash):Promise<Receipt|undefined>
Defined in: account.ts:112
The receipt of a transaction, or undefined while it is not yet included.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Receipt | undefined>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.getTransactionReceipt
quoteSendTransaction()
Section titled “quoteSendTransaction()”quoteSendTransaction(
tx):Promise<{fee:bigint; }>
Defined in: account.ts:108
Network fee the transaction would pay, in native base units. Nothing is signed.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Promise<{ fee: bigint; }>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.quoteSendTransaction
quoteTransfer()
Section titled “quoteTransfer()”quoteTransfer(
options):Promise<{fee:bigint; }>
Defined in: account.ts:110
Network fee a TransferOptions transfer would pay, in native base units.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<{ fee: bigint; }>
Inherited from
Section titled “Inherited from”IWalletAccountReadOnly.quoteTransfer
sendTransaction()
Section titled “sendTransaction()”sendTransaction(
tx,options?):Promise<TransferResult>
Defined in: account.ts:146
Sign and broadcast.
Parameters
Section titled “Parameters”unknown
options?
Section titled “options?”Returns
Section titled “Returns”Promise<TransferResult>
sign()
Section titled “sign()”sign(
message):Promise<string>
Defined in: account.ts:142
Sign a message the chain’s conventional way (EIP-191, BIP-137, ed25519 raw…). Returns the chain’s conventional encoding (hex, base64…).
Parameters
Section titled “Parameters”message
Section titled “message”string | Uint8Array<ArrayBufferLike>
Returns
Section titled “Returns”Promise<string>
signTransaction()
Section titled “signTransaction()”signTransaction(
tx,options?):Promise<string>
Defined in: account.ts:144
Sign a fully specified transaction WITHOUT broadcasting. Returns the serialised signed tx.
Parameters
Section titled “Parameters”unknown
options?
Section titled “options?”Returns
Section titled “Returns”Promise<string>
toReadOnlyAccount()
Section titled “toReadOnlyAccount()”toReadOnlyAccount():
IWalletAccountReadOnly
Defined in: account.ts:152
The same address without signing ability: safe to hand to code that should only read or quote.
Returns
Section titled “Returns”transfer()
Section titled “transfer()”transfer(
options,writeOptions?):Promise<TransferResult>
Defined in: account.ts:148
Native or token transfer; the account builds the transaction.
Parameters
Section titled “Parameters”options
Section titled “options”writeOptions?
Section titled “writeOptions?”Returns
Section titled “Returns”Promise<TransferResult>
verify()
Section titled “verify()”verify(
message,signature):Promise<boolean>
Defined in: account.ts:114
Check a message signature against this account’s key, the chain’s conventional way.
Parameters
Section titled “Parameters”message
Section titled “message”string | Uint8Array<ArrayBufferLike>
signature
Section titled “signature”string
Returns
Section titled “Returns”Promise<boolean>