UNPKG

gill

Version:

a modern javascript/typescript client library for interacting with the Solana blockchain

81 lines 6.61 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 Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, type ReadonlyUint8Array } from "@solana/codecs"; import type { Address, IAccountMeta, IAccountSignerMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData, ReadonlyAccount, ReadonlySignerAccount, TransactionSigner, WritableAccount, WritableSignerAccount } from "@solana/kit"; import { TOKEN_METADATA_PROGRAM_ADDRESS } from "../programs"; import { type CollectionDetails, type CollectionDetailsArgs, type DataV2, type DataV2Args } from "../types"; export declare const CREATE_METADATA_ACCOUNT_V3_DISCRIMINATOR = 33; export declare function getCreateMetadataAccountV3DiscriminatorBytes(): ReadonlyUint8Array; export type CreateMetadataAccountV3Instruction<TProgram extends string = typeof TOKEN_METADATA_PROGRAM_ADDRESS, TAccountMetadata extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountMintAuthority extends string | IAccountMeta<string> = string, TAccountPayer extends string | IAccountMeta<string> = string, TAccountUpdateAuthority extends string | IAccountMeta<string> = string, TAccountSystemProgram extends string | IAccountMeta<string> = "11111111111111111111111111111111", TAccountRent extends string | IAccountMeta<string> | undefined = undefined, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountMetadata extends string ? WritableAccount<TAccountMetadata> : TAccountMetadata, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountMintAuthority extends string ? ReadonlySignerAccount<TAccountMintAuthority> & IAccountSignerMeta<TAccountMintAuthority> : TAccountMintAuthority, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & IAccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountUpdateAuthority extends string ? ReadonlyAccount<TAccountUpdateAuthority> : TAccountUpdateAuthority, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...(TAccountRent extends undefined ? [] : [TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent]), ...TRemainingAccounts ]>; export type CreateMetadataAccountV3InstructionData = { discriminator: number; data: DataV2; isMutable: boolean; collectionDetails: Option<CollectionDetails>; }; export type CreateMetadataAccountV3InstructionDataArgs = { data: DataV2Args; isMutable: boolean; collectionDetails: OptionOrNullable<CollectionDetailsArgs>; }; export declare function getCreateMetadataAccountV3InstructionDataEncoder(): Encoder<CreateMetadataAccountV3InstructionDataArgs>; export declare function getCreateMetadataAccountV3InstructionDataDecoder(): Decoder<CreateMetadataAccountV3InstructionData>; export declare function getCreateMetadataAccountV3InstructionDataCodec(): Codec<CreateMetadataAccountV3InstructionDataArgs, CreateMetadataAccountV3InstructionData>; export type CreateMetadataAccountV3Input<TAccountMetadata extends string = string, TAccountMint extends string = string, TAccountMintAuthority extends string = string, TAccountPayer extends string = string, TAccountUpdateAuthority extends string = string, TAccountSystemProgram extends string = string, TAccountRent extends string = string> = { /** Metadata key (pda of ['metadata', program id, mint id]) */ metadata: Address<TAccountMetadata>; /** Mint of token asset */ mint: Address<TAccountMint>; /** Mint authority */ mintAuthority: TransactionSigner<TAccountMintAuthority>; /** payer */ payer: TransactionSigner<TAccountPayer>; /** update authority info */ updateAuthority: Address<TAccountUpdateAuthority> | TransactionSigner<TAccountUpdateAuthority>; /** System program */ systemProgram?: Address<TAccountSystemProgram>; /** Rent info */ rent?: Address<TAccountRent>; data: CreateMetadataAccountV3InstructionDataArgs["data"]; isMutable: CreateMetadataAccountV3InstructionDataArgs["isMutable"]; collectionDetails: CreateMetadataAccountV3InstructionDataArgs["collectionDetails"]; }; export declare function getCreateMetadataAccountV3Instruction<TAccountMetadata extends string, TAccountMint extends string, TAccountMintAuthority extends string, TAccountPayer extends string, TAccountUpdateAuthority extends string, TAccountSystemProgram extends string, TAccountRent extends string, TProgramAddress extends Address = typeof TOKEN_METADATA_PROGRAM_ADDRESS>(input: CreateMetadataAccountV3Input<TAccountMetadata, TAccountMint, TAccountMintAuthority, TAccountPayer, TAccountUpdateAuthority, TAccountSystemProgram, TAccountRent>, config?: { programAddress?: TProgramAddress; }): CreateMetadataAccountV3Instruction<TProgramAddress, TAccountMetadata, TAccountMint, TAccountMintAuthority, TAccountPayer, (typeof input)["updateAuthority"] extends TransactionSigner<TAccountUpdateAuthority> ? ReadonlySignerAccount<TAccountUpdateAuthority> & IAccountSignerMeta<TAccountUpdateAuthority> : TAccountUpdateAuthority, TAccountSystemProgram, TAccountRent>; export type ParsedCreateMetadataAccountV3Instruction<TProgram extends string = typeof TOKEN_METADATA_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** Metadata key (pda of ['metadata', program id, mint id]) */ metadata: TAccountMetas[0]; /** Mint of token asset */ mint: TAccountMetas[1]; /** Mint authority */ mintAuthority: TAccountMetas[2]; /** payer */ payer: TAccountMetas[3]; /** update authority info */ updateAuthority: TAccountMetas[4]; /** System program */ systemProgram: TAccountMetas[5]; /** Rent info */ rent?: TAccountMetas[6] | undefined; }; data: CreateMetadataAccountV3InstructionData; }; export declare function parseCreateMetadataAccountV3Instruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedCreateMetadataAccountV3Instruction<TProgram, TAccountMetas>; //# sourceMappingURL=createMetadataAccountV3.d.ts.map