@nosana/kit
Version:
Nosana KIT
70 lines (69 loc) • 5.2 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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit';
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from '../programs/index.js';
export declare const CLAWBACK_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getClawbackDiscriminatorBytes(): ReadonlyUint8Array;
export type ClawbackInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountDistributor extends string | AccountMeta<string> = string, TAccountFrom extends string | AccountMeta<string> = string, TAccountTo extends string | AccountMeta<string> = string, TAccountClaimant extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountDistributor extends string ? WritableAccount<TAccountDistributor> : TAccountDistributor,
TAccountFrom extends string ? WritableAccount<TAccountFrom> : TAccountFrom,
TAccountTo extends string ? WritableAccount<TAccountTo> : TAccountTo,
TAccountClaimant extends string ? ReadonlySignerAccount<TAccountClaimant> & AccountSignerMeta<TAccountClaimant> : TAccountClaimant,
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
export type ClawbackInstructionData = {
discriminator: ReadonlyUint8Array;
};
export type ClawbackInstructionDataArgs = {};
export declare function getClawbackInstructionDataEncoder(): FixedSizeEncoder<ClawbackInstructionDataArgs>;
export declare function getClawbackInstructionDataDecoder(): FixedSizeDecoder<ClawbackInstructionData>;
export declare function getClawbackInstructionDataCodec(): FixedSizeCodec<ClawbackInstructionDataArgs, ClawbackInstructionData>;
export type ClawbackInput<TAccountDistributor extends string = string, TAccountFrom extends string = string, TAccountTo extends string = string, TAccountClaimant extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
/** The [MerkleDistributor]. */
distributor: Address<TAccountDistributor>;
/** Distributor ATA containing the tokens to distribute. */
from: Address<TAccountFrom>;
/** The Clawback token account. */
to: Address<TAccountTo>;
/**
* Claimant account
* Anyone can claw back the funds
*/
claimant: TransactionSigner<TAccountClaimant>;
/** The [System] program. */
systemProgram?: Address<TAccountSystemProgram>;
/** SPL [Token] program. */
tokenProgram?: Address<TAccountTokenProgram>;
};
export declare function getClawbackInstruction<TAccountDistributor extends string, TAccountFrom extends string, TAccountTo extends string, TAccountClaimant extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS>(input: ClawbackInput<TAccountDistributor, TAccountFrom, TAccountTo, TAccountClaimant, TAccountSystemProgram, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): ClawbackInstruction<TProgramAddress, TAccountDistributor, TAccountFrom, TAccountTo, TAccountClaimant, TAccountSystemProgram, TAccountTokenProgram>;
export type ParsedClawbackInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
/** The [MerkleDistributor]. */
distributor: TAccountMetas[0];
/** Distributor ATA containing the tokens to distribute. */
from: TAccountMetas[1];
/** The Clawback token account. */
to: TAccountMetas[2];
/**
* Claimant account
* Anyone can claw back the funds
*/
claimant: TAccountMetas[3];
/** The [System] program. */
systemProgram: TAccountMetas[4];
/** SPL [Token] program. */
tokenProgram: TAccountMetas[5];
};
data: ClawbackInstructionData;
};
export declare function parseClawbackInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClawbackInstruction<TProgram, TAccountMetas>;