@nosana/kit
Version:
Nosana KIT
49 lines (48 loc) • 4.07 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 { NOSANA_JOBS_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_JOBS_PROGRAM_ADDRESS, TAccountMarket extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountUser 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<[
TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
TAccountUser extends string ? WritableAccount<TAccountUser> : TAccountUser,
TAccountAuthority extends string ? ReadonlySignerAccount<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<TAccountMarket extends string = string, TAccountVault extends string = string, TAccountUser extends string = string, TAccountAuthority extends string = string, TAccountTokenProgram extends string = string> = {
market: Address<TAccountMarket>;
vault: Address<TAccountVault>;
user: Address<TAccountUser>;
authority: TransactionSigner<TAccountAuthority>;
tokenProgram?: Address<TAccountTokenProgram>;
};
export declare function getCloseInstruction<TAccountMarket extends string, TAccountVault extends string, TAccountUser extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: CloseInput<TAccountMarket, TAccountVault, TAccountUser, TAccountAuthority, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): CloseInstruction<TProgramAddress, TAccountMarket, TAccountVault, TAccountUser, TAccountAuthority, TAccountTokenProgram>;
export type ParsedCloseInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
market: TAccountMetas[0];
vault: TAccountMetas[1];
user: 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>;