@nosana/kit
Version:
Nosana KIT
49 lines (48 loc) • 4.08 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 { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
export declare const CLOSE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getCloseDiscriminatorBytes(): ReadonlyUint8Array;
export type CloseInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountUser extends string ? WritableAccount<TAccountUser> : TAccountUser,
TAccountStake extends string ? WritableAccount<TAccountStake> : TAccountStake,
TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
...TRemainingAccounts
]>;
export type CloseInstructionData = {
discriminator: ReadonlyUint8Array;
};
export type CloseInstructionDataArgs = {};
export declare function getCloseInstructionDataEncoder(): FixedSizeEncoder<CloseInstructionDataArgs>;
export declare function getCloseInstructionDataDecoder(): FixedSizeDecoder<CloseInstructionData>;
export declare function getCloseInstructionDataCodec(): FixedSizeCodec<CloseInstructionDataArgs, CloseInstructionData>;
export type CloseInput<TAccountUser extends string = string, TAccountStake extends string = string, TAccountVault extends string = string, TAccountAuthority extends string = string, TAccountTokenProgram extends string = string> = {
user: Address<TAccountUser>;
stake: Address<TAccountStake>;
vault: Address<TAccountVault>;
authority: TransactionSigner<TAccountAuthority>;
tokenProgram?: Address<TAccountTokenProgram>;
};
export declare function getCloseInstruction<TAccountUser extends string, TAccountStake extends string, TAccountVault extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof NOSANA_STAKING_PROGRAM_ADDRESS>(input: CloseInput<TAccountUser, TAccountStake, TAccountVault, TAccountAuthority, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): CloseInstruction<TProgramAddress, TAccountUser, TAccountStake, TAccountVault, TAccountAuthority, TAccountTokenProgram>;
export type ParsedCloseInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
user: TAccountMetas[0];
stake: TAccountMetas[1];
vault: TAccountMetas[2];
authority: TAccountMetas[3];
tokenProgram: TAccountMetas[4];
};
data: CloseInstructionData;
};
export declare function parseCloseInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCloseInstruction<TProgram, TAccountMetas>;