@nosana/jobs-program 2.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts/index.d.ts +10 -0
- package/dist/accounts/index.js +10 -0
- package/dist/accounts/jobAccount.d.ts +51 -0
- package/dist/accounts/jobAccount.js +76 -0
- package/dist/accounts/marketAccount.d.ts +50 -0
- package/dist/accounts/marketAccount.js +73 -0
- package/dist/accounts/runAccount.d.ts +39 -0
- package/dist/accounts/runAccount.js +64 -0
- package/dist/errors/index.d.ts +8 -0
- package/dist/errors/index.js +8 -0
- package/dist/errors/nosanaJobs.d.ts +57 -0
- package/dist/errors/nosanaJobs.js +80 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/instructions/assign.d.ts +95 -0
- package/dist/instructions/assign.js +134 -0
- package/dist/instructions/claim.d.ts +72 -0
- package/dist/instructions/claim.js +103 -0
- package/dist/instructions/clean.d.ts +48 -0
- package/dist/instructions/clean.js +74 -0
- package/dist/instructions/cleanAdmin.d.ts +48 -0
- package/dist/instructions/cleanAdmin.js +74 -0
- package/dist/instructions/close.d.ts +56 -0
- package/dist/instructions/close.js +87 -0
- package/dist/instructions/closeAdmin.d.ts +56 -0
- package/dist/instructions/closeAdmin.js +87 -0
- package/dist/instructions/complete.d.ts +48 -0
- package/dist/instructions/complete.js +73 -0
- package/dist/instructions/delist.d.ts +64 -0
- package/dist/instructions/delist.js +95 -0
- package/dist/instructions/end.d.ts +72 -0
- package/dist/instructions/end.js +103 -0
- package/dist/instructions/extend.d.ts +80 -0
- package/dist/instructions/extend.js +116 -0
- package/dist/instructions/finish.d.ts +80 -0
- package/dist/instructions/finish.js +113 -0
- package/dist/instructions/index.d.ts +26 -0
- package/dist/instructions/index.js +26 -0
- package/dist/instructions/list.d.ts +91 -0
- package/dist/instructions/list.js +130 -0
- package/dist/instructions/open.d.ts +84 -0
- package/dist/instructions/open.js +121 -0
- package/dist/instructions/quit.d.ts +52 -0
- package/dist/instructions/quit.js +78 -0
- package/dist/instructions/quitAdmin.d.ts +48 -0
- package/dist/instructions/quitAdmin.js +74 -0
- package/dist/instructions/recover.d.ts +64 -0
- package/dist/instructions/recover.js +95 -0
- package/dist/instructions/stop.d.ts +48 -0
- package/dist/instructions/stop.js +74 -0
- package/dist/instructions/update.d.ts +64 -0
- package/dist/instructions/update.js +88 -0
- package/dist/instructions/work.d.ts +68 -0
- package/dist/instructions/work.js +99 -0
- package/dist/programs/index.d.ts +8 -0
- package/dist/programs/index.js +8 -0
- package/dist/programs/nosanaJobs.d.ts +83 -0
- package/dist/programs/nosanaJobs.js +109 -0
- package/dist/shared/index.d.ts +49 -0
- package/dist/shared/index.js +86 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +10 -0
- package/dist/types/jobState.d.ts +19 -0
- package/dist/types/jobState.js +23 -0
- package/dist/types/jobType.d.ts +22 -0
- package/dist/types/jobType.js +26 -0
- package/dist/types/queueType.d.ts +19 -0
- package/dist/types/queueType.js +23 -0
- package/package.json +37 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
+
export const RECOVER_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
job: 0,
|
|
13
|
+
market: 1,
|
|
14
|
+
vault: 2,
|
|
15
|
+
user: 3,
|
|
16
|
+
payer: 4,
|
|
17
|
+
authority: 5,
|
|
18
|
+
tokenProgram: 6,
|
|
19
|
+
};
|
|
20
|
+
export const RECOVER_DISCRIMINATOR = new Uint8Array([
|
|
21
|
+
108, 216, 38, 58, 109, 146, 116, 17,
|
|
22
|
+
]);
|
|
23
|
+
export function getRecoverDiscriminatorBytes() {
|
|
24
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(RECOVER_DISCRIMINATOR);
|
|
25
|
+
}
|
|
26
|
+
export function getRecoverInstructionDataEncoder() {
|
|
27
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: RECOVER_DISCRIMINATOR }));
|
|
28
|
+
}
|
|
29
|
+
export function getRecoverInstructionDataDecoder() {
|
|
30
|
+
return getStructDecoder([
|
|
31
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
export function getRecoverInstructionDataCodec() {
|
|
35
|
+
return combineCodec(getRecoverInstructionDataEncoder(), getRecoverInstructionDataDecoder());
|
|
36
|
+
}
|
|
37
|
+
export function getRecoverInstruction(input, config) {
|
|
38
|
+
// Program address.
|
|
39
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
40
|
+
// Original accounts.
|
|
41
|
+
const originalAccounts = {
|
|
42
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
43
|
+
market: { value: input.market ?? null, isWritable: false },
|
|
44
|
+
vault: { value: input.vault ?? null, isWritable: true },
|
|
45
|
+
user: { value: input.user ?? null, isWritable: true },
|
|
46
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
47
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
48
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
49
|
+
};
|
|
50
|
+
const accounts = originalAccounts;
|
|
51
|
+
// Resolve default values.
|
|
52
|
+
if (!accounts.tokenProgram.value) {
|
|
53
|
+
accounts.tokenProgram.value =
|
|
54
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
55
|
+
}
|
|
56
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
accounts: [
|
|
59
|
+
getAccountMeta(accounts.job),
|
|
60
|
+
getAccountMeta(accounts.market),
|
|
61
|
+
getAccountMeta(accounts.vault),
|
|
62
|
+
getAccountMeta(accounts.user),
|
|
63
|
+
getAccountMeta(accounts.payer),
|
|
64
|
+
getAccountMeta(accounts.authority),
|
|
65
|
+
getAccountMeta(accounts.tokenProgram),
|
|
66
|
+
],
|
|
67
|
+
data: getRecoverInstructionDataEncoder().encode({}),
|
|
68
|
+
programAddress,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function parseRecoverInstruction(instruction) {
|
|
72
|
+
if (instruction.accounts.length < 7) {
|
|
73
|
+
// TODO: Coded error.
|
|
74
|
+
throw new Error("Not enough accounts");
|
|
75
|
+
}
|
|
76
|
+
let accountIndex = 0;
|
|
77
|
+
const getNextAccount = () => {
|
|
78
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
79
|
+
accountIndex += 1;
|
|
80
|
+
return accountMeta;
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
programAddress: instruction.programAddress,
|
|
84
|
+
accounts: {
|
|
85
|
+
job: getNextAccount(),
|
|
86
|
+
market: getNextAccount(),
|
|
87
|
+
vault: getNextAccount(),
|
|
88
|
+
user: getNextAccount(),
|
|
89
|
+
payer: getNextAccount(),
|
|
90
|
+
authority: getNextAccount(),
|
|
91
|
+
tokenProgram: getNextAccount(),
|
|
92
|
+
},
|
|
93
|
+
data: getRecoverInstructionDataDecoder().decode(instruction.data),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const STOP_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly market: 0;
|
|
12
|
+
readonly node: 1;
|
|
13
|
+
readonly authority: 2;
|
|
14
|
+
};
|
|
15
|
+
export type StopInstructionAccountName = keyof typeof STOP_INSTRUCTION_ACCOUNTS;
|
|
16
|
+
export declare const STOP_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
17
|
+
export declare function getStopDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
18
|
+
export type StopInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMarket extends string | AccountMeta<string> = string, TAccountNode extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
19
|
+
TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
|
|
20
|
+
TAccountNode extends string ? ReadonlyAccount<TAccountNode> : TAccountNode,
|
|
21
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
22
|
+
...TRemainingAccounts
|
|
23
|
+
]>;
|
|
24
|
+
export type StopInstructionData = {
|
|
25
|
+
discriminator: ReadonlyUint8Array;
|
|
26
|
+
};
|
|
27
|
+
export type StopInstructionDataArgs = {};
|
|
28
|
+
export declare function getStopInstructionDataEncoder(): FixedSizeEncoder<StopInstructionDataArgs>;
|
|
29
|
+
export declare function getStopInstructionDataDecoder(): FixedSizeDecoder<StopInstructionData>;
|
|
30
|
+
export declare function getStopInstructionDataCodec(): FixedSizeCodec<StopInstructionDataArgs, StopInstructionData>;
|
|
31
|
+
export type StopInput<TAccountMarket extends string = string, TAccountNode extends string = string, TAccountAuthority extends string = string> = {
|
|
32
|
+
market: Address<TAccountMarket>;
|
|
33
|
+
node: Address<TAccountNode>;
|
|
34
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
35
|
+
};
|
|
36
|
+
export declare function getStopInstruction<TAccountMarket extends string, TAccountNode extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: StopInput<TAccountMarket, TAccountNode, TAccountAuthority>, config?: {
|
|
37
|
+
programAddress?: TProgramAddress;
|
|
38
|
+
}): StopInstruction<TProgramAddress, TAccountMarket, TAccountNode, TAccountAuthority>;
|
|
39
|
+
export type ParsedStopInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
40
|
+
programAddress: Address<TProgram>;
|
|
41
|
+
accounts: {
|
|
42
|
+
market: TAccountMetas[0];
|
|
43
|
+
node: TAccountMetas[1];
|
|
44
|
+
authority: TAccountMetas[2];
|
|
45
|
+
};
|
|
46
|
+
data: StopInstructionData;
|
|
47
|
+
};
|
|
48
|
+
export declare function parseStopInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedStopInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
+
export const STOP_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
market: 0,
|
|
13
|
+
node: 1,
|
|
14
|
+
authority: 2,
|
|
15
|
+
};
|
|
16
|
+
export const STOP_DISCRIMINATOR = new Uint8Array([
|
|
17
|
+
42, 133, 32, 60, 171, 253, 184, 155,
|
|
18
|
+
]);
|
|
19
|
+
export function getStopDiscriminatorBytes() {
|
|
20
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(STOP_DISCRIMINATOR);
|
|
21
|
+
}
|
|
22
|
+
export function getStopInstructionDataEncoder() {
|
|
23
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: STOP_DISCRIMINATOR }));
|
|
24
|
+
}
|
|
25
|
+
export function getStopInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([
|
|
27
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
export function getStopInstructionDataCodec() {
|
|
31
|
+
return combineCodec(getStopInstructionDataEncoder(), getStopInstructionDataDecoder());
|
|
32
|
+
}
|
|
33
|
+
export function getStopInstruction(input, config) {
|
|
34
|
+
// Program address.
|
|
35
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
36
|
+
// Original accounts.
|
|
37
|
+
const originalAccounts = {
|
|
38
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
39
|
+
node: { value: input.node ?? null, isWritable: false },
|
|
40
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
41
|
+
};
|
|
42
|
+
const accounts = originalAccounts;
|
|
43
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
44
|
+
return Object.freeze({
|
|
45
|
+
accounts: [
|
|
46
|
+
getAccountMeta(accounts.market),
|
|
47
|
+
getAccountMeta(accounts.node),
|
|
48
|
+
getAccountMeta(accounts.authority),
|
|
49
|
+
],
|
|
50
|
+
data: getStopInstructionDataEncoder().encode({}),
|
|
51
|
+
programAddress,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export function parseStopInstruction(instruction) {
|
|
55
|
+
if (instruction.accounts.length < 3) {
|
|
56
|
+
// TODO: Coded error.
|
|
57
|
+
throw new Error("Not enough accounts");
|
|
58
|
+
}
|
|
59
|
+
let accountIndex = 0;
|
|
60
|
+
const getNextAccount = () => {
|
|
61
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
62
|
+
accountIndex += 1;
|
|
63
|
+
return accountMeta;
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
programAddress: instruction.programAddress,
|
|
67
|
+
accounts: {
|
|
68
|
+
market: getNextAccount(),
|
|
69
|
+
node: getNextAccount(),
|
|
70
|
+
authority: getNextAccount(),
|
|
71
|
+
},
|
|
72
|
+
data: getStopInstructionDataDecoder().decode(instruction.data),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const UPDATE_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly market: 0;
|
|
12
|
+
readonly accessKey: 1;
|
|
13
|
+
readonly authority: 2;
|
|
14
|
+
};
|
|
15
|
+
export type UpdateInstructionAccountName = keyof typeof UPDATE_INSTRUCTION_ACCOUNTS;
|
|
16
|
+
export declare const UPDATE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
17
|
+
export declare function getUpdateDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
18
|
+
export type UpdateInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMarket extends string | AccountMeta<string> = string, TAccountAccessKey extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
19
|
+
TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
|
|
20
|
+
TAccountAccessKey extends string ? ReadonlyAccount<TAccountAccessKey> : TAccountAccessKey,
|
|
21
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
22
|
+
...TRemainingAccounts
|
|
23
|
+
]>;
|
|
24
|
+
export type UpdateInstructionData = {
|
|
25
|
+
discriminator: ReadonlyUint8Array;
|
|
26
|
+
jobExpiration: bigint;
|
|
27
|
+
jobPrice: bigint;
|
|
28
|
+
jobType: number;
|
|
29
|
+
nodeStakeMinimum: bigint;
|
|
30
|
+
jobTimeout: bigint;
|
|
31
|
+
};
|
|
32
|
+
export type UpdateInstructionDataArgs = {
|
|
33
|
+
jobExpiration: number | bigint;
|
|
34
|
+
jobPrice: number | bigint;
|
|
35
|
+
jobType: number;
|
|
36
|
+
nodeStakeMinimum: number | bigint;
|
|
37
|
+
jobTimeout: number | bigint;
|
|
38
|
+
};
|
|
39
|
+
export declare function getUpdateInstructionDataEncoder(): FixedSizeEncoder<UpdateInstructionDataArgs>;
|
|
40
|
+
export declare function getUpdateInstructionDataDecoder(): FixedSizeDecoder<UpdateInstructionData>;
|
|
41
|
+
export declare function getUpdateInstructionDataCodec(): FixedSizeCodec<UpdateInstructionDataArgs, UpdateInstructionData>;
|
|
42
|
+
export type UpdateInput<TAccountMarket extends string = string, TAccountAccessKey extends string = string, TAccountAuthority extends string = string> = {
|
|
43
|
+
market: Address<TAccountMarket>;
|
|
44
|
+
accessKey: Address<TAccountAccessKey>;
|
|
45
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
46
|
+
jobExpiration: UpdateInstructionDataArgs["jobExpiration"];
|
|
47
|
+
jobPrice: UpdateInstructionDataArgs["jobPrice"];
|
|
48
|
+
jobType: UpdateInstructionDataArgs["jobType"];
|
|
49
|
+
nodeStakeMinimum: UpdateInstructionDataArgs["nodeStakeMinimum"];
|
|
50
|
+
jobTimeout: UpdateInstructionDataArgs["jobTimeout"];
|
|
51
|
+
};
|
|
52
|
+
export declare function getUpdateInstruction<TAccountMarket extends string, TAccountAccessKey extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: UpdateInput<TAccountMarket, TAccountAccessKey, TAccountAuthority>, config?: {
|
|
53
|
+
programAddress?: TProgramAddress;
|
|
54
|
+
}): UpdateInstruction<TProgramAddress, TAccountMarket, TAccountAccessKey, TAccountAuthority>;
|
|
55
|
+
export type ParsedUpdateInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
56
|
+
programAddress: Address<TProgram>;
|
|
57
|
+
accounts: {
|
|
58
|
+
market: TAccountMetas[0];
|
|
59
|
+
accessKey: TAccountMetas[1];
|
|
60
|
+
authority: TAccountMetas[2];
|
|
61
|
+
};
|
|
62
|
+
data: UpdateInstructionData;
|
|
63
|
+
};
|
|
64
|
+
export declare function parseUpdateInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdateInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
+
export const UPDATE_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
market: 0,
|
|
13
|
+
accessKey: 1,
|
|
14
|
+
authority: 2,
|
|
15
|
+
};
|
|
16
|
+
export const UPDATE_DISCRIMINATOR = new Uint8Array([
|
|
17
|
+
219, 200, 88, 176, 158, 63, 253, 127,
|
|
18
|
+
]);
|
|
19
|
+
export function getUpdateDiscriminatorBytes() {
|
|
20
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(UPDATE_DISCRIMINATOR);
|
|
21
|
+
}
|
|
22
|
+
export function getUpdateInstructionDataEncoder() {
|
|
23
|
+
return transformEncoder(getStructEncoder([
|
|
24
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
25
|
+
["jobExpiration", getI64Encoder()],
|
|
26
|
+
["jobPrice", getU64Encoder()],
|
|
27
|
+
["jobType", getU8Encoder()],
|
|
28
|
+
["nodeStakeMinimum", getU128Encoder()],
|
|
29
|
+
["jobTimeout", getI64Encoder()],
|
|
30
|
+
]), (value) => ({ ...value, discriminator: UPDATE_DISCRIMINATOR }));
|
|
31
|
+
}
|
|
32
|
+
export function getUpdateInstructionDataDecoder() {
|
|
33
|
+
return getStructDecoder([
|
|
34
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
35
|
+
["jobExpiration", getI64Decoder()],
|
|
36
|
+
["jobPrice", getU64Decoder()],
|
|
37
|
+
["jobType", getU8Decoder()],
|
|
38
|
+
["nodeStakeMinimum", getU128Decoder()],
|
|
39
|
+
["jobTimeout", getI64Decoder()],
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
export function getUpdateInstructionDataCodec() {
|
|
43
|
+
return combineCodec(getUpdateInstructionDataEncoder(), getUpdateInstructionDataDecoder());
|
|
44
|
+
}
|
|
45
|
+
export function getUpdateInstruction(input, config) {
|
|
46
|
+
// Program address.
|
|
47
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
48
|
+
// Original accounts.
|
|
49
|
+
const originalAccounts = {
|
|
50
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
51
|
+
accessKey: { value: input.accessKey ?? null, isWritable: false },
|
|
52
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
53
|
+
};
|
|
54
|
+
const accounts = originalAccounts;
|
|
55
|
+
// Original args.
|
|
56
|
+
const args = { ...input };
|
|
57
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
58
|
+
return Object.freeze({
|
|
59
|
+
accounts: [
|
|
60
|
+
getAccountMeta(accounts.market),
|
|
61
|
+
getAccountMeta(accounts.accessKey),
|
|
62
|
+
getAccountMeta(accounts.authority),
|
|
63
|
+
],
|
|
64
|
+
data: getUpdateInstructionDataEncoder().encode(args),
|
|
65
|
+
programAddress,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function parseUpdateInstruction(instruction) {
|
|
69
|
+
if (instruction.accounts.length < 3) {
|
|
70
|
+
// TODO: Coded error.
|
|
71
|
+
throw new Error("Not enough accounts");
|
|
72
|
+
}
|
|
73
|
+
let accountIndex = 0;
|
|
74
|
+
const getNextAccount = () => {
|
|
75
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
76
|
+
accountIndex += 1;
|
|
77
|
+
return accountMeta;
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
programAddress: instruction.programAddress,
|
|
81
|
+
accounts: {
|
|
82
|
+
market: getNextAccount(),
|
|
83
|
+
accessKey: getNextAccount(),
|
|
84
|
+
authority: getNextAccount(),
|
|
85
|
+
},
|
|
86
|
+
data: getUpdateInstructionDataDecoder().decode(instruction.data),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const WORK_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly run: 0;
|
|
12
|
+
readonly market: 1;
|
|
13
|
+
readonly payer: 2;
|
|
14
|
+
readonly stake: 3;
|
|
15
|
+
readonly nft: 4;
|
|
16
|
+
readonly metadata: 5;
|
|
17
|
+
readonly authority: 6;
|
|
18
|
+
readonly systemProgram: 7;
|
|
19
|
+
};
|
|
20
|
+
export type WorkInstructionAccountName = keyof typeof WORK_INSTRUCTION_ACCOUNTS;
|
|
21
|
+
export declare const WORK_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
22
|
+
export declare function getWorkDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
23
|
+
export type WorkInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountRun extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountNft extends string | AccountMeta<string> = string, TAccountMetadata extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
24
|
+
TAccountRun extends string ? WritableSignerAccount<TAccountRun> & AccountSignerMeta<TAccountRun> : TAccountRun,
|
|
25
|
+
TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
|
|
26
|
+
TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer,
|
|
27
|
+
TAccountStake extends string ? ReadonlyAccount<TAccountStake> : TAccountStake,
|
|
28
|
+
TAccountNft extends string ? ReadonlyAccount<TAccountNft> : TAccountNft,
|
|
29
|
+
TAccountMetadata extends string ? ReadonlyAccount<TAccountMetadata> : TAccountMetadata,
|
|
30
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
31
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
32
|
+
...TRemainingAccounts
|
|
33
|
+
]>;
|
|
34
|
+
export type WorkInstructionData = {
|
|
35
|
+
discriminator: ReadonlyUint8Array;
|
|
36
|
+
};
|
|
37
|
+
export type WorkInstructionDataArgs = {};
|
|
38
|
+
export declare function getWorkInstructionDataEncoder(): FixedSizeEncoder<WorkInstructionDataArgs>;
|
|
39
|
+
export declare function getWorkInstructionDataDecoder(): FixedSizeDecoder<WorkInstructionData>;
|
|
40
|
+
export declare function getWorkInstructionDataCodec(): FixedSizeCodec<WorkInstructionDataArgs, WorkInstructionData>;
|
|
41
|
+
export type WorkInput<TAccountRun extends string = string, TAccountMarket extends string = string, TAccountPayer extends string = string, TAccountStake extends string = string, TAccountNft extends string = string, TAccountMetadata extends string = string, TAccountAuthority extends string = string, TAccountSystemProgram extends string = string> = {
|
|
42
|
+
run: TransactionSigner<TAccountRun>;
|
|
43
|
+
market: Address<TAccountMarket>;
|
|
44
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
45
|
+
stake: Address<TAccountStake>;
|
|
46
|
+
nft: Address<TAccountNft>;
|
|
47
|
+
metadata: Address<TAccountMetadata>;
|
|
48
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
49
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
50
|
+
};
|
|
51
|
+
export declare function getWorkInstruction<TAccountRun extends string, TAccountMarket extends string, TAccountPayer extends string, TAccountStake extends string, TAccountNft extends string, TAccountMetadata extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: WorkInput<TAccountRun, TAccountMarket, TAccountPayer, TAccountStake, TAccountNft, TAccountMetadata, TAccountAuthority, TAccountSystemProgram>, config?: {
|
|
52
|
+
programAddress?: TProgramAddress;
|
|
53
|
+
}): WorkInstruction<TProgramAddress, TAccountRun, TAccountMarket, TAccountPayer, TAccountStake, TAccountNft, TAccountMetadata, TAccountAuthority, TAccountSystemProgram>;
|
|
54
|
+
export type ParsedWorkInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
55
|
+
programAddress: Address<TProgram>;
|
|
56
|
+
accounts: {
|
|
57
|
+
run: TAccountMetas[0];
|
|
58
|
+
market: TAccountMetas[1];
|
|
59
|
+
payer: TAccountMetas[2];
|
|
60
|
+
stake: TAccountMetas[3];
|
|
61
|
+
nft: TAccountMetas[4];
|
|
62
|
+
metadata: TAccountMetas[5];
|
|
63
|
+
authority: TAccountMetas[6];
|
|
64
|
+
systemProgram: TAccountMetas[7];
|
|
65
|
+
};
|
|
66
|
+
data: WorkInstructionData;
|
|
67
|
+
};
|
|
68
|
+
export declare function parseWorkInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedWorkInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
+
export const WORK_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
run: 0,
|
|
13
|
+
market: 1,
|
|
14
|
+
payer: 2,
|
|
15
|
+
stake: 3,
|
|
16
|
+
nft: 4,
|
|
17
|
+
metadata: 5,
|
|
18
|
+
authority: 6,
|
|
19
|
+
systemProgram: 7,
|
|
20
|
+
};
|
|
21
|
+
export const WORK_DISCRIMINATOR = new Uint8Array([
|
|
22
|
+
15, 67, 45, 195, 215, 137, 229, 47,
|
|
23
|
+
]);
|
|
24
|
+
export function getWorkDiscriminatorBytes() {
|
|
25
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(WORK_DISCRIMINATOR);
|
|
26
|
+
}
|
|
27
|
+
export function getWorkInstructionDataEncoder() {
|
|
28
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: WORK_DISCRIMINATOR }));
|
|
29
|
+
}
|
|
30
|
+
export function getWorkInstructionDataDecoder() {
|
|
31
|
+
return getStructDecoder([
|
|
32
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
35
|
+
export function getWorkInstructionDataCodec() {
|
|
36
|
+
return combineCodec(getWorkInstructionDataEncoder(), getWorkInstructionDataDecoder());
|
|
37
|
+
}
|
|
38
|
+
export function getWorkInstruction(input, config) {
|
|
39
|
+
// Program address.
|
|
40
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
41
|
+
// Original accounts.
|
|
42
|
+
const originalAccounts = {
|
|
43
|
+
run: { value: input.run ?? null, isWritable: true },
|
|
44
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
45
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
46
|
+
stake: { value: input.stake ?? null, isWritable: false },
|
|
47
|
+
nft: { value: input.nft ?? null, isWritable: false },
|
|
48
|
+
metadata: { value: input.metadata ?? null, isWritable: false },
|
|
49
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
50
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
51
|
+
};
|
|
52
|
+
const accounts = originalAccounts;
|
|
53
|
+
// Resolve default values.
|
|
54
|
+
if (!accounts.systemProgram.value) {
|
|
55
|
+
accounts.systemProgram.value =
|
|
56
|
+
"11111111111111111111111111111111";
|
|
57
|
+
}
|
|
58
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
59
|
+
return Object.freeze({
|
|
60
|
+
accounts: [
|
|
61
|
+
getAccountMeta(accounts.run),
|
|
62
|
+
getAccountMeta(accounts.market),
|
|
63
|
+
getAccountMeta(accounts.payer),
|
|
64
|
+
getAccountMeta(accounts.stake),
|
|
65
|
+
getAccountMeta(accounts.nft),
|
|
66
|
+
getAccountMeta(accounts.metadata),
|
|
67
|
+
getAccountMeta(accounts.authority),
|
|
68
|
+
getAccountMeta(accounts.systemProgram),
|
|
69
|
+
],
|
|
70
|
+
data: getWorkInstructionDataEncoder().encode({}),
|
|
71
|
+
programAddress,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export function parseWorkInstruction(instruction) {
|
|
75
|
+
if (instruction.accounts.length < 8) {
|
|
76
|
+
// TODO: Coded error.
|
|
77
|
+
throw new Error("Not enough accounts");
|
|
78
|
+
}
|
|
79
|
+
let accountIndex = 0;
|
|
80
|
+
const getNextAccount = () => {
|
|
81
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
82
|
+
accountIndex += 1;
|
|
83
|
+
return accountMeta;
|
|
84
|
+
};
|
|
85
|
+
return {
|
|
86
|
+
programAddress: instruction.programAddress,
|
|
87
|
+
accounts: {
|
|
88
|
+
run: getNextAccount(),
|
|
89
|
+
market: getNextAccount(),
|
|
90
|
+
payer: getNextAccount(),
|
|
91
|
+
stake: getNextAccount(),
|
|
92
|
+
nft: getNextAccount(),
|
|
93
|
+
metadata: getNextAccount(),
|
|
94
|
+
authority: getNextAccount(),
|
|
95
|
+
systemProgram: getNextAccount(),
|
|
96
|
+
},
|
|
97
|
+
data: getWorkInstructionDataDecoder().decode(instruction.data),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
import { type ParsedAssignInstruction, type ParsedClaimInstruction, type ParsedCleanAdminInstruction, type ParsedCleanInstruction, type ParsedCloseAdminInstruction, type ParsedCloseInstruction, type ParsedCompleteInstruction, type ParsedDelistInstruction, type ParsedEndInstruction, type ParsedExtendInstruction, type ParsedFinishInstruction, type ParsedListInstruction, type ParsedOpenInstruction, type ParsedQuitAdminInstruction, type ParsedQuitInstruction, type ParsedRecoverInstruction, type ParsedStopInstruction, type ParsedUpdateInstruction, type ParsedWorkInstruction } from "../instructions/index.js";
|
|
10
|
+
export declare const NOSANA_JOBS_PROGRAM_ADDRESS: Address<"nosJhNRqr2bc9g1nfGDcXXTXvYUmxD4cVwy2pMWhrYM">;
|
|
11
|
+
export declare const NosanaJobsAccount: {
|
|
12
|
+
readonly MarketAccount: "MarketAccount";
|
|
13
|
+
readonly JobAccount: "JobAccount";
|
|
14
|
+
readonly RunAccount: "RunAccount";
|
|
15
|
+
};
|
|
16
|
+
export type NosanaJobsAccount = (typeof NosanaJobsAccount)[keyof typeof NosanaJobsAccount];
|
|
17
|
+
export declare function identifyNosanaJobsAccount(account: {
|
|
18
|
+
data: ReadonlyUint8Array;
|
|
19
|
+
} | ReadonlyUint8Array): NosanaJobsAccount;
|
|
20
|
+
export declare const NosanaJobsInstruction: {
|
|
21
|
+
readonly Open: "Open";
|
|
22
|
+
readonly Update: "Update";
|
|
23
|
+
readonly Close: "Close";
|
|
24
|
+
readonly CloseAdmin: "CloseAdmin";
|
|
25
|
+
readonly Assign: "Assign";
|
|
26
|
+
readonly List: "List";
|
|
27
|
+
readonly Delist: "Delist";
|
|
28
|
+
readonly Recover: "Recover";
|
|
29
|
+
readonly Extend: "Extend";
|
|
30
|
+
readonly End: "End";
|
|
31
|
+
readonly Work: "Work";
|
|
32
|
+
readonly Stop: "Stop";
|
|
33
|
+
readonly Claim: "Claim";
|
|
34
|
+
readonly Complete: "Complete";
|
|
35
|
+
readonly Finish: "Finish";
|
|
36
|
+
readonly Quit: "Quit";
|
|
37
|
+
readonly QuitAdmin: "QuitAdmin";
|
|
38
|
+
readonly Clean: "Clean";
|
|
39
|
+
readonly CleanAdmin: "CleanAdmin";
|
|
40
|
+
};
|
|
41
|
+
export type NosanaJobsInstruction = (typeof NosanaJobsInstruction)[keyof typeof NosanaJobsInstruction];
|
|
42
|
+
export declare function identifyNosanaJobsInstruction(instruction: {
|
|
43
|
+
data: ReadonlyUint8Array;
|
|
44
|
+
} | ReadonlyUint8Array): NosanaJobsInstruction;
|
|
45
|
+
export type ParsedNosanaJobsInstruction<TProgram extends string = "nosJhNRqr2bc9g1nfGDcXXTXvYUmxD4cVwy2pMWhrYM"> = ({
|
|
46
|
+
instructionType: typeof NosanaJobsInstruction.Open;
|
|
47
|
+
} & ParsedOpenInstruction<TProgram>) | ({
|
|
48
|
+
instructionType: typeof NosanaJobsInstruction.Update;
|
|
49
|
+
} & ParsedUpdateInstruction<TProgram>) | ({
|
|
50
|
+
instructionType: typeof NosanaJobsInstruction.Close;
|
|
51
|
+
} & ParsedCloseInstruction<TProgram>) | ({
|
|
52
|
+
instructionType: typeof NosanaJobsInstruction.CloseAdmin;
|
|
53
|
+
} & ParsedCloseAdminInstruction<TProgram>) | ({
|
|
54
|
+
instructionType: typeof NosanaJobsInstruction.Assign;
|
|
55
|
+
} & ParsedAssignInstruction<TProgram>) | ({
|
|
56
|
+
instructionType: typeof NosanaJobsInstruction.List;
|
|
57
|
+
} & ParsedListInstruction<TProgram>) | ({
|
|
58
|
+
instructionType: typeof NosanaJobsInstruction.Delist;
|
|
59
|
+
} & ParsedDelistInstruction<TProgram>) | ({
|
|
60
|
+
instructionType: typeof NosanaJobsInstruction.Recover;
|
|
61
|
+
} & ParsedRecoverInstruction<TProgram>) | ({
|
|
62
|
+
instructionType: typeof NosanaJobsInstruction.Extend;
|
|
63
|
+
} & ParsedExtendInstruction<TProgram>) | ({
|
|
64
|
+
instructionType: typeof NosanaJobsInstruction.End;
|
|
65
|
+
} & ParsedEndInstruction<TProgram>) | ({
|
|
66
|
+
instructionType: typeof NosanaJobsInstruction.Work;
|
|
67
|
+
} & ParsedWorkInstruction<TProgram>) | ({
|
|
68
|
+
instructionType: typeof NosanaJobsInstruction.Stop;
|
|
69
|
+
} & ParsedStopInstruction<TProgram>) | ({
|
|
70
|
+
instructionType: typeof NosanaJobsInstruction.Claim;
|
|
71
|
+
} & ParsedClaimInstruction<TProgram>) | ({
|
|
72
|
+
instructionType: typeof NosanaJobsInstruction.Complete;
|
|
73
|
+
} & ParsedCompleteInstruction<TProgram>) | ({
|
|
74
|
+
instructionType: typeof NosanaJobsInstruction.Finish;
|
|
75
|
+
} & ParsedFinishInstruction<TProgram>) | ({
|
|
76
|
+
instructionType: typeof NosanaJobsInstruction.Quit;
|
|
77
|
+
} & ParsedQuitInstruction<TProgram>) | ({
|
|
78
|
+
instructionType: typeof NosanaJobsInstruction.QuitAdmin;
|
|
79
|
+
} & ParsedQuitAdminInstruction<TProgram>) | ({
|
|
80
|
+
instructionType: typeof NosanaJobsInstruction.Clean;
|
|
81
|
+
} & ParsedCleanInstruction<TProgram>) | ({
|
|
82
|
+
instructionType: typeof NosanaJobsInstruction.CleanAdmin;
|
|
83
|
+
} & ParsedCleanAdminInstruction<TProgram>);
|