@nosana/kit
Version:
Nosana KIT
70 lines (69 loc) • 5.33 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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
import { MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS } from '../programs/index.js';
export declare const CLAIM_LOCKED_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getClaimLockedDiscriminatorBytes(): ReadonlyUint8Array;
export type ClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountDistributor extends string | AccountMeta<string> = string, TAccountClaimStatus extends string | AccountMeta<string> = string, TAccountFrom extends string | AccountMeta<string> = string, TAccountTo extends string | AccountMeta<string> = string, TAccountClaimant extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountDistributor extends string ? WritableAccount<TAccountDistributor> : TAccountDistributor,
TAccountClaimStatus extends string ? WritableAccount<TAccountClaimStatus> : TAccountClaimStatus,
TAccountFrom extends string ? WritableAccount<TAccountFrom> : TAccountFrom,
TAccountTo extends string ? WritableAccount<TAccountTo> : TAccountTo,
TAccountClaimant extends string ? WritableSignerAccount<TAccountClaimant> & AccountSignerMeta<TAccountClaimant> : TAccountClaimant,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
export type ClaimLockedInstructionData = {
discriminator: ReadonlyUint8Array;
};
export type ClaimLockedInstructionDataArgs = {};
export declare function getClaimLockedInstructionDataEncoder(): FixedSizeEncoder<ClaimLockedInstructionDataArgs>;
export declare function getClaimLockedInstructionDataDecoder(): FixedSizeDecoder<ClaimLockedInstructionData>;
export declare function getClaimLockedInstructionDataCodec(): FixedSizeCodec<ClaimLockedInstructionDataArgs, ClaimLockedInstructionData>;
export type ClaimLockedInput<TAccountDistributor extends string = string, TAccountClaimStatus extends string = string, TAccountFrom extends string = string, TAccountTo extends string = string, TAccountClaimant extends string = string, TAccountTokenProgram extends string = string> = {
/** The [MerkleDistributor]. */
distributor: Address<TAccountDistributor>;
/** Claim Status PDA */
claimStatus: Address<TAccountClaimStatus>;
/** Distributor ATA containing the tokens to distribute. */
from: Address<TAccountFrom>;
/**
* Account to send the claimed tokens to.
* Claimant must sign the transaction and can only claim on behalf of themself
*/
to: Address<TAccountTo>;
/** Who is claiming the tokens. */
claimant: TransactionSigner<TAccountClaimant>;
/** SPL [Token] program. */
tokenProgram?: Address<TAccountTokenProgram>;
};
export declare function getClaimLockedInstruction<TAccountDistributor extends string, TAccountClaimStatus extends string, TAccountFrom extends string, TAccountTo extends string, TAccountClaimant extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS>(input: ClaimLockedInput<TAccountDistributor, TAccountClaimStatus, TAccountFrom, TAccountTo, TAccountClaimant, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): ClaimLockedInstruction<TProgramAddress, TAccountDistributor, TAccountClaimStatus, TAccountFrom, TAccountTo, TAccountClaimant, TAccountTokenProgram>;
export type ParsedClaimLockedInstruction<TProgram extends string = typeof MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
/** The [MerkleDistributor]. */
distributor: TAccountMetas[0];
/** Claim Status PDA */
claimStatus: TAccountMetas[1];
/** Distributor ATA containing the tokens to distribute. */
from: TAccountMetas[2];
/**
* Account to send the claimed tokens to.
* Claimant must sign the transaction and can only claim on behalf of themself
*/
to: TAccountMetas[3];
/** Who is claiming the tokens. */
claimant: TAccountMetas[4];
/** SPL [Token] program. */
tokenProgram: TAccountMetas[5];
};
data: ClaimLockedInstructionData;
};
export declare function parseClaimLockedInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimLockedInstruction<TProgram, TAccountMetas>;