agora.solana.token package

Submodules

agora.solana.token.associated module

class agora.solana.token.associated.DecompiledCreateAssociatedAccount(subsidizer, address, owner, mint)[source]

Bases: tuple

property address

Alias for field number 1

property mint

Alias for field number 3

property owner

Alias for field number 2

property subsidizer

Alias for field number 0

agora.solana.token.associated.create_associated_token_account(subsidizer, wallet, mint)[source]
Return type:

Tuple[Instruction, PublicKey]

agora.solana.token.associated.decompile_create_associated_account(m, index)[source]
Return type:

DecompiledCreateAssociatedAccount

agora.solana.token.associated.get_associated_account(wallet, mint)[source]
Return type:

PublicKey

agora.solana.token.program module

class agora.solana.token.program.AuthorityType(value)[source]

Bases: enum.IntEnum

An enumeration.

ACCOUNT_HOLDER = 2
CLOSE_ACCOUNT = 3
FREEZE_ACCOUNT = 1
MINT_TOKENS = 0
class agora.solana.token.program.Command(value)[source]

Bases: enum.IntEnum

An enumeration.

APPROVE = 4
APPROVE_2 = 13
BURN = 8
BURN_2 = 15
CLOSE_ACCOUNT = 9
FREEZE_ACCOUNT = 10
INITIALIZE_ACCOUNT = 1
INITIALIZE_MINT = 0
INITIALIZE_MULTISIG = 2
MINT_TO = 7
MINT_TO_2 = 14
REVOKE = 5
SET_AUTHORITY = 6
THAW_ACCOUNT = 11
TRANSFER = 3
TRANSFER_2 = 12
class agora.solana.token.program.DecompileCloseAccount(account, destination, owner)[source]

Bases: tuple

property account

Alias for field number 0

property destination

Alias for field number 1

property owner

Alias for field number 2

class agora.solana.token.program.DecompileSetAuthority(account, current_authority, authority_type, new_authority)[source]

Bases: tuple

property account

Alias for field number 0

property authority_type

Alias for field number 2

property current_authority

Alias for field number 1

property new_authority

Alias for field number 3

class agora.solana.token.program.DecompiledInitializeAccount(account, mint, owner)[source]

Bases: tuple

property account

Alias for field number 0

property mint

Alias for field number 1

property owner

Alias for field number 2

class agora.solana.token.program.DecompiledTransfer(source, dest, owner, amount)[source]

Bases: tuple

property amount

Alias for field number 3

property dest

Alias for field number 1

property owner

Alias for field number 2

property source

Alias for field number 0

agora.solana.token.program.close_account(account, dest, owner)[source]
Return type:

Instruction

agora.solana.token.program.decompile_close_account(m, index)[source]
Return type:

DecompileCloseAccount

agora.solana.token.program.decompile_initialize_account(m, index)[source]
Return type:

DecompiledInitializeAccount

agora.solana.token.program.decompile_set_authority(m, index)[source]
Return type:

DecompileSetAuthority

agora.solana.token.program.decompile_transfer(m, index)[source]
Return type:

DecompiledTransfer

agora.solana.token.program.get_command(m, index)[source]
Return type:

Command

agora.solana.token.program.initialize_account(account, mint, owner)[source]

// Accounts expected by this instruction: // // 0. [writable] The account to initialize. // 1. [] The mint this account will be associated with. // 2. [] The new account’s owner/multisignature. // 3. [] Rent sysvar

Return type:

Instruction

Returns:

agora.solana.token.program.set_authority(account, current_authority, authority_type, new_authority=None)[source]
Return type:

Instruction

agora.solana.token.program.transfer(source, dest, owner, amount)[source]

// Accounts expected by this instruction: // // * Single owner/delegate // 0. [writable] The source account. // 1. [writable] The destination account. // 2. [signer] The source account’s owner/delegate. // // * Multisignature owner/delegate // 0. [writable] The source account. // 1. [writable] The destination account. // 2. [] The source account’s multisignature owner/delegate. // 3. ..3+M [signer] M signer accounts. :rtype: Instruction :return:

Module contents

class agora.solana.token.AuthorityType(value)[source]

Bases: enum.IntEnum

An enumeration.

ACCOUNT_HOLDER = 2
CLOSE_ACCOUNT = 3
FREEZE_ACCOUNT = 1
MINT_TOKENS = 0
class agora.solana.token.Command(value)[source]

Bases: enum.IntEnum

An enumeration.

APPROVE = 4
APPROVE_2 = 13
BURN = 8
BURN_2 = 15
CLOSE_ACCOUNT = 9
FREEZE_ACCOUNT = 10
INITIALIZE_ACCOUNT = 1
INITIALIZE_MINT = 0
INITIALIZE_MULTISIG = 2
MINT_TO = 7
MINT_TO_2 = 14
REVOKE = 5
SET_AUTHORITY = 6
THAW_ACCOUNT = 11
TRANSFER = 3
TRANSFER_2 = 12
class agora.solana.token.DecompileCloseAccount(account, destination, owner)[source]

Bases: tuple

property account

Alias for field number 0

property destination

Alias for field number 1

property owner

Alias for field number 2

class agora.solana.token.DecompileSetAuthority(account, current_authority, authority_type, new_authority)[source]

Bases: tuple

property account

Alias for field number 0

property authority_type

Alias for field number 2

property current_authority

Alias for field number 1

property new_authority

Alias for field number 3

class agora.solana.token.DecompiledInitializeAccount(account, mint, owner)[source]

Bases: tuple

property account

Alias for field number 0

property mint

Alias for field number 1

property owner

Alias for field number 2

class agora.solana.token.DecompiledTransfer(source, dest, owner, amount)[source]

Bases: tuple

property amount

Alias for field number 3

property dest

Alias for field number 1

property owner

Alias for field number 2

property source

Alias for field number 0

agora.solana.token.close_account(account, dest, owner)[source]
Return type:

Instruction

agora.solana.token.create_associated_token_account(subsidizer, wallet, mint)[source]
Return type:

Tuple[Instruction, PublicKey]

agora.solana.token.decompile_close_account(m, index)[source]
Return type:

DecompileCloseAccount

agora.solana.token.decompile_create_associated_account(m, index)[source]
Return type:

DecompiledCreateAssociatedAccount

agora.solana.token.decompile_initialize_account(m, index)[source]
Return type:

DecompiledInitializeAccount

agora.solana.token.decompile_set_authority(m, index)[source]
Return type:

DecompileSetAuthority

agora.solana.token.decompile_transfer(m, index)[source]
Return type:

DecompiledTransfer

agora.solana.token.get_command(m, index)[source]
Return type:

Command

agora.solana.token.initialize_account(account, mint, owner)[source]

// Accounts expected by this instruction: // // 0. [writable] The account to initialize. // 1. [] The mint this account will be associated with. // 2. [] The new account’s owner/multisignature. // 3. [] Rent sysvar

Return type:

Instruction

Returns:

agora.solana.token.set_authority(account, current_authority, authority_type, new_authority=None)[source]
Return type:

Instruction

agora.solana.token.transfer(source, dest, owner, amount)[source]

// Accounts expected by this instruction: // // * Single owner/delegate // 0. [writable] The source account. // 1. [writable] The destination account. // 2. [signer] The source account’s owner/delegate. // // * Multisignature owner/delegate // 0. [writable] The source account. // 1. [writable] The destination account. // 2. [] The source account’s multisignature owner/delegate. // 3. ..3+M [signer] M signer accounts. :rtype: Instruction :return: