Skip to content

Constants

spl.token.constants

SPL token constants.

ACCOUNT_LEN = 165 module-attribute

Data length of a token account.

ASSOCIATED_TOKEN_PROGRAM_ID = Pubkey.from_string('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL') module-attribute

Program ID for the associated token account program.

MINT_LEN = 82 module-attribute

Data length of a token mint account.

MULTISIG_LEN = 355 module-attribute

Data length of a multisig token account.

NATIVE_DECIMALS = 9 module-attribute

Number of decimals for SOL and the Wrapped SOL mint.

TOKEN_2022_PROGRAM_ID = Pubkey.from_string('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') module-attribute

Public key that identifies the SPL token 2022 program.

TOKEN_PROGRAM_ID = Pubkey.from_string('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA') module-attribute

Public key that identifies the SPL token program.

WRAPPED_SOL_MINT = Pubkey.from_string('So11111111111111111111111111111111111111112') module-attribute

Public key of the "Native Mint" for wrapping SOL to SPL token.

The Token Program can be used to wrap native SOL. Doing so allows native SOL to be treated like any other Token program token type and can be useful when being called from other programs that interact with the Token Program's interface.