Constructors
constructor
new Associated Token( address: PublicKey , info: null | Account , amount: TokenAmount ) : AssociatedToken
Parameters
address: PublicKey
info: null | Account
Properties
address
address: PublicKey
info
info: null | Account
Static
Readonly
NATIVE_ DECIMALS
NATIVE_ DECIMALS: 9 = 9
Methods
Static
decode Account
decode Account( data: null | AccountInfo < Buffer > , address: Address , decimals: number ) : AssociatedToken
Parameters
data: null | AccountInfo < Buffer >
address: Address
decimals: number
Static
decode Mint
decode Mint( info: AccountInfo < Buffer > , address: PublicKey ) : Mint
Parameters
info: AccountInfo < Buffer >
address: PublicKey
Returns Mint
Static
decode Native
decode Native( info: null | AccountInfo < Buffer > , address: Address ) : AssociatedToken
Parameters
info: null | AccountInfo < Buffer >
address: Address
Static
derive
derive( mint: Address , owner: Address ) : PublicKey
Parameters
mint: Address
owner: Address
Returns PublicKey
Static
exists
exists( connection: Connection , mint: Address , owner: Address ) : Promise < boolean >
Parameters
connection: Connection
mint: Address
owner: Address
Returns Promise < boolean >
Static
exists Aux
exists Aux( connection: Connection , mint: Address , owner: Address , address: Address ) : Promise < boolean >
Parameters
connection: Connection
mint: Address
owner: Address
address: Address
Returns Promise < boolean >
Static
is Native
is Native( owner: Address , mint: Address , tokenAccountOrNative: Address ) : boolean
Parameters
owner: Address
mint: Address
tokenAccountOrNative: Address
Returns boolean
Static
load
load( __namedParameters: { connection: Connection ; decimals: number ; mint: Address ; owner: Address ; } ) : Promise < AssociatedToken >
Parameters
__namedParameters: { connection: Connection ; decimals: number ; mint: Address ; owner: Address ; }
connection: Connection
decimals: number
mint: Address
owner: Address
Static
load Aux
load Aux( connection: Connection , address: Address , decimals: number ) : Promise < AssociatedToken >
Parameters
connection: Connection
address: Address
decimals: number
Static
load Mint
load Mint( connection: Connection , mint: Address ) : Promise < undefined | Mint >
Parameters
connection: Connection
mint: Address
Returns Promise < undefined | Mint >
Static
load Multiple
load Multiple( __namedParameters: { connection: Connection ; decimals: number | number [] ; mints: Address [] ; owner: Address ; } ) : Promise < AssociatedToken [] >
Parameters
__namedParameters: { connection: Connection ; decimals: number | number [] ; mints: Address [] ; owner: Address ; }
connection: Connection
decimals: number | number []
mints: Address []
owner: Address
Static
load Multiple Aux
load Multiple Aux( __namedParameters: { addresses: Address [] ; connection: Connection ; decimals?: number | number [] ; } ) : Promise < AssociatedToken [] >
Parameters
__namedParameters: { addresses: Address [] ; connection: Connection ; decimals?: number | number [] ; }
addresses: Address []
connection: Connection
Optional
decimals?: number | number []
Static
load Multiple Or Native
load Multiple Or Native( __namedParameters: { connection: Connection ; decimals?: number | number [] ; mints?: Address [] ; owner: Address ; } ) : Promise < AssociatedToken [] >
Parameters
__namedParameters: { connection: Connection ; decimals?: number | number [] ; mints?: Address [] ; owner: Address ; }
connection: Connection
Optional
decimals?: number | number []
Optional
mints?: Address []
owner: Address
Static
with Begin Transfer From Source
with Begin Transfer From Source( __namedParameters: { feesBuffer: BN ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; source: Address | TokenFormat ; } ) : Promise < PublicKey >
Parameters
__namedParameters: { feesBuffer: BN ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; source: Address | TokenFormat ; }
fees Buffer: BN
instructions: TransactionInstruction []
mint: Address
provider: AnchorProvider
Returns Promise < PublicKey >
Static
with Begin Transfer To Destination
with Begin Transfer To Destination( __namedParameters: { destination: Address | TokenFormat ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; } ) : Promise < PublicKey >
Parameters
__namedParameters: { destination: Address | TokenFormat ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; }
destination: Address | TokenFormat
instructions: TransactionInstruction []
mint: Address
provider: AnchorProvider
Returns Promise < PublicKey >
Static
with Close
with Close( instructions: TransactionInstruction [] , owner: Address , mint: Address , rentDestination: Address ) : void
Parameters
instructions: TransactionInstruction []
owner: Address
mint: Address
rentDestination: Address
Returns void
Static
with Create
with Create( instructions: TransactionInstruction [] , provider: AnchorProvider , owner: Address , mint: Address ) : Promise < PublicKey >
Parameters
instructions: TransactionInstruction []
provider: AnchorProvider
owner: Address
mint: Address
Returns Promise < PublicKey >
Static
with Create Aux
with Create Aux( instructions: TransactionInstruction [] , provider: AnchorProvider , owner: Address , mint: Address , address: Address ) : Promise < void >
Parameters
instructions: TransactionInstruction []
provider: AnchorProvider
owner: Address
mint: Address
address: Address
Returns Promise < void >
Static
with Create Or Unwrap If Native Mint
with Create Or Unwrap If Native Mint( preInstructions: TransactionInstruction [] , postInstructions: TransactionInstruction [] , provider: AnchorProvider , mint: Address ) : Promise < PublicKey >
Parameters
preInstructions: TransactionInstruction []
postInstructions: TransactionInstruction []
provider: AnchorProvider
mint: Address
Returns Promise < PublicKey >
Static
with Create Or Wrap If Native Mint
with Create Or Wrap If Native Mint( instructions: TransactionInstruction [] , provider: AnchorProvider , mint: Address , feesBuffer: BN ) : Promise < PublicKey >
Parameters
instructions: TransactionInstruction []
provider: AnchorProvider
mint: Address
feesBuffer: BN
Returns Promise < PublicKey >
Static
with End Transfer
with End Transfer( __namedParameters: { destination: Address | TokenFormat ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; } ) : void
Parameters
__namedParameters: { destination: Address | TokenFormat ; instructions: TransactionInstruction [] ; mint: Address ; provider: AnchorProvider ; }
destination: Address | TokenFormat
instructions: TransactionInstruction []
mint: Address
provider: AnchorProvider
Returns void
Static
with Transfer
with Transfer( instructions: TransactionInstruction [] , mint: Address , sourceOwner: Address , destinationOwner: Address , amount: BN ) : void
Parameters
instructions: TransactionInstruction []
mint: Address
sourceOwner: Address
destinationOwner: Address
amount: BN
Returns void
Static
with Unwrap If Native Mint
with Unwrap If Native Mint( instructions: TransactionInstruction [] , owner: Address , mint: Address ) : void
Parameters
instructions: TransactionInstruction []
owner: Address
mint: Address
Returns void
Static
with Unwrap Native
with Unwrap Native( instructions: TransactionInstruction [] , owner: Address ) : void
Parameters
instructions: TransactionInstruction []
owner: Address
Returns void
Static
with Wrap If Native Mint
with Wrap If Native Mint( instructions: TransactionInstruction [] , provider: AnchorProvider , mint: Address , feesBuffer: BN ) : Promise < PublicKey >
Parameters
instructions: TransactionInstruction []
provider: AnchorProvider
mint: Address
feesBuffer: BN
Returns Promise < PublicKey >
Static
with Wrap Native
with Wrap Native( instructions: TransactionInstruction [] , provider: AnchorProvider , feesBuffer: BN ) : Promise < PublicKey >
Parameters
instructions: TransactionInstruction []
provider: AnchorProvider
feesBuffer: BN
Returns Promise < PublicKey >
Static
zero
zero( mint: Address , owner: Address , decimals: number ) : AssociatedToken
Parameters
mint: Address
owner: Address
decimals: number
Static
zero Aux
zero Aux( address: Address , decimals: number ) : AssociatedToken
Parameters
address: Address
decimals: number
Creates an instance of AssociatedToken.
Memberof
AssociatedToken