@solana-program/token-2022
Version:
JavaScript client for the Token 2022 program
66 lines • 5.54 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_ACCOUNTS_DISCRIMINATOR = 26;
export declare function getWithdrawWithheldTokensFromAccountsDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export declare const WITHDRAW_WITHHELD_TOKENS_FROM_ACCOUNTS_TRANSFER_FEE_DISCRIMINATOR = 3;
export declare function getWithdrawWithheldTokensFromAccountsTransferFeeDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array;
export type WithdrawWithheldTokensFromAccountsInstruction<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 ? ReadonlyAccount<TAccountMint> : TAccountMint,
TAccountFeeReceiver extends string ? WritableAccount<TAccountFeeReceiver> : TAccountFeeReceiver,
TAccountWithdrawWithheldAuthority extends string ? ReadonlyAccount<TAccountWithdrawWithheldAuthority> : TAccountWithdrawWithheldAuthority,
...TRemainingAccounts
]>;
export type WithdrawWithheldTokensFromAccountsInstructionData = {
discriminator: number;
transferFeeDiscriminator: number;
/** Number of token accounts harvested. */
numTokenAccounts: number;
};
export type WithdrawWithheldTokensFromAccountsInstructionDataArgs = {
/** Number of token accounts harvested. */
numTokenAccounts: number;
};
export declare function getWithdrawWithheldTokensFromAccountsInstructionDataEncoder(): Encoder<WithdrawWithheldTokensFromAccountsInstructionDataArgs>;
export declare function getWithdrawWithheldTokensFromAccountsInstructionDataDecoder(): Decoder<WithdrawWithheldTokensFromAccountsInstructionData>;
export declare function getWithdrawWithheldTokensFromAccountsInstructionDataCodec(): Codec<WithdrawWithheldTokensFromAccountsInstructionDataArgs, WithdrawWithheldTokensFromAccountsInstructionData>;
export type WithdrawWithheldTokensFromAccountsInput<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>;
numTokenAccounts: WithdrawWithheldTokensFromAccountsInstructionDataArgs['numTokenAccounts'];
multiSigners?: Array<TransactionSigner>;
sources: Array<Address>;
};
export declare function getWithdrawWithheldTokensFromAccountsInstruction<TAccountMint extends string, TAccountFeeReceiver extends string, TAccountWithdrawWithheldAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: WithdrawWithheldTokensFromAccountsInput<TAccountMint, TAccountFeeReceiver, TAccountWithdrawWithheldAuthority>, config?: {
programAddress?: TProgramAddress;
}): WithdrawWithheldTokensFromAccountsInstruction<TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner<TAccountWithdrawWithheldAuthority> ? ReadonlySignerAccount<TAccountWithdrawWithheldAuthority> & IAccountSignerMeta<TAccountWithdrawWithheldAuthority> : TAccountWithdrawWithheldAuthority>;
export type ParsedWithdrawWithheldTokensFromAccountsInstruction<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: WithdrawWithheldTokensFromAccountsInstructionData;
};
export declare function parseWithdrawWithheldTokensFromAccountsInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedWithdrawWithheldTokensFromAccountsInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=withdrawWithheldTokensFromAccounts.d.ts.map