@nosana/kit
Version:
Nosana KIT
52 lines (51 loc) • 3.03 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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
export declare const JOB_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getJobAccountDiscriminatorBytes(): ReadonlyUint8Array;
/** The `JobAccount` struct holds all the information about any individual jobs. */
export type JobAccount = {
discriminator: ReadonlyUint8Array;
ipfsJob: ReadonlyUint8Array;
ipfsResult: ReadonlyUint8Array;
market: Address;
node: Address;
payer: Address;
price: bigint;
project: Address;
state: number;
timeEnd: bigint;
timeStart: bigint;
timeout: bigint;
};
export type JobAccountArgs = {
ipfsJob: ReadonlyUint8Array;
ipfsResult: ReadonlyUint8Array;
market: Address;
node: Address;
payer: Address;
price: number | bigint;
project: Address;
state: number;
timeEnd: number | bigint;
timeStart: number | bigint;
timeout: number | bigint;
};
/** Gets the encoder for {@link JobAccountArgs} account data. */
export declare function getJobAccountEncoder(): FixedSizeEncoder<JobAccountArgs>;
/** Gets the decoder for {@link JobAccount} account data. */
export declare function getJobAccountDecoder(): FixedSizeDecoder<JobAccount>;
/** Gets the codec for {@link JobAccount} account data. */
export declare function getJobAccountCodec(): FixedSizeCodec<JobAccountArgs, JobAccount>;
export declare function decodeJobAccount<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<JobAccount, TAddress>;
export declare function decodeJobAccount<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<JobAccount, TAddress>;
export declare function fetchJobAccount<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<JobAccount, TAddress>>;
export declare function fetchMaybeJobAccount<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<JobAccount, TAddress>>;
export declare function fetchAllJobAccount(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<JobAccount>[]>;
export declare function fetchAllMaybeJobAccount(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<JobAccount>[]>;
export declare function getJobAccountSize(): number;