UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

63 lines 4.5 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 IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type Option, type OptionOrNullable, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const INITIALIZE_TRANSFER_FEE_CONFIG_DISCRIMINATOR = 26; export declare function getInitializeTransferFeeConfigDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const INITIALIZE_TRANSFER_FEE_CONFIG_TRANSFER_FEE_DISCRIMINATOR = 0; export declare function getInitializeTransferFeeConfigTransferFeeDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type InitializeTransferFeeConfigInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMint extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint, ...TRemainingAccounts ]>; export type InitializeTransferFeeConfigInstructionData = { discriminator: number; transferFeeDiscriminator: number; /** Pubkey that may update the fees. */ transferFeeConfigAuthority: Option<Address>; /** Withdraw instructions must be signed by this key. */ withdrawWithheldAuthority: Option<Address>; /** Amount of transfer collected as fees, expressed as basis points of the transfer amount. */ transferFeeBasisPoints: number; /** Maximum fee assessed on transfers. */ maximumFee: bigint; }; export type InitializeTransferFeeConfigInstructionDataArgs = { /** Pubkey that may update the fees. */ transferFeeConfigAuthority: OptionOrNullable<Address>; /** Withdraw instructions must be signed by this key. */ withdrawWithheldAuthority: OptionOrNullable<Address>; /** Amount of transfer collected as fees, expressed as basis points of the transfer amount. */ transferFeeBasisPoints: number; /** Maximum fee assessed on transfers. */ maximumFee: number | bigint; }; export declare function getInitializeTransferFeeConfigInstructionDataEncoder(): Encoder<InitializeTransferFeeConfigInstructionDataArgs>; export declare function getInitializeTransferFeeConfigInstructionDataDecoder(): Decoder<InitializeTransferFeeConfigInstructionData>; export declare function getInitializeTransferFeeConfigInstructionDataCodec(): Codec<InitializeTransferFeeConfigInstructionDataArgs, InitializeTransferFeeConfigInstructionData>; export type InitializeTransferFeeConfigInput<TAccountMint extends string = string> = { /** The mint to initialize. */ mint: Address<TAccountMint>; transferFeeConfigAuthority: InitializeTransferFeeConfigInstructionDataArgs['transferFeeConfigAuthority']; withdrawWithheldAuthority: InitializeTransferFeeConfigInstructionDataArgs['withdrawWithheldAuthority']; transferFeeBasisPoints: InitializeTransferFeeConfigInstructionDataArgs['transferFeeBasisPoints']; maximumFee: InitializeTransferFeeConfigInstructionDataArgs['maximumFee']; }; export declare function getInitializeTransferFeeConfigInstruction<TAccountMint extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: InitializeTransferFeeConfigInput<TAccountMint>, config?: { programAddress?: TProgramAddress; }): InitializeTransferFeeConfigInstruction<TProgramAddress, TAccountMint>; export type ParsedInitializeTransferFeeConfigInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The mint to initialize. */ mint: TAccountMetas[0]; }; data: InitializeTransferFeeConfigInstructionData; }; export declare function parseInitializeTransferFeeConfigInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedInitializeTransferFeeConfigInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=initializeTransferFeeConfig.d.ts.map