buildCreateTokenTransaction
Call Signature
Create a transaction that can create a token with metadata
The transaction has the following defaults:
- Default
version
=legacy
- Default
computeUnitLimit
:- for TOKEN_PROGRAM_ADDRESS =>
60_000
- for TOKEN_2022_PROGRAM_ADDRESS =>
10_000
- for TOKEN_PROGRAM_ADDRESS =>
Example
Type Parameters
Type Parameter | Default type |
---|---|
TVersion extends TransactionVersion | "legacy" |
TFeePayer extends TransactionSigner | TransactionSigner |
Parameters
Parameter | Type |
---|---|
args | { computeUnitLimit? : number | bigint ; computeUnitPrice? : number | bigint ; latestBlockhash? : undefined ; version? : TVersion ; } & { decimals? : number | bigint ; feePayer : Address | TransactionSigner ; freezeAuthority? : Address | TransactionSigner ; metadata : { isMutable : boolean ; name : string ; symbol : string ; uri : string ; }; metadataAddress? : Address ; mint : KeyPairSigner ; mintAuthority? : TransactionSigner ; tokenProgram? : Address ; updateAuthority? : TransactionSigner ; } |
Returns
Promise
<{
feePayer
: Readonly
<{
address
: Address
<TAddress
>;
}>;
instructions
: readonly IInstruction
<string
, readonly (IAccountLookupMeta
<string
, string
> | IAccountMeta
<string
>)[]>[];
version
: TVersion
;
}>
Call Signature
Create a transaction that can create a token with metadata
The transaction has the following defaults:
- Default
version
=legacy
- Default
computeUnitLimit
:- for TOKEN_PROGRAM_ADDRESS =>
60_000
- for TOKEN_2022_PROGRAM_ADDRESS =>
10_000
- for TOKEN_PROGRAM_ADDRESS =>
Example
Type Parameters
Type Parameter | Default type |
---|---|
TVersion extends TransactionVersion | "legacy" |
TFeePayer extends TransactionSigner | TransactionSigner |
TLifetimeConstraint extends Readonly <{ blockhash : Blockhash ; lastValidBlockHeight : bigint ; }> | Readonly <{ blockhash : Blockhash ; lastValidBlockHeight : bigint ; }> |
Parameters
Parameter | Type |
---|---|
args | { computeUnitLimit? : number | bigint ; computeUnitPrice? : number | bigint ; latestBlockhash? : TLifetimeConstraint ; version? : TVersion ; } & { decimals? : number | bigint ; feePayer : Address | TransactionSigner ; freezeAuthority? : Address | TransactionSigner ; metadata : { isMutable : boolean ; name : string ; symbol : string ; uri : string ; }; metadataAddress? : Address ; mint : KeyPairSigner ; mintAuthority? : TransactionSigner ; tokenProgram? : Address ; updateAuthority? : TransactionSigner ; } |
Returns
Promise
<{
feePayer
: Readonly
<{
address
: Address
<TAddress
>;
}>;
instructions
: readonly IInstruction
<string
, readonly (IAccountLookupMeta
<string
, string
> | IAccountMeta
<string
>)[]>[];
lifetimeConstraint
: BlockhashLifetimeConstraint
;
version
: TVersion
;
}>