UNPKG

@nosana/kit

Version:

Nosana KIT

44 lines (43 loc) 3.11 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 Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { NOSANA_JOBS_PROGRAM_ADDRESS } from '../programs'; export declare const COMPLETE_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getCompleteDiscriminatorBytes(): ReadonlyUint8Array; export type CompleteInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | IAccountMeta<string> = string, TAccountAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob, TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority, ...TRemainingAccounts ]>; export type CompleteInstructionData = { discriminator: ReadonlyUint8Array; ipfsResult: ReadonlyUint8Array; }; export type CompleteInstructionDataArgs = { ipfsResult: ReadonlyUint8Array; }; export declare function getCompleteInstructionDataEncoder(): Encoder<CompleteInstructionDataArgs>; export declare function getCompleteInstructionDataDecoder(): Decoder<CompleteInstructionData>; export declare function getCompleteInstructionDataCodec(): Codec<CompleteInstructionDataArgs, CompleteInstructionData>; export type CompleteInput<TAccountJob extends string = string, TAccountAuthority extends string = string> = { job: Address<TAccountJob>; authority: TransactionSigner<TAccountAuthority>; ipfsResult: CompleteInstructionDataArgs['ipfsResult']; }; export declare function getCompleteInstruction<TAccountJob extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: CompleteInput<TAccountJob, TAccountAuthority>, config?: { programAddress?: TProgramAddress; }): CompleteInstruction<TProgramAddress, TAccountJob, TAccountAuthority>; export type ParsedCompleteInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { job: TAccountMetas[0]; authority: TAccountMetas[1]; }; data: CompleteInstructionData; }; export declare function parseCompleteInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedCompleteInstruction<TProgram, TAccountMetas>;