UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

62 lines 4.76 kB
/** * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun codama to update it. * * @see https://github.com/codama-idl/codama */ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const INITIALIZE_TOKEN_METADATA_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getInitializeTokenMetadataDiscriminatorBytes(): ReadonlyUint8Array; export type InitializeTokenMetadataInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetadata extends string | IAccountMeta<string> = string, TAccountUpdateAuthority extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountMintAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountMetadata extends string ? WritableAccount<TAccountMetadata> : TAccountMetadata, TAccountUpdateAuthority extends string ? ReadonlyAccount<TAccountUpdateAuthority> : TAccountUpdateAuthority, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountMintAuthority extends string ? ReadonlySignerAccount<TAccountMintAuthority> & IAccountSignerMeta<TAccountMintAuthority> : TAccountMintAuthority, ...TRemainingAccounts ]>; export type InitializeTokenMetadataInstructionData = { discriminator: ReadonlyUint8Array; /** Longer name of the token. */ name: string; /** Shortened symbol of the token. */ symbol: string; /** URI pointing to more metadata (image, video, etc.). */ uri: string; }; export type InitializeTokenMetadataInstructionDataArgs = { /** Longer name of the token. */ name: string; /** Shortened symbol of the token. */ symbol: string; /** URI pointing to more metadata (image, video, etc.). */ uri: string; }; export declare function getInitializeTokenMetadataInstructionDataEncoder(): Encoder<InitializeTokenMetadataInstructionDataArgs>; export declare function getInitializeTokenMetadataInstructionDataDecoder(): Decoder<InitializeTokenMetadataInstructionData>; export declare function getInitializeTokenMetadataInstructionDataCodec(): Codec<InitializeTokenMetadataInstructionDataArgs, InitializeTokenMetadataInstructionData>; export type InitializeTokenMetadataInput<TAccountMetadata extends string = string, TAccountUpdateAuthority extends string = string, TAccountMint extends string = string, TAccountMintAuthority extends string = string> = { metadata: Address<TAccountMetadata>; updateAuthority: Address<TAccountUpdateAuthority>; mint: Address<TAccountMint>; mintAuthority: TransactionSigner<TAccountMintAuthority>; name: InitializeTokenMetadataInstructionDataArgs['name']; symbol: InitializeTokenMetadataInstructionDataArgs['symbol']; uri: InitializeTokenMetadataInstructionDataArgs['uri']; }; export declare function getInitializeTokenMetadataInstruction<TAccountMetadata extends string, TAccountUpdateAuthority extends string, TAccountMint extends string, TAccountMintAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeTokenMetadataInput<TAccountMetadata, TAccountUpdateAuthority, TAccountMint, TAccountMintAuthority>, config?: { programAddress?: TProgramAddress; }): InitializeTokenMetadataInstruction<TProgramAddress, TAccountMetadata, TAccountUpdateAuthority, TAccountMint, TAccountMintAuthority>; export type ParsedInitializeTokenMetadataInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { metadata: TAccountMetas[0]; updateAuthority: TAccountMetas[1]; mint: TAccountMetas[2]; mintAuthority: TAccountMetas[3]; }; data: InitializeTokenMetadataInstructionData; }; export declare function parseInitializeTokenMetadataInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeTokenMetadataInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializeTokenMetadata.d.ts.map