@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,130 @@
|
|
|
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, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
import { getAccountMetaFactory } from "../shared/index.js";
|
|
11
|
+
export const LIST_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
job: 0,
|
|
13
|
+
market: 1,
|
|
14
|
+
run: 2,
|
|
15
|
+
user: 3,
|
|
16
|
+
vault: 4,
|
|
17
|
+
payer: 5,
|
|
18
|
+
rewardsReflection: 6,
|
|
19
|
+
rewardsVault: 7,
|
|
20
|
+
authority: 8,
|
|
21
|
+
rewardsProgram: 9,
|
|
22
|
+
tokenProgram: 10,
|
|
23
|
+
systemProgram: 11,
|
|
24
|
+
};
|
|
25
|
+
export const LIST_DISCRIMINATOR = new Uint8Array([
|
|
26
|
+
54, 174, 193, 67, 17, 41, 132, 38,
|
|
27
|
+
]);
|
|
28
|
+
export function getListDiscriminatorBytes() {
|
|
29
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(LIST_DISCRIMINATOR);
|
|
30
|
+
}
|
|
31
|
+
export function getListInstructionDataEncoder() {
|
|
32
|
+
return transformEncoder(getStructEncoder([
|
|
33
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
34
|
+
["ipfsJob", fixEncoderSize(getBytesEncoder(), 32)],
|
|
35
|
+
["timeout", getI64Encoder()],
|
|
36
|
+
]), (value) => ({ ...value, discriminator: LIST_DISCRIMINATOR }));
|
|
37
|
+
}
|
|
38
|
+
export function getListInstructionDataDecoder() {
|
|
39
|
+
return getStructDecoder([
|
|
40
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
41
|
+
["ipfsJob", fixDecoderSize(getBytesDecoder(), 32)],
|
|
42
|
+
["timeout", getI64Decoder()],
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
export function getListInstructionDataCodec() {
|
|
46
|
+
return combineCodec(getListInstructionDataEncoder(), getListInstructionDataDecoder());
|
|
47
|
+
}
|
|
48
|
+
export function getListInstruction(input, config) {
|
|
49
|
+
// Program address.
|
|
50
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
51
|
+
// Original accounts.
|
|
52
|
+
const originalAccounts = {
|
|
53
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
54
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
55
|
+
run: { value: input.run ?? null, isWritable: true },
|
|
56
|
+
user: { value: input.user ?? null, isWritable: true },
|
|
57
|
+
vault: { value: input.vault ?? null, isWritable: true },
|
|
58
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
59
|
+
rewardsReflection: {
|
|
60
|
+
value: input.rewardsReflection ?? null,
|
|
61
|
+
isWritable: true,
|
|
62
|
+
},
|
|
63
|
+
rewardsVault: { value: input.rewardsVault ?? null, isWritable: true },
|
|
64
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
65
|
+
rewardsProgram: { value: input.rewardsProgram ?? null, isWritable: false },
|
|
66
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
67
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
68
|
+
};
|
|
69
|
+
const accounts = originalAccounts;
|
|
70
|
+
// Original args.
|
|
71
|
+
const args = { ...input };
|
|
72
|
+
// Resolve default values.
|
|
73
|
+
if (!accounts.tokenProgram.value) {
|
|
74
|
+
accounts.tokenProgram.value =
|
|
75
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
76
|
+
}
|
|
77
|
+
if (!accounts.systemProgram.value) {
|
|
78
|
+
accounts.systemProgram.value =
|
|
79
|
+
"11111111111111111111111111111111";
|
|
80
|
+
}
|
|
81
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
82
|
+
return Object.freeze({
|
|
83
|
+
accounts: [
|
|
84
|
+
getAccountMeta(accounts.job),
|
|
85
|
+
getAccountMeta(accounts.market),
|
|
86
|
+
getAccountMeta(accounts.run),
|
|
87
|
+
getAccountMeta(accounts.user),
|
|
88
|
+
getAccountMeta(accounts.vault),
|
|
89
|
+
getAccountMeta(accounts.payer),
|
|
90
|
+
getAccountMeta(accounts.rewardsReflection),
|
|
91
|
+
getAccountMeta(accounts.rewardsVault),
|
|
92
|
+
getAccountMeta(accounts.authority),
|
|
93
|
+
getAccountMeta(accounts.rewardsProgram),
|
|
94
|
+
getAccountMeta(accounts.tokenProgram),
|
|
95
|
+
getAccountMeta(accounts.systemProgram),
|
|
96
|
+
],
|
|
97
|
+
data: getListInstructionDataEncoder().encode(args),
|
|
98
|
+
programAddress,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export function parseListInstruction(instruction) {
|
|
102
|
+
if (instruction.accounts.length < 12) {
|
|
103
|
+
// TODO: Coded error.
|
|
104
|
+
throw new Error("Not enough accounts");
|
|
105
|
+
}
|
|
106
|
+
let accountIndex = 0;
|
|
107
|
+
const getNextAccount = () => {
|
|
108
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
109
|
+
accountIndex += 1;
|
|
110
|
+
return accountMeta;
|
|
111
|
+
};
|
|
112
|
+
return {
|
|
113
|
+
programAddress: instruction.programAddress,
|
|
114
|
+
accounts: {
|
|
115
|
+
job: getNextAccount(),
|
|
116
|
+
market: getNextAccount(),
|
|
117
|
+
run: getNextAccount(),
|
|
118
|
+
user: getNextAccount(),
|
|
119
|
+
vault: getNextAccount(),
|
|
120
|
+
payer: getNextAccount(),
|
|
121
|
+
rewardsReflection: getNextAccount(),
|
|
122
|
+
rewardsVault: getNextAccount(),
|
|
123
|
+
authority: getNextAccount(),
|
|
124
|
+
rewardsProgram: getNextAccount(),
|
|
125
|
+
tokenProgram: getNextAccount(),
|
|
126
|
+
systemProgram: getNextAccount(),
|
|
127
|
+
},
|
|
128
|
+
data: getListInstructionDataDecoder().decode(instruction.data),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const OPEN_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly mint: 0;
|
|
12
|
+
readonly market: 1;
|
|
13
|
+
readonly vault: 2;
|
|
14
|
+
readonly authority: 3;
|
|
15
|
+
readonly accessKey: 4;
|
|
16
|
+
readonly rent: 5;
|
|
17
|
+
readonly systemProgram: 6;
|
|
18
|
+
readonly tokenProgram: 7;
|
|
19
|
+
};
|
|
20
|
+
export type OpenInstructionAccountName = keyof typeof OPEN_INSTRUCTION_ACCOUNTS;
|
|
21
|
+
export declare const OPEN_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
22
|
+
export declare function getOpenDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
23
|
+
export type OpenInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMint extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountAccessKey extends string | AccountMeta<string> = string, TAccountRent extends string | AccountMeta<string> = "SysvarRent111111111111111111111111111111111", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
24
|
+
TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint,
|
|
25
|
+
TAccountMarket extends string ? WritableSignerAccount<TAccountMarket> & AccountSignerMeta<TAccountMarket> : TAccountMarket,
|
|
26
|
+
TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
|
|
27
|
+
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
28
|
+
TAccountAccessKey extends string ? ReadonlyAccount<TAccountAccessKey> : TAccountAccessKey,
|
|
29
|
+
TAccountRent extends string ? ReadonlyAccount<TAccountRent> : TAccountRent,
|
|
30
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
31
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
32
|
+
...TRemainingAccounts
|
|
33
|
+
]>;
|
|
34
|
+
export type OpenInstructionData = {
|
|
35
|
+
discriminator: ReadonlyUint8Array;
|
|
36
|
+
jobExpiration: bigint;
|
|
37
|
+
jobPrice: bigint;
|
|
38
|
+
jobTimeout: bigint;
|
|
39
|
+
jobType: number;
|
|
40
|
+
nodeXnosMinimum: bigint;
|
|
41
|
+
};
|
|
42
|
+
export type OpenInstructionDataArgs = {
|
|
43
|
+
jobExpiration: number | bigint;
|
|
44
|
+
jobPrice: number | bigint;
|
|
45
|
+
jobTimeout: number | bigint;
|
|
46
|
+
jobType: number;
|
|
47
|
+
nodeXnosMinimum: number | bigint;
|
|
48
|
+
};
|
|
49
|
+
export declare function getOpenInstructionDataEncoder(): FixedSizeEncoder<OpenInstructionDataArgs>;
|
|
50
|
+
export declare function getOpenInstructionDataDecoder(): FixedSizeDecoder<OpenInstructionData>;
|
|
51
|
+
export declare function getOpenInstructionDataCodec(): FixedSizeCodec<OpenInstructionDataArgs, OpenInstructionData>;
|
|
52
|
+
export type OpenInput<TAccountMint extends string = string, TAccountMarket extends string = string, TAccountVault extends string = string, TAccountAuthority extends string = string, TAccountAccessKey extends string = string, TAccountRent extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
|
|
53
|
+
mint: Address<TAccountMint>;
|
|
54
|
+
market: TransactionSigner<TAccountMarket>;
|
|
55
|
+
vault: Address<TAccountVault>;
|
|
56
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
57
|
+
accessKey: Address<TAccountAccessKey>;
|
|
58
|
+
rent?: Address<TAccountRent>;
|
|
59
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
60
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
61
|
+
jobExpiration: OpenInstructionDataArgs["jobExpiration"];
|
|
62
|
+
jobPrice: OpenInstructionDataArgs["jobPrice"];
|
|
63
|
+
jobTimeout: OpenInstructionDataArgs["jobTimeout"];
|
|
64
|
+
jobType: OpenInstructionDataArgs["jobType"];
|
|
65
|
+
nodeXnosMinimum: OpenInstructionDataArgs["nodeXnosMinimum"];
|
|
66
|
+
};
|
|
67
|
+
export declare function getOpenInstruction<TAccountMint extends string, TAccountMarket extends string, TAccountVault extends string, TAccountAuthority extends string, TAccountAccessKey extends string, TAccountRent extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: OpenInput<TAccountMint, TAccountMarket, TAccountVault, TAccountAuthority, TAccountAccessKey, TAccountRent, TAccountSystemProgram, TAccountTokenProgram>, config?: {
|
|
68
|
+
programAddress?: TProgramAddress;
|
|
69
|
+
}): OpenInstruction<TProgramAddress, TAccountMint, TAccountMarket, TAccountVault, TAccountAuthority, TAccountAccessKey, TAccountRent, TAccountSystemProgram, TAccountTokenProgram>;
|
|
70
|
+
export type ParsedOpenInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
71
|
+
programAddress: Address<TProgram>;
|
|
72
|
+
accounts: {
|
|
73
|
+
mint: TAccountMetas[0];
|
|
74
|
+
market: TAccountMetas[1];
|
|
75
|
+
vault: TAccountMetas[2];
|
|
76
|
+
authority: TAccountMetas[3];
|
|
77
|
+
accessKey: TAccountMetas[4];
|
|
78
|
+
rent: TAccountMetas[5];
|
|
79
|
+
systemProgram: TAccountMetas[6];
|
|
80
|
+
tokenProgram: TAccountMetas[7];
|
|
81
|
+
};
|
|
82
|
+
data: OpenInstructionData;
|
|
83
|
+
};
|
|
84
|
+
export declare function parseOpenInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedOpenInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,121 @@
|
|
|
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 OPEN_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
mint: 0,
|
|
13
|
+
market: 1,
|
|
14
|
+
vault: 2,
|
|
15
|
+
authority: 3,
|
|
16
|
+
accessKey: 4,
|
|
17
|
+
rent: 5,
|
|
18
|
+
systemProgram: 6,
|
|
19
|
+
tokenProgram: 7,
|
|
20
|
+
};
|
|
21
|
+
export const OPEN_DISCRIMINATOR = new Uint8Array([
|
|
22
|
+
228, 220, 155, 71, 199, 189, 60, 45,
|
|
23
|
+
]);
|
|
24
|
+
export function getOpenDiscriminatorBytes() {
|
|
25
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(OPEN_DISCRIMINATOR);
|
|
26
|
+
}
|
|
27
|
+
export function getOpenInstructionDataEncoder() {
|
|
28
|
+
return transformEncoder(getStructEncoder([
|
|
29
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
30
|
+
["jobExpiration", getI64Encoder()],
|
|
31
|
+
["jobPrice", getU64Encoder()],
|
|
32
|
+
["jobTimeout", getI64Encoder()],
|
|
33
|
+
["jobType", getU8Encoder()],
|
|
34
|
+
["nodeXnosMinimum", getU128Encoder()],
|
|
35
|
+
]), (value) => ({ ...value, discriminator: OPEN_DISCRIMINATOR }));
|
|
36
|
+
}
|
|
37
|
+
export function getOpenInstructionDataDecoder() {
|
|
38
|
+
return getStructDecoder([
|
|
39
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
40
|
+
["jobExpiration", getI64Decoder()],
|
|
41
|
+
["jobPrice", getU64Decoder()],
|
|
42
|
+
["jobTimeout", getI64Decoder()],
|
|
43
|
+
["jobType", getU8Decoder()],
|
|
44
|
+
["nodeXnosMinimum", getU128Decoder()],
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
export function getOpenInstructionDataCodec() {
|
|
48
|
+
return combineCodec(getOpenInstructionDataEncoder(), getOpenInstructionDataDecoder());
|
|
49
|
+
}
|
|
50
|
+
export function getOpenInstruction(input, config) {
|
|
51
|
+
// Program address.
|
|
52
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
53
|
+
// Original accounts.
|
|
54
|
+
const originalAccounts = {
|
|
55
|
+
mint: { value: input.mint ?? null, isWritable: false },
|
|
56
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
57
|
+
vault: { value: input.vault ?? null, isWritable: true },
|
|
58
|
+
authority: { value: input.authority ?? null, isWritable: true },
|
|
59
|
+
accessKey: { value: input.accessKey ?? null, isWritable: false },
|
|
60
|
+
rent: { value: input.rent ?? null, isWritable: false },
|
|
61
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
62
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
63
|
+
};
|
|
64
|
+
const accounts = originalAccounts;
|
|
65
|
+
// Original args.
|
|
66
|
+
const args = { ...input };
|
|
67
|
+
// Resolve default values.
|
|
68
|
+
if (!accounts.rent.value) {
|
|
69
|
+
accounts.rent.value =
|
|
70
|
+
"SysvarRent111111111111111111111111111111111";
|
|
71
|
+
}
|
|
72
|
+
if (!accounts.systemProgram.value) {
|
|
73
|
+
accounts.systemProgram.value =
|
|
74
|
+
"11111111111111111111111111111111";
|
|
75
|
+
}
|
|
76
|
+
if (!accounts.tokenProgram.value) {
|
|
77
|
+
accounts.tokenProgram.value =
|
|
78
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
79
|
+
}
|
|
80
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
81
|
+
return Object.freeze({
|
|
82
|
+
accounts: [
|
|
83
|
+
getAccountMeta(accounts.mint),
|
|
84
|
+
getAccountMeta(accounts.market),
|
|
85
|
+
getAccountMeta(accounts.vault),
|
|
86
|
+
getAccountMeta(accounts.authority),
|
|
87
|
+
getAccountMeta(accounts.accessKey),
|
|
88
|
+
getAccountMeta(accounts.rent),
|
|
89
|
+
getAccountMeta(accounts.systemProgram),
|
|
90
|
+
getAccountMeta(accounts.tokenProgram),
|
|
91
|
+
],
|
|
92
|
+
data: getOpenInstructionDataEncoder().encode(args),
|
|
93
|
+
programAddress,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export function parseOpenInstruction(instruction) {
|
|
97
|
+
if (instruction.accounts.length < 8) {
|
|
98
|
+
// TODO: Coded error.
|
|
99
|
+
throw new Error("Not enough accounts");
|
|
100
|
+
}
|
|
101
|
+
let accountIndex = 0;
|
|
102
|
+
const getNextAccount = () => {
|
|
103
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
104
|
+
accountIndex += 1;
|
|
105
|
+
return accountMeta;
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
programAddress: instruction.programAddress,
|
|
109
|
+
accounts: {
|
|
110
|
+
mint: getNextAccount(),
|
|
111
|
+
market: getNextAccount(),
|
|
112
|
+
vault: getNextAccount(),
|
|
113
|
+
authority: getNextAccount(),
|
|
114
|
+
accessKey: getNextAccount(),
|
|
115
|
+
rent: getNextAccount(),
|
|
116
|
+
systemProgram: getNextAccount(),
|
|
117
|
+
tokenProgram: getNextAccount(),
|
|
118
|
+
},
|
|
119
|
+
data: getOpenInstructionDataDecoder().decode(instruction.data),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const QUIT_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly job: 0;
|
|
12
|
+
readonly run: 1;
|
|
13
|
+
readonly payer: 2;
|
|
14
|
+
readonly authority: 3;
|
|
15
|
+
};
|
|
16
|
+
export type QuitInstructionAccountName = keyof typeof QUIT_INSTRUCTION_ACCOUNTS;
|
|
17
|
+
export declare const QUIT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
18
|
+
export declare function getQuitDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
19
|
+
export type QuitInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountRun extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
20
|
+
TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob,
|
|
21
|
+
TAccountRun extends string ? WritableAccount<TAccountRun> : TAccountRun,
|
|
22
|
+
TAccountPayer extends string ? WritableAccount<TAccountPayer> : TAccountPayer,
|
|
23
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
24
|
+
...TRemainingAccounts
|
|
25
|
+
]>;
|
|
26
|
+
export type QuitInstructionData = {
|
|
27
|
+
discriminator: ReadonlyUint8Array;
|
|
28
|
+
};
|
|
29
|
+
export type QuitInstructionDataArgs = {};
|
|
30
|
+
export declare function getQuitInstructionDataEncoder(): FixedSizeEncoder<QuitInstructionDataArgs>;
|
|
31
|
+
export declare function getQuitInstructionDataDecoder(): FixedSizeDecoder<QuitInstructionData>;
|
|
32
|
+
export declare function getQuitInstructionDataCodec(): FixedSizeCodec<QuitInstructionDataArgs, QuitInstructionData>;
|
|
33
|
+
export type QuitInput<TAccountJob extends string = string, TAccountRun extends string = string, TAccountPayer extends string = string, TAccountAuthority extends string = string> = {
|
|
34
|
+
job: Address<TAccountJob>;
|
|
35
|
+
run: Address<TAccountRun>;
|
|
36
|
+
payer: Address<TAccountPayer>;
|
|
37
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
38
|
+
};
|
|
39
|
+
export declare function getQuitInstruction<TAccountJob extends string, TAccountRun extends string, TAccountPayer extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: QuitInput<TAccountJob, TAccountRun, TAccountPayer, TAccountAuthority>, config?: {
|
|
40
|
+
programAddress?: TProgramAddress;
|
|
41
|
+
}): QuitInstruction<TProgramAddress, TAccountJob, TAccountRun, TAccountPayer, TAccountAuthority>;
|
|
42
|
+
export type ParsedQuitInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
43
|
+
programAddress: Address<TProgram>;
|
|
44
|
+
accounts: {
|
|
45
|
+
job: TAccountMetas[0];
|
|
46
|
+
run: TAccountMetas[1];
|
|
47
|
+
payer: TAccountMetas[2];
|
|
48
|
+
authority: TAccountMetas[3];
|
|
49
|
+
};
|
|
50
|
+
data: QuitInstructionData;
|
|
51
|
+
};
|
|
52
|
+
export declare function parseQuitInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedQuitInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 QUIT_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
job: 0,
|
|
13
|
+
run: 1,
|
|
14
|
+
payer: 2,
|
|
15
|
+
authority: 3,
|
|
16
|
+
};
|
|
17
|
+
export const QUIT_DISCRIMINATOR = new Uint8Array([
|
|
18
|
+
191, 103, 141, 240, 80, 129, 103, 153,
|
|
19
|
+
]);
|
|
20
|
+
export function getQuitDiscriminatorBytes() {
|
|
21
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(QUIT_DISCRIMINATOR);
|
|
22
|
+
}
|
|
23
|
+
export function getQuitInstructionDataEncoder() {
|
|
24
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: QUIT_DISCRIMINATOR }));
|
|
25
|
+
}
|
|
26
|
+
export function getQuitInstructionDataDecoder() {
|
|
27
|
+
return getStructDecoder([
|
|
28
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
export function getQuitInstructionDataCodec() {
|
|
32
|
+
return combineCodec(getQuitInstructionDataEncoder(), getQuitInstructionDataDecoder());
|
|
33
|
+
}
|
|
34
|
+
export function getQuitInstruction(input, config) {
|
|
35
|
+
// Program address.
|
|
36
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
37
|
+
// Original accounts.
|
|
38
|
+
const originalAccounts = {
|
|
39
|
+
job: { value: input.job ?? null, isWritable: true },
|
|
40
|
+
run: { value: input.run ?? null, isWritable: true },
|
|
41
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
42
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
43
|
+
};
|
|
44
|
+
const accounts = originalAccounts;
|
|
45
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
46
|
+
return Object.freeze({
|
|
47
|
+
accounts: [
|
|
48
|
+
getAccountMeta(accounts.job),
|
|
49
|
+
getAccountMeta(accounts.run),
|
|
50
|
+
getAccountMeta(accounts.payer),
|
|
51
|
+
getAccountMeta(accounts.authority),
|
|
52
|
+
],
|
|
53
|
+
data: getQuitInstructionDataEncoder().encode({}),
|
|
54
|
+
programAddress,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function parseQuitInstruction(instruction) {
|
|
58
|
+
if (instruction.accounts.length < 4) {
|
|
59
|
+
// TODO: Coded error.
|
|
60
|
+
throw new Error("Not enough accounts");
|
|
61
|
+
}
|
|
62
|
+
let accountIndex = 0;
|
|
63
|
+
const getNextAccount = () => {
|
|
64
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
65
|
+
accountIndex += 1;
|
|
66
|
+
return accountMeta;
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
programAddress: instruction.programAddress,
|
|
70
|
+
accounts: {
|
|
71
|
+
job: getNextAccount(),
|
|
72
|
+
run: getNextAccount(),
|
|
73
|
+
payer: getNextAccount(),
|
|
74
|
+
authority: getNextAccount(),
|
|
75
|
+
},
|
|
76
|
+
data: getQuitInstructionDataDecoder().decode(instruction.data),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
|
|
9
|
+
import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
10
|
+
export declare const QUIT_ADMIN_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly run: 0;
|
|
12
|
+
readonly payer: 1;
|
|
13
|
+
readonly authority: 2;
|
|
14
|
+
};
|
|
15
|
+
export type QuitAdminInstructionAccountName = keyof typeof QUIT_ADMIN_INSTRUCTION_ACCOUNTS;
|
|
16
|
+
export declare const QUIT_ADMIN_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
17
|
+
export declare function getQuitAdminDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
18
|
+
export type QuitAdminInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountRun extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
19
|
+
TAccountRun extends string ? WritableAccount<TAccountRun> : TAccountRun,
|
|
20
|
+
TAccountPayer extends string ? WritableAccount<TAccountPayer> : TAccountPayer,
|
|
21
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
22
|
+
...TRemainingAccounts
|
|
23
|
+
]>;
|
|
24
|
+
export type QuitAdminInstructionData = {
|
|
25
|
+
discriminator: ReadonlyUint8Array;
|
|
26
|
+
};
|
|
27
|
+
export type QuitAdminInstructionDataArgs = {};
|
|
28
|
+
export declare function getQuitAdminInstructionDataEncoder(): FixedSizeEncoder<QuitAdminInstructionDataArgs>;
|
|
29
|
+
export declare function getQuitAdminInstructionDataDecoder(): FixedSizeDecoder<QuitAdminInstructionData>;
|
|
30
|
+
export declare function getQuitAdminInstructionDataCodec(): FixedSizeCodec<QuitAdminInstructionDataArgs, QuitAdminInstructionData>;
|
|
31
|
+
export type QuitAdminInput<TAccountRun extends string = string, TAccountPayer extends string = string, TAccountAuthority extends string = string> = {
|
|
32
|
+
run: Address<TAccountRun>;
|
|
33
|
+
payer: Address<TAccountPayer>;
|
|
34
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
35
|
+
};
|
|
36
|
+
export declare function getQuitAdminInstruction<TAccountRun extends string, TAccountPayer extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: QuitAdminInput<TAccountRun, TAccountPayer, TAccountAuthority>, config?: {
|
|
37
|
+
programAddress?: TProgramAddress;
|
|
38
|
+
}): QuitAdminInstruction<TProgramAddress, TAccountRun, TAccountPayer, TAccountAuthority>;
|
|
39
|
+
export type ParsedQuitAdminInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
40
|
+
programAddress: Address<TProgram>;
|
|
41
|
+
accounts: {
|
|
42
|
+
run: TAccountMetas[0];
|
|
43
|
+
payer: TAccountMetas[1];
|
|
44
|
+
authority: TAccountMetas[2];
|
|
45
|
+
};
|
|
46
|
+
data: QuitAdminInstructionData;
|
|
47
|
+
};
|
|
48
|
+
export declare function parseQuitAdminInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedQuitAdminInstruction<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 QUIT_ADMIN_INSTRUCTION_ACCOUNTS = {
|
|
12
|
+
run: 0,
|
|
13
|
+
payer: 1,
|
|
14
|
+
authority: 2,
|
|
15
|
+
};
|
|
16
|
+
export const QUIT_ADMIN_DISCRIMINATOR = new Uint8Array([
|
|
17
|
+
103, 238, 110, 8, 182, 20, 56, 196,
|
|
18
|
+
]);
|
|
19
|
+
export function getQuitAdminDiscriminatorBytes() {
|
|
20
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(QUIT_ADMIN_DISCRIMINATOR);
|
|
21
|
+
}
|
|
22
|
+
export function getQuitAdminInstructionDataEncoder() {
|
|
23
|
+
return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: QUIT_ADMIN_DISCRIMINATOR }));
|
|
24
|
+
}
|
|
25
|
+
export function getQuitAdminInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([
|
|
27
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
export function getQuitAdminInstructionDataCodec() {
|
|
31
|
+
return combineCodec(getQuitAdminInstructionDataEncoder(), getQuitAdminInstructionDataDecoder());
|
|
32
|
+
}
|
|
33
|
+
export function getQuitAdminInstruction(input, config) {
|
|
34
|
+
// Program address.
|
|
35
|
+
const programAddress = config?.programAddress ?? NOSANA_JOBS_PROGRAM_ADDRESS;
|
|
36
|
+
// Original accounts.
|
|
37
|
+
const originalAccounts = {
|
|
38
|
+
run: { value: input.run ?? null, isWritable: true },
|
|
39
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
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.run),
|
|
47
|
+
getAccountMeta(accounts.payer),
|
|
48
|
+
getAccountMeta(accounts.authority),
|
|
49
|
+
],
|
|
50
|
+
data: getQuitAdminInstructionDataEncoder().encode({}),
|
|
51
|
+
programAddress,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export function parseQuitAdminInstruction(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
|
+
run: getNextAccount(),
|
|
69
|
+
payer: getNextAccount(),
|
|
70
|
+
authority: getNextAccount(),
|
|
71
|
+
},
|
|
72
|
+
data: getQuitAdminInstructionDataDecoder().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 RECOVER_INSTRUCTION_ACCOUNTS: {
|
|
11
|
+
readonly job: 0;
|
|
12
|
+
readonly market: 1;
|
|
13
|
+
readonly vault: 2;
|
|
14
|
+
readonly user: 3;
|
|
15
|
+
readonly payer: 4;
|
|
16
|
+
readonly authority: 5;
|
|
17
|
+
readonly tokenProgram: 6;
|
|
18
|
+
};
|
|
19
|
+
export type RecoverInstructionAccountName = keyof typeof RECOVER_INSTRUCTION_ACCOUNTS;
|
|
20
|
+
export declare const RECOVER_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
21
|
+
export declare function getRecoverDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
22
|
+
export type RecoverInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
23
|
+
TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob,
|
|
24
|
+
TAccountMarket extends string ? ReadonlyAccount<TAccountMarket> : TAccountMarket,
|
|
25
|
+
TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
|
|
26
|
+
TAccountUser extends string ? WritableAccount<TAccountUser> : TAccountUser,
|
|
27
|
+
TAccountPayer extends string ? WritableAccount<TAccountPayer> : TAccountPayer,
|
|
28
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
29
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
30
|
+
...TRemainingAccounts
|
|
31
|
+
]>;
|
|
32
|
+
export type RecoverInstructionData = {
|
|
33
|
+
discriminator: ReadonlyUint8Array;
|
|
34
|
+
};
|
|
35
|
+
export type RecoverInstructionDataArgs = {};
|
|
36
|
+
export declare function getRecoverInstructionDataEncoder(): FixedSizeEncoder<RecoverInstructionDataArgs>;
|
|
37
|
+
export declare function getRecoverInstructionDataDecoder(): FixedSizeDecoder<RecoverInstructionData>;
|
|
38
|
+
export declare function getRecoverInstructionDataCodec(): FixedSizeCodec<RecoverInstructionDataArgs, RecoverInstructionData>;
|
|
39
|
+
export type RecoverInput<TAccountJob extends string = string, TAccountMarket extends string = string, TAccountVault extends string = string, TAccountUser extends string = string, TAccountPayer extends string = string, TAccountAuthority extends string = string, TAccountTokenProgram extends string = string> = {
|
|
40
|
+
job: Address<TAccountJob>;
|
|
41
|
+
market: Address<TAccountMarket>;
|
|
42
|
+
vault: Address<TAccountVault>;
|
|
43
|
+
user: Address<TAccountUser>;
|
|
44
|
+
payer: Address<TAccountPayer>;
|
|
45
|
+
authority: TransactionSigner<TAccountAuthority>;
|
|
46
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
47
|
+
};
|
|
48
|
+
export declare function getRecoverInstruction<TAccountJob extends string, TAccountMarket extends string, TAccountVault extends string, TAccountUser extends string, TAccountPayer extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: RecoverInput<TAccountJob, TAccountMarket, TAccountVault, TAccountUser, TAccountPayer, TAccountAuthority, TAccountTokenProgram>, config?: {
|
|
49
|
+
programAddress?: TProgramAddress;
|
|
50
|
+
}): RecoverInstruction<TProgramAddress, TAccountJob, TAccountMarket, TAccountVault, TAccountUser, TAccountPayer, TAccountAuthority, TAccountTokenProgram>;
|
|
51
|
+
export type ParsedRecoverInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
52
|
+
programAddress: Address<TProgram>;
|
|
53
|
+
accounts: {
|
|
54
|
+
job: TAccountMetas[0];
|
|
55
|
+
market: TAccountMetas[1];
|
|
56
|
+
vault: TAccountMetas[2];
|
|
57
|
+
user: TAccountMetas[3];
|
|
58
|
+
payer: TAccountMetas[4];
|
|
59
|
+
authority: TAccountMetas[5];
|
|
60
|
+
tokenProgram: TAccountMetas[6];
|
|
61
|
+
};
|
|
62
|
+
data: RecoverInstructionData;
|
|
63
|
+
};
|
|
64
|
+
export declare function parseRecoverInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRecoverInstruction<TProgram, TAccountMetas>;
|