SplToken
SplToken: { accounts: [{ name: "mint"; type: { fields: [{ name: "mintAuthority"; type: { coption: "publicKey" } }, { name: "supply"; type: "u64" }, { name: "decimals"; type: "u8" }, { name: "isInitialized"; type: "bool" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; kind: "struct" } }, { name: "token"; type: { fields: [{ name: "mint"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "delegate"; type: { coption: "publicKey" } }, { name: "state"; type: "u8" }, { name: "isNative"; type: { coption: "u64" } }, { name: "delegatedAmount"; type: "u64" }, { name: "closeAuthority"; type: { coption: "publicKey" } }]; kind: "struct" } }]; instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "decimals"; type: "u8" }, { name: "mintAuthority"; type: "publicKey" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; name: "initializeMint" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: false; isSigner: false; name: "rent" }]; args: []; name: "initializeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "m"; type: "u8" }]; name: "initializeMultisig" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "transfer" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "delegate" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "approve" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "revoke" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "authorityType"; type: "u8" }, { name: "newAuthority"; type: { coption: "publicKey" } }]; name: "setAuthority" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "to" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "mintTo" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "burn" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: false; name: "authority" }]; args: []; name: "closeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "freezeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "thawAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "transferChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "delegate" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "approveChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "to" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "mintToChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "burnChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "authority"; type: "publicKey" }]; name: "initializeAccount2" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }]; args: []; name: "syncNative" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }]; args: [{ name: "authority"; type: "publicKey" }]; name: "initializeAccount3" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }]; args: [{ name: "m"; type: "u8" }]; name: "initializeMultisig2" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }]; args: [{ name: "decimals"; type: "u8" }, { name: "mintAuthority"; type: "publicKey" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; name: "initializeMint2" }]; name: "spl_token"; version: "0.1.0" }
Type declaration
accounts: [{ name: "mint"; type: { fields: [{ name: "mintAuthority"; type: { coption: "publicKey" } }, { name: "supply"; type: "u64" }, { name: "decimals"; type: "u8" }, { name: "isInitialized"; type: "bool" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; kind: "struct" } }, { name: "token"; type: { fields: [{ name: "mint"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "delegate"; type: { coption: "publicKey" } }, { name: "state"; type: "u8" }, { name: "isNative"; type: { coption: "u64" } }, { name: "delegatedAmount"; type: "u64" }, { name: "closeAuthority"; type: { coption: "publicKey" } }]; kind: "struct" } }]
instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "decimals"; type: "u8" }, { name: "mintAuthority"; type: "publicKey" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; name: "initializeMint" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: false; isSigner: false; name: "rent" }]; args: []; name: "initializeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "m"; type: "u8" }]; name: "initializeMultisig" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "transfer" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "delegate" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "approve" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "revoke" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "authorityType"; type: "u8" }, { name: "newAuthority"; type: { coption: "publicKey" } }]; name: "setAuthority" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "to" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "mintTo" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }]; name: "burn" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: false; name: "authority" }]; args: []; name: "closeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "freezeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "thawAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "destination" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "transferChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "delegate" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "approveChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }, { isMut: true; isSigner: false; name: "to" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "mintToChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "source" }, { isMut: true; isSigner: false; name: "mint" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "amount"; type: "u64" }, { name: "decimals"; type: "u8" }]; name: "burnChecked" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "authority"; type: "publicKey" }]; name: "initializeAccount2" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }]; args: []; name: "syncNative" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }, { isMut: false; isSigner: false; name: "mint" }]; args: [{ name: "authority"; type: "publicKey" }]; name: "initializeAccount3" }, { accounts: [{ isMut: true; isSigner: false; name: "account" }]; args: [{ name: "m"; type: "u8" }]; name: "initializeMultisig2" }, { accounts: [{ isMut: true; isSigner: false; name: "mint" }]; args: [{ name: "decimals"; type: "u8" }, { name: "mintAuthority"; type: "publicKey" }, { name: "freezeAuthority"; type: { coption: "publicKey" } }]; name: "initializeMint2" }]
name: "spl_token"
version: "0.1.0"
The namespace provides handles to an AccountClient object for each account in a program.
Usage
Example
To fetch a
Counter
account from the above example,For the full API, see the AccountClient reference.