UNPKG

@nosana/kit

Version:

Nosana KIT

43 lines (42 loc) 3.37 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 { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js'; export declare const RESTAKE_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getRestakeDiscriminatorBytes(): ReadonlyUint8Array; export type RestakeInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountVault extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault, TAccountStake extends string ? WritableAccount<TAccountStake> : TAccountStake, TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, ...TRemainingAccounts ]>; export type RestakeInstructionData = { discriminator: ReadonlyUint8Array; }; export type RestakeInstructionDataArgs = {}; export declare function getRestakeInstructionDataEncoder(): FixedSizeEncoder<RestakeInstructionDataArgs>; export declare function getRestakeInstructionDataDecoder(): FixedSizeDecoder<RestakeInstructionData>; export declare function getRestakeInstructionDataCodec(): FixedSizeCodec<RestakeInstructionDataArgs, RestakeInstructionData>; export type RestakeInput<TAccountVault extends string = string, TAccountStake extends string = string, TAccountAuthority extends string = string> = { vault: Address<TAccountVault>; stake: Address<TAccountStake>; authority: TransactionSigner<TAccountAuthority>; }; export declare function getRestakeInstruction<TAccountVault extends string, TAccountStake extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_STAKING_PROGRAM_ADDRESS>(input: RestakeInput<TAccountVault, TAccountStake, TAccountAuthority>, config?: { programAddress?: TProgramAddress; }): RestakeInstruction<TProgramAddress, TAccountVault, TAccountStake, TAccountAuthority>; export type ParsedRestakeInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>; accounts: { vault: TAccountMetas[0]; stake: TAccountMetas[1]; authority: TAccountMetas[2]; }; data: RestakeInstructionData; }; export declare function parseRestakeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRestakeInstruction<TProgram, TAccountMetas>;