Decoded SPL Token Account (165 bytes).

const decoded = decodeTokenAccount(rawBytes);
console.log(`Mint: ${decoded.mint}, Amount: ${decoded.amount}`);

1.1.0

interface DecodedTokenAccount {
    amount: bigint;
    closeAuthority: null;
    delegate: null;
    delegatedAmount: bigint;
    isNative: null | bigint;
    mint: never;
    owner: never;
    state: TokenAccountState;
}

Hierarchy (view full)

Properties

amount: bigint

Token balance (raw, not UI-adjusted).

closeAuthority

Close authority (who can close this account).

delegate

Delegate address (if approved).

delegatedAmount: bigint

Amount delegated to the delegate.

isNative: null | bigint

Native SOL balance if this is a wrapped SOL account.

mint: never

Token mint address.

owner: never

Account owner (wallet).

Account state.