Skip to content
docs

IWalletAccountReadOnly

Defined in: account.ts:92

Anything that can be read about an address without a key: balances, quotes, receipts. Protocol modules constructed with a read-only account may only quote.

readonly chain: string

Defined in: account.ts:94

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

getAddress(): Promise<string>

Defined in: account.ts:96

The account’s address in the chain’s canonical form.

Promise<string>


getBalance(): Promise<bigint>

Defined in: account.ts:98

Native balance in base units.

Promise<bigint>


getTokenBalance(token): Promise<bigint>

Defined in: account.ts:100

Balance of a token (contract, mint, jetton master) in its base units.

string

Promise<bigint>


optional getTokenInfo(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.

string

Promise<TokenInfo>


getTransactionReceipt(hash): Promise<Receipt | undefined>

Defined in: account.ts:112

The receipt of a transaction, or undefined while it is not yet included.

string

Promise<Receipt | undefined>


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

Defined in: account.ts:108

Network fee the transaction would pay, in native base units. Nothing is signed.

unknown

Promise<{ fee: bigint; }>


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

Defined in: account.ts:110

Network fee a TransferOptions transfer would pay, in native base units.

TransferOptions

Promise<{ fee: bigint; }>


verify(message, signature): Promise<boolean>

Defined in: account.ts:114

Check a message signature against this account’s key, the chain’s conventional way.

string | Uint8Array<ArrayBufferLike>

string

Promise<boolean>