gill
Version:
a modern javascript/typescript client library for interacting with the Solana blockchain
63 lines • 2.18 kB
TypeScript
import type { Address, IInstruction, KeyPairSigner, TransactionSigner } from "@solana/kit";
import type { TokenInstructionBase } from "./types";
export type GetCreateTokenInstructionsArgs = TokenInstructionBase<KeyPairSigner> & {
/**
* The number of decimal places this token should have
*
* @default `9` - the most commonly used decimals value
**/
decimals?: bigint | number;
/**
* Authority address that is allowed to mint new tokens
*
* When not provided, defaults to: `feePayer`
**/
mintAuthority?: TransactionSigner;
/**
* Authority address that is able to freeze (and thaw) user owned token accounts.
* When a user's token account is frozen, they will not be able to transfer their tokens.
*
* When not provided, defaults to: `null`
**/
freezeAuthority?: Address | TransactionSigner;
/**
* Authority address that is allowed to update the metadata
*
* When not provided, defaults to: `feePayer`
**/
updateAuthority?: TransactionSigner;
/**
* Optional (but highly recommended) metadata to attach to this token
*/
metadata: {
/** Name of this token */
name: string;
/** Symbol for this token */
symbol: string;
/** URI pointing to additional metadata for this token. Typically an offchain json file. */
uri: string;
/** Whether or not the onchain metadata will be editable after minting */
isMutable: boolean;
};
/**
* Metadata address for this token
*
* @example
* For `TOKEN_PROGRAM_ADDRESS` use the {@link getTokenMetadataAddress} function:
* ```
* metadataAddress: await getTokenMetadataAddress(mint.address);
* ```
*
* @example
* For `TOKEN_2022_PROGRAM_ADDRESS` use the mint's address:
* ```
* metadataAddress: mint.address;
* ```
* */
metadataAddress: Address;
};
/**
* Create the instructions required to initialize a new token's mint
*/
export declare function getCreateTokenInstructions(args: GetCreateTokenInstructionsArgs): IInstruction[];
//# sourceMappingURL=create-token.d.ts.map