UNPKG

@nosana/kit

Version:

Nosana KIT

114 lines (113 loc) 5.72 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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit'; export declare const MERKLE_DISTRIBUTOR_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getMerkleDistributorDiscriminatorBytes(): ReadonlyUint8Array; /** State for the account which distributes tokens. */ export type MerkleDistributor = { discriminator: ReadonlyUint8Array; /** Bump seed. */ bump: number; /** Version of the airdrop */ version: bigint; /** The 256-bit merkle root. */ root: ReadonlyUint8Array; /** [Mint] of the token to be distributed. */ mint: Address; /** Token Address of the vault */ tokenVault: Address; /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */ maxTotalClaim: bigint; /** Maximum number of nodes in [MerkleDistributor]. */ maxNumNodes: bigint; /** Total amount of tokens that have been claimed. */ totalAmountClaimed: bigint; /** Total amount of tokens that have been forgone. */ totalAmountForgone: bigint; /** Number of nodes that have been claimed. */ numNodesClaimed: bigint; /** Lockup time start (Unix Timestamp) */ startTs: bigint; /** Lockup time end (Unix Timestamp) */ endTs: bigint; /** Clawback start (Unix Timestamp) */ clawbackStartTs: bigint; /** Clawback receiver */ clawbackReceiver: Address; /** Admin wallet */ admin: Address; /** Whether or not the distributor has been clawed back */ clawedBack: boolean; /** this merkle tree is enable from this slot */ enableSlot: bigint; /** indicate that whether admin can close this pool, for testing purpose */ closable: boolean; /** Buffer 0 */ buffer0: ReadonlyUint8Array; /** Buffer 1 */ buffer1: ReadonlyUint8Array; /** Buffer 2 */ buffer2: ReadonlyUint8Array; }; export type MerkleDistributorArgs = { /** Bump seed. */ bump: number; /** Version of the airdrop */ version: number | bigint; /** The 256-bit merkle root. */ root: ReadonlyUint8Array; /** [Mint] of the token to be distributed. */ mint: Address; /** Token Address of the vault */ tokenVault: Address; /** Maximum number of tokens that can ever be claimed from this [MerkleDistributor]. */ maxTotalClaim: number | bigint; /** Maximum number of nodes in [MerkleDistributor]. */ maxNumNodes: number | bigint; /** Total amount of tokens that have been claimed. */ totalAmountClaimed: number | bigint; /** Total amount of tokens that have been forgone. */ totalAmountForgone: number | bigint; /** Number of nodes that have been claimed. */ numNodesClaimed: number | bigint; /** Lockup time start (Unix Timestamp) */ startTs: number | bigint; /** Lockup time end (Unix Timestamp) */ endTs: number | bigint; /** Clawback start (Unix Timestamp) */ clawbackStartTs: number | bigint; /** Clawback receiver */ clawbackReceiver: Address; /** Admin wallet */ admin: Address; /** Whether or not the distributor has been clawed back */ clawedBack: boolean; /** this merkle tree is enable from this slot */ enableSlot: number | bigint; /** indicate that whether admin can close this pool, for testing purpose */ closable: boolean; /** Buffer 0 */ buffer0: ReadonlyUint8Array; /** Buffer 1 */ buffer1: ReadonlyUint8Array; /** Buffer 2 */ buffer2: ReadonlyUint8Array; }; /** Gets the encoder for {@link MerkleDistributorArgs} account data. */ export declare function getMerkleDistributorEncoder(): FixedSizeEncoder<MerkleDistributorArgs>; /** Gets the decoder for {@link MerkleDistributor} account data. */ export declare function getMerkleDistributorDecoder(): FixedSizeDecoder<MerkleDistributor>; /** Gets the codec for {@link MerkleDistributor} account data. */ export declare function getMerkleDistributorCodec(): FixedSizeCodec<MerkleDistributorArgs, MerkleDistributor>; export declare function decodeMerkleDistributor<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<MerkleDistributor, TAddress>; export declare function decodeMerkleDistributor<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<MerkleDistributor, TAddress>; export declare function fetchMerkleDistributor<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<MerkleDistributor, TAddress>>; export declare function fetchMaybeMerkleDistributor<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<MerkleDistributor, TAddress>>; export declare function fetchAllMerkleDistributor(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<MerkleDistributor>[]>; export declare function fetchAllMaybeMerkleDistributor(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<MerkleDistributor>[]>; export declare function getMerkleDistributorSize(): number;