UNPKG

@nosana/kit

Version:

Nosana KIT

44 lines (43 loc) 3.14 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 EXTEND_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getExtendDiscriminatorBytes(): ReadonlyUint8Array; export type ExtendInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountStake extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountStake extends string ? WritableAccount<TAccountStake> : TAccountStake, TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, ...TRemainingAccounts ]>; export type ExtendInstructionData = { discriminator: ReadonlyUint8Array; duration: bigint; }; export type ExtendInstructionDataArgs = { duration: number | bigint; }; export declare function getExtendInstructionDataEncoder(): FixedSizeEncoder<ExtendInstructionDataArgs>; export declare function getExtendInstructionDataDecoder(): FixedSizeDecoder<ExtendInstructionData>; export declare function getExtendInstructionDataCodec(): FixedSizeCodec<ExtendInstructionDataArgs, ExtendInstructionData>; export type ExtendInput<TAccountStake extends string = string, TAccountAuthority extends string = string> = { stake: Address<TAccountStake>; authority: TransactionSigner<TAccountAuthority>; duration: ExtendInstructionDataArgs['duration']; }; export declare function getExtendInstruction<TAccountStake extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_STAKING_PROGRAM_ADDRESS>(input: ExtendInput<TAccountStake, TAccountAuthority>, config?: { programAddress?: TProgramAddress; }): ExtendInstruction<TProgramAddress, TAccountStake, TAccountAuthority>; export type ParsedExtendInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>; accounts: { stake: TAccountMetas[0]; authority: TAccountMetas[1]; }; data: ExtendInstructionData; }; export declare function parseExtendInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedExtendInstruction<TProgram, TAccountMetas>;