@solana-program/token-2022
Version:
JavaScript client for the Token 2022 program
59 lines • 5.17 kB
TypeScript
/**
* 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 TransactionSigner, type WritableAccount } from '@solana/kit';
import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs';
export declare const WITHDRAW_WITHHELD_TOKENS_FROM_MINT_DISCRIMINATOR = 26;
export declare function getWithdrawWithheldTokensFromMintDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export declare const WITHDRAW_WITHHELD_TOKENS_FROM_MINT_TRANSFER_FEE_DISCRIMINATOR = 2;
export declare function getWithdrawWithheldTokensFromMintTransferFeeDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export type WithdrawWithheldTokensFromMintInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMint extends string | IAccountMeta<string> = string, TAccountFeeReceiver extends string | IAccountMeta<string> = string, TAccountWithdrawWithheldAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
TAccountMint extends string ? WritableAccount<TAccountMint> : TAccountMint,
TAccountFeeReceiver extends string ? WritableAccount<TAccountFeeReceiver> : TAccountFeeReceiver,
TAccountWithdrawWithheldAuthority extends string ? ReadonlyAccount<TAccountWithdrawWithheldAuthority> : TAccountWithdrawWithheldAuthority,
...TRemainingAccounts
]>;
export type WithdrawWithheldTokensFromMintInstructionData = {
discriminator: number;
transferFeeDiscriminator: number;
};
export type WithdrawWithheldTokensFromMintInstructionDataArgs = {};
export declare function getWithdrawWithheldTokensFromMintInstructionDataEncoder(): Encoder<WithdrawWithheldTokensFromMintInstructionDataArgs>;
export declare function getWithdrawWithheldTokensFromMintInstructionDataDecoder(): Decoder<WithdrawWithheldTokensFromMintInstructionData>;
export declare function getWithdrawWithheldTokensFromMintInstructionDataCodec(): Codec<WithdrawWithheldTokensFromMintInstructionDataArgs, WithdrawWithheldTokensFromMintInstructionData>;
export type WithdrawWithheldTokensFromMintInput<TAccountMint extends string = string, TAccountFeeReceiver extends string = string, TAccountWithdrawWithheldAuthority extends string = string> = {
/** The token mint. Must include the `TransferFeeConfig` extension. */
mint: Address<TAccountMint>;
/**
* The fee receiver account. Must include the `TransferFeeAmount`
* extension associated with the provided mint.
*/
feeReceiver: Address<TAccountFeeReceiver>;
/** The mint's `withdraw_withheld_authority` or its multisignature account. */
withdrawWithheldAuthority: Address<TAccountWithdrawWithheldAuthority> | TransactionSigner<TAccountWithdrawWithheldAuthority>;
multiSigners?: Array<TransactionSigner>;
};
export declare function getWithdrawWithheldTokensFromMintInstruction<TAccountMint extends string, TAccountFeeReceiver extends string, TAccountWithdrawWithheldAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: WithdrawWithheldTokensFromMintInput<TAccountMint, TAccountFeeReceiver, TAccountWithdrawWithheldAuthority>, config?: {
programAddress?: TProgramAddress;
}): WithdrawWithheldTokensFromMintInstruction<TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner<TAccountWithdrawWithheldAuthority> ? ReadonlySignerAccount<TAccountWithdrawWithheldAuthority> & IAccountSignerMeta<TAccountWithdrawWithheldAuthority> : TAccountWithdrawWithheldAuthority>;
export type ParsedWithdrawWithheldTokensFromMintInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
/** The token mint. Must include the `TransferFeeConfig` extension. */
mint: TAccountMetas[0];
/**
* The fee receiver account. Must include the `TransferFeeAmount`
* extension associated with the provided mint.
*/
feeReceiver: TAccountMetas[1];
/** The mint's `withdraw_withheld_authority` or its multisignature account. */
withdrawWithheldAuthority: TAccountMetas[2];
};
data: WithdrawWithheldTokensFromMintInstructionData;
};
export declare function parseWithdrawWithheldTokensFromMintInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedWithdrawWithheldTokensFromMintInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=withdrawWithheldTokensFromMint.d.ts.map