@nosana/kit
Version:
Nosana KIT
58 lines (57 loc) • 4.37 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 Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
/** InvalidMarketAccount: This market account is not valid. */
export declare const NOSANA_JOBS_ERROR__INVALID_MARKET_ACCOUNT = 6000;
/** MarketInWrongState: This market does not have the right status. */
export declare const NOSANA_JOBS_ERROR__MARKET_IN_WRONG_STATE = 6001;
/** NotInMarketQueue: Account cannot be find account in market queue. */
export declare const NOSANA_JOBS_ERROR__NOT_IN_MARKET_QUEUE = 6002;
/** InvalidJobAccount: This job account is not valid. */
export declare const NOSANA_JOBS_ERROR__INVALID_JOB_ACCOUNT = 6003;
/** JobInWrongState: This job does not have the right status. */
export declare const NOSANA_JOBS_ERROR__JOB_IN_WRONG_STATE = 6004;
/** JobNotExpired: The job has not yet expired. */
export declare const NOSANA_JOBS_ERROR__JOB_NOT_EXPIRED = 6005;
/** JobResultNull: The job result can not be null. */
export declare const NOSANA_JOBS_ERROR__JOB_RESULT_NULL = 6006;
/** JobInvalidProject: The job has a different project owner. */
export declare const NOSANA_JOBS_ERROR__JOB_INVALID_PROJECT = 6007;
/** JobTimeoutNotGreater: The new job timeout should be larger than the current one. */
export declare const NOSANA_JOBS_ERROR__JOB_TIMEOUT_NOT_GREATER = 6008;
/** JobInvalidRunAccount: The run account does not match the job. */
export declare const NOSANA_JOBS_ERROR__JOB_INVALID_RUN_ACCOUNT = 6009;
/** JobResultsAlreadySet: The job results are already set. */
export declare const NOSANA_JOBS_ERROR__JOB_RESULTS_ALREADY_SET = 6010;
/** NodeQueueDoesNotMatch: This node queue does not match. */
export declare const NOSANA_JOBS_ERROR__NODE_QUEUE_DOES_NOT_MATCH = 6011;
/** NodeStakeUnauthorized: This node is not authorizing this stake. */
export declare const NOSANA_JOBS_ERROR__NODE_STAKE_UNAUTHORIZED = 6012;
/** NodeNotEnoughStake: This node has not staked enough tokens. */
export declare const NOSANA_JOBS_ERROR__NODE_NOT_ENOUGH_STAKE = 6013;
/** NodeAlreadyQueued: This node is already present in the queue. */
export declare const NOSANA_JOBS_ERROR__NODE_ALREADY_QUEUED = 6014;
/** NodeNftWrongMetadata: This metadata does not have the correct address. */
export declare const NOSANA_JOBS_ERROR__NODE_NFT_WRONG_METADATA = 6015;
/** NodeNftWrongOwner: This NFT is not owned by this node. */
export declare const NOSANA_JOBS_ERROR__NODE_NFT_WRONG_OWNER = 6016;
/** NodeNftInvalidAmount: Access NFT amount cannot be 0. */
export declare const NOSANA_JOBS_ERROR__NODE_NFT_INVALID_AMOUNT = 6017;
/** NodeKeyInvalidCollection: This access key does not belong to a verified collection. */
export declare const NOSANA_JOBS_ERROR__NODE_KEY_INVALID_COLLECTION = 6018;
export type NosanaJobsError = typeof NOSANA_JOBS_ERROR__INVALID_JOB_ACCOUNT | typeof NOSANA_JOBS_ERROR__INVALID_MARKET_ACCOUNT | typeof NOSANA_JOBS_ERROR__JOB_INVALID_PROJECT | typeof NOSANA_JOBS_ERROR__JOB_INVALID_RUN_ACCOUNT | typeof NOSANA_JOBS_ERROR__JOB_IN_WRONG_STATE | typeof NOSANA_JOBS_ERROR__JOB_NOT_EXPIRED | typeof NOSANA_JOBS_ERROR__JOB_RESULT_NULL | typeof NOSANA_JOBS_ERROR__JOB_RESULTS_ALREADY_SET | typeof NOSANA_JOBS_ERROR__JOB_TIMEOUT_NOT_GREATER | typeof NOSANA_JOBS_ERROR__MARKET_IN_WRONG_STATE | typeof NOSANA_JOBS_ERROR__NODE_ALREADY_QUEUED | typeof NOSANA_JOBS_ERROR__NODE_KEY_INVALID_COLLECTION | typeof NOSANA_JOBS_ERROR__NODE_NFT_INVALID_AMOUNT | typeof NOSANA_JOBS_ERROR__NODE_NFT_WRONG_METADATA | typeof NOSANA_JOBS_ERROR__NODE_NFT_WRONG_OWNER | typeof NOSANA_JOBS_ERROR__NODE_NOT_ENOUGH_STAKE | typeof NOSANA_JOBS_ERROR__NODE_QUEUE_DOES_NOT_MATCH | typeof NOSANA_JOBS_ERROR__NODE_STAKE_UNAUTHORIZED | typeof NOSANA_JOBS_ERROR__NOT_IN_MARKET_QUEUE;
export declare function getNosanaJobsErrorMessage(code: NosanaJobsError): string;
export declare function isNosanaJobsError<TProgramErrorCode extends NosanaJobsError>(error: unknown, transactionMessage: {
instructions: Record<number, {
programAddress: Address;
}>;
}, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
context: Readonly<{
code: TProgramErrorCode;
}>;
}>;