UNPKG

@nosana/kit

Version:

Nosana KIT

58 lines (57 loc) 3.55 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 CLAIM_STATUS_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getClaimStatusDiscriminatorBytes(): ReadonlyUint8Array; /** Holds whether or not a claimant has claimed tokens. */ export type ClaimStatus = { discriminator: ReadonlyUint8Array; /** Authority that claimed the tokens. */ claimant: Address; /** Locked amount */ lockedAmount: bigint; /** Locked amount withdrawn */ lockedAmountWithdrawn: bigint; /** Unlocked amount */ unlockedAmount: bigint; /** Unlocked amount claimed */ unlockedAmountClaimed: bigint; /** indicate that whether admin can close this account, for testing purpose */ closable: boolean; /** admin of merkle tree, store for for testing purpose */ distributor: Address; }; export type ClaimStatusArgs = { /** Authority that claimed the tokens. */ claimant: Address; /** Locked amount */ lockedAmount: number | bigint; /** Locked amount withdrawn */ lockedAmountWithdrawn: number | bigint; /** Unlocked amount */ unlockedAmount: number | bigint; /** Unlocked amount claimed */ unlockedAmountClaimed: number | bigint; /** indicate that whether admin can close this account, for testing purpose */ closable: boolean; /** admin of merkle tree, store for for testing purpose */ distributor: Address; }; /** Gets the encoder for {@link ClaimStatusArgs} account data. */ export declare function getClaimStatusEncoder(): FixedSizeEncoder<ClaimStatusArgs>; /** Gets the decoder for {@link ClaimStatus} account data. */ export declare function getClaimStatusDecoder(): FixedSizeDecoder<ClaimStatus>; /** Gets the codec for {@link ClaimStatus} account data. */ export declare function getClaimStatusCodec(): FixedSizeCodec<ClaimStatusArgs, ClaimStatus>; export declare function decodeClaimStatus<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ClaimStatus, TAddress>; export declare function decodeClaimStatus<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ClaimStatus, TAddress>; export declare function fetchClaimStatus<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ClaimStatus, TAddress>>; export declare function fetchMaybeClaimStatus<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ClaimStatus, TAddress>>; export declare function fetchAllClaimStatus(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ClaimStatus>[]>; export declare function fetchAllMaybeClaimStatus(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ClaimStatus>[]>; export declare function getClaimStatusSize(): number;