Type alias Token

Token: {
    model: "token";
    address: PublicKey | Pda;
    isAssociatedToken: boolean;
    mintAddress: PublicKey;
    ownerAddress: PublicKey;
    amount: SplTokenAmount;
    closeAuthorityAddress: Option<PublicKey>;
    delegateAddress: Option<PublicKey>;
    delegateAmount: SplTokenAmount;
    state: AccountState;
}

This model represents a token account.

Type declaration

  • Readonly model: "token"

    A model identifier to distinguish models in the SDK.

  • Readonly address: PublicKey | Pda

    The address of the token account.

  • Readonly isAssociatedToken: boolean

    Whether or not this is an associated token account.

  • Readonly mintAddress: PublicKey

    The address of the mint account.

  • Readonly ownerAddress: PublicKey

    The address of the owner of this token account.

  • Readonly amount: SplTokenAmount

    The amount of tokens held in this account.

  • Readonly closeAuthorityAddress: Option<PublicKey>

    The address of the authority that can close the account. This field is optional and may be null.

  • Readonly delegateAddress: Option<PublicKey>

    The address of the authority that can act on behalf of the owner of the account. This field is optional and may be null.

  • Readonly delegateAmount: SplTokenAmount

    The amount of tokens that were delegated to the delegate authority. This means the delegate authority cannot transfer more tokens than this amount even if the token account has more tokens available.

    This field is only relevant if the account has a delegate authority.

  • Readonly state: AccountState

    The state of the token account. It is mostly used to determine whether or not the account is frozen.

    It can be one of the following:

    • AccountState.Uninitialized: The account has not been initialized. This should never happen in this model since the SDK would fail to parse this model if it were uninitialized.
    • AccountState.Initialized: The account has been initialized and is not frozen.
    • AccountState.Frozen: The account has been initialized and is frozen.

Generated using TypeDoc