@intent-engine/core 0.1.50 → 0.1.51
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/generated/client/accounts/claimBoard.d.ts +2 -0
- package/dist/generated/client/accounts/claimBoard.js +4 -2
- package/dist/generated/client/accounts/claimBoard.js.map +1 -1
- package/dist/generated/client/accounts/claimList.d.ts +44 -0
- package/dist/generated/client/accounts/claimList.js +71 -0
- package/dist/generated/client/accounts/claimList.js.map +1 -0
- package/dist/generated/client/accounts/index.d.ts +1 -0
- package/dist/generated/client/accounts/index.js +1 -0
- package/dist/generated/client/accounts/index.js.map +1 -1
- package/dist/generated/client/errors/intentEngine.d.ts +11 -1
- package/dist/generated/client/errors/intentEngine.js +15 -0
- package/dist/generated/client/errors/intentEngine.js.map +1 -1
- package/dist/generated/client/events/claimantsListed.d.ts +26 -0
- package/dist/generated/client/events/claimantsListed.js +44 -0
- package/dist/generated/client/events/claimantsListed.js.map +1 -0
- package/dist/generated/client/events/index.d.ts +1 -0
- package/dist/generated/client/events/index.js +1 -0
- package/dist/generated/client/events/index.js.map +1 -1
- package/dist/generated/client/instructions/claimJob.d.ts +13 -9
- package/dist/generated/client/instructions/claimJob.js +21 -2
- package/dist/generated/client/instructions/claimJob.js.map +1 -1
- package/dist/generated/client/instructions/extendClaimants.d.ts +64 -0
- package/dist/generated/client/instructions/extendClaimants.js +142 -0
- package/dist/generated/client/instructions/extendClaimants.js.map +1 -0
- package/dist/generated/client/instructions/index.d.ts +3 -0
- package/dist/generated/client/instructions/index.js +3 -0
- package/dist/generated/client/instructions/index.js.map +1 -1
- package/dist/generated/client/instructions/listClaimants.d.ts +76 -0
- package/dist/generated/client/instructions/listClaimants.js +178 -0
- package/dist/generated/client/instructions/listClaimants.js.map +1 -0
- package/dist/generated/client/instructions/openClaimsListed.d.ts +84 -0
- package/dist/generated/client/instructions/openClaimsListed.js +180 -0
- package/dist/generated/client/instructions/openClaimsListed.js.map +1 -0
- package/dist/generated/client/instructions/settleClaims.d.ts +13 -9
- package/dist/generated/client/instructions/settleClaims.js +15 -2
- package/dist/generated/client/instructions/settleClaims.js.map +1 -1
- package/dist/generated/client/instructions/standBy.d.ts +13 -9
- package/dist/generated/client/instructions/standBy.js +21 -2
- package/dist/generated/client/instructions/standBy.js.map +1 -1
- package/dist/generated/client/pdas/claimList.d.ts +14 -0
- package/dist/generated/client/pdas/claimList.js +19 -0
- package/dist/generated/client/pdas/claimList.js.map +1 -0
- package/dist/generated/client/pdas/index.d.ts +1 -0
- package/dist/generated/client/pdas/index.js +1 -0
- package/dist/generated/client/pdas/index.js.map +1 -1
- package/dist/generated/client/programs/intentEngine.d.ts +154 -133
- package/dist/generated/client/programs/intentEngine.js +184 -133
- package/dist/generated/client/programs/intentEngine.js.map +1 -1
- package/dist/src/claim-list.d.ts +37 -0
- package/dist/src/claim-list.js +59 -0
- package/dist/src/claim-list.js.map +1 -0
- package/dist/src/claims.d.ts +6 -3
- package/dist/src/claims.js +5 -2
- package/dist/src/claims.js.map +1 -1
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js +3 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/events.d.ts +2 -1
- package/dist/src/events.js +2 -1
- package/dist/src/events.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/versions.d.ts +1 -0
- package/dist/src/versions.js +3 -1
- package/dist/src/versions.js.map +1 -1
- package/generated/idl.json +489 -1
- package/package.json +1 -1
|
@@ -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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
|
|
9
|
+
import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from "@solana/kit/program-client-core";
|
|
10
|
+
import { INTENT_ENGINE_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
|
+
export declare const OPEN_CLAIMS_LISTED_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getOpenClaimsListedDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type OpenClaimsListedInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountIntent extends string | AccountMeta<string> = string, TAccountBoard extends string | AccountMeta<string> = string, TAccountClaimList extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
14
|
+
TAccountOwner extends string ? WritableSignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
15
|
+
TAccountIntent extends string ? WritableAccount<TAccountIntent> : TAccountIntent,
|
|
16
|
+
TAccountBoard extends string ? WritableAccount<TAccountBoard> : TAccountBoard,
|
|
17
|
+
TAccountClaimList extends string ? WritableAccount<TAccountClaimList> : TAccountClaimList,
|
|
18
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
19
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
20
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
21
|
+
...TRemainingAccounts
|
|
22
|
+
]>;
|
|
23
|
+
export type OpenClaimsListedInstructionData = {
|
|
24
|
+
discriminator: ReadonlyUint8Array;
|
|
25
|
+
maxSecs: number;
|
|
26
|
+
stake: bigint;
|
|
27
|
+
size: number;
|
|
28
|
+
workers: Array<Address>;
|
|
29
|
+
};
|
|
30
|
+
export type OpenClaimsListedInstructionDataArgs = {
|
|
31
|
+
maxSecs: number;
|
|
32
|
+
stake: number | bigint;
|
|
33
|
+
size: number;
|
|
34
|
+
workers: Array<Address>;
|
|
35
|
+
};
|
|
36
|
+
export declare function getOpenClaimsListedInstructionDataEncoder(): Encoder<OpenClaimsListedInstructionDataArgs>;
|
|
37
|
+
export declare function getOpenClaimsListedInstructionDataDecoder(): Decoder<OpenClaimsListedInstructionData>;
|
|
38
|
+
export declare function getOpenClaimsListedInstructionDataCodec(): Codec<OpenClaimsListedInstructionDataArgs, OpenClaimsListedInstructionData>;
|
|
39
|
+
export type OpenClaimsListedAsyncInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
40
|
+
owner: TAccountOwner;
|
|
41
|
+
intent: TAccountIntent;
|
|
42
|
+
board?: TAccountBoard;
|
|
43
|
+
claimList?: TAccountClaimList;
|
|
44
|
+
systemProgram?: TAccountSystemProgram;
|
|
45
|
+
eventAuthority: TAccountEventAuthority;
|
|
46
|
+
program: TAccountProgram;
|
|
47
|
+
maxSecs: OpenClaimsListedInstructionDataArgs["maxSecs"];
|
|
48
|
+
stake: OpenClaimsListedInstructionDataArgs["stake"];
|
|
49
|
+
size: OpenClaimsListedInstructionDataArgs["size"];
|
|
50
|
+
workers: OpenClaimsListedInstructionDataArgs["workers"];
|
|
51
|
+
};
|
|
52
|
+
export declare function getOpenClaimsListedInstructionAsync<TAccountOwner extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: OpenClaimsListedAsyncInput<TAccountOwner, TAccountIntent, TAccountBoard, TAccountClaimList, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
53
|
+
programAddress?: TProgramAddress;
|
|
54
|
+
}): Promise<OpenClaimsListedInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
55
|
+
export type OpenClaimsListedInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
56
|
+
owner: TAccountOwner;
|
|
57
|
+
intent: TAccountIntent;
|
|
58
|
+
board: TAccountBoard;
|
|
59
|
+
claimList: TAccountClaimList;
|
|
60
|
+
systemProgram?: TAccountSystemProgram;
|
|
61
|
+
eventAuthority: TAccountEventAuthority;
|
|
62
|
+
program: TAccountProgram;
|
|
63
|
+
maxSecs: OpenClaimsListedInstructionDataArgs["maxSecs"];
|
|
64
|
+
stake: OpenClaimsListedInstructionDataArgs["stake"];
|
|
65
|
+
size: OpenClaimsListedInstructionDataArgs["size"];
|
|
66
|
+
workers: OpenClaimsListedInstructionDataArgs["workers"];
|
|
67
|
+
};
|
|
68
|
+
export declare function getOpenClaimsListedInstruction<TAccountOwner extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: OpenClaimsListedInput<TAccountOwner, TAccountIntent, TAccountBoard, TAccountClaimList, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
69
|
+
programAddress?: TProgramAddress;
|
|
70
|
+
}): OpenClaimsListedInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
71
|
+
export type ParsedOpenClaimsListedInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
72
|
+
programAddress: Address<TProgram>;
|
|
73
|
+
accounts: {
|
|
74
|
+
owner: TAccountMetas[0];
|
|
75
|
+
intent: TAccountMetas[1];
|
|
76
|
+
board: TAccountMetas[2];
|
|
77
|
+
claimList: TAccountMetas[3];
|
|
78
|
+
systemProgram: TAccountMetas[4];
|
|
79
|
+
eventAuthority: TAccountMetas[5];
|
|
80
|
+
program: TAccountMetas[6];
|
|
81
|
+
};
|
|
82
|
+
data: OpenClaimsListedInstructionData;
|
|
83
|
+
};
|
|
84
|
+
export declare function parseOpenClaimsListedInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedOpenClaimsListedInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,180 @@
|
|
|
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, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, } from "@solana/kit/program-client-core";
|
|
10
|
+
import { findBoardPda, findClaimListPda } from "../pdas/index.js";
|
|
11
|
+
import { INTENT_ENGINE_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
12
|
+
export const OPEN_CLAIMS_LISTED_DISCRIMINATOR = new Uint8Array([240, 197, 105, 76, 62, 110, 154, 3]);
|
|
13
|
+
export function getOpenClaimsListedDiscriminatorBytes() {
|
|
14
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(OPEN_CLAIMS_LISTED_DISCRIMINATOR);
|
|
15
|
+
}
|
|
16
|
+
export function getOpenClaimsListedInstructionDataEncoder() {
|
|
17
|
+
return transformEncoder(getStructEncoder([
|
|
18
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
19
|
+
["maxSecs", getU32Encoder()],
|
|
20
|
+
["stake", getU64Encoder()],
|
|
21
|
+
["size", getU8Encoder()],
|
|
22
|
+
["workers", getArrayEncoder(getAddressEncoder())],
|
|
23
|
+
]), (value) => ({ ...value, discriminator: OPEN_CLAIMS_LISTED_DISCRIMINATOR }));
|
|
24
|
+
}
|
|
25
|
+
export function getOpenClaimsListedInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([
|
|
27
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
+
["maxSecs", getU32Decoder()],
|
|
29
|
+
["stake", getU64Decoder()],
|
|
30
|
+
["size", getU8Decoder()],
|
|
31
|
+
["workers", getArrayDecoder(getAddressDecoder())],
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
export function getOpenClaimsListedInstructionDataCodec() {
|
|
35
|
+
return combineCodec(getOpenClaimsListedInstructionDataEncoder(), getOpenClaimsListedInstructionDataDecoder());
|
|
36
|
+
}
|
|
37
|
+
export async function getOpenClaimsListedInstructionAsync(input, config) {
|
|
38
|
+
// Program address.
|
|
39
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
40
|
+
// Account meta helper.
|
|
41
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
42
|
+
// Original accounts.
|
|
43
|
+
const originalAccounts = {
|
|
44
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
45
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: true },
|
|
46
|
+
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
47
|
+
claimList: {
|
|
48
|
+
value: input.claimList ?? null,
|
|
49
|
+
isSigner: false,
|
|
50
|
+
isWritable: true,
|
|
51
|
+
},
|
|
52
|
+
systemProgram: {
|
|
53
|
+
value: input.systemProgram ?? null,
|
|
54
|
+
isSigner: false,
|
|
55
|
+
isWritable: false,
|
|
56
|
+
},
|
|
57
|
+
eventAuthority: {
|
|
58
|
+
value: input.eventAuthority ?? null,
|
|
59
|
+
isSigner: false,
|
|
60
|
+
isWritable: false,
|
|
61
|
+
},
|
|
62
|
+
program: {
|
|
63
|
+
value: input.program ?? null,
|
|
64
|
+
isSigner: false,
|
|
65
|
+
isWritable: false,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
const accounts = originalAccounts;
|
|
69
|
+
// Original args.
|
|
70
|
+
const args = { ...input };
|
|
71
|
+
// Resolve default values.
|
|
72
|
+
if (!accounts.board.value) {
|
|
73
|
+
accounts.board.value = await findBoardPda({
|
|
74
|
+
intent: getAddressFromResolvedInstructionAccount("intent", accounts.intent.value),
|
|
75
|
+
}, { programAddress });
|
|
76
|
+
}
|
|
77
|
+
if (!accounts.claimList.value) {
|
|
78
|
+
accounts.claimList.value = await findClaimListPda({
|
|
79
|
+
intent: getAddressFromResolvedInstructionAccount("intent", accounts.intent.value),
|
|
80
|
+
}, { programAddress });
|
|
81
|
+
}
|
|
82
|
+
if (!accounts.systemProgram.value) {
|
|
83
|
+
accounts.systemProgram.value =
|
|
84
|
+
"11111111111111111111111111111111";
|
|
85
|
+
}
|
|
86
|
+
return Object.freeze({
|
|
87
|
+
accounts: [
|
|
88
|
+
getAccountMeta("owner", accounts.owner),
|
|
89
|
+
getAccountMeta("intent", accounts.intent),
|
|
90
|
+
getAccountMeta("board", accounts.board),
|
|
91
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
92
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
93
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
94
|
+
getAccountMeta("program", accounts.program),
|
|
95
|
+
],
|
|
96
|
+
data: getOpenClaimsListedInstructionDataEncoder().encode(args),
|
|
97
|
+
programAddress,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
export function getOpenClaimsListedInstruction(input, config) {
|
|
101
|
+
// Program address.
|
|
102
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
103
|
+
// Account meta helper.
|
|
104
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
105
|
+
// Original accounts.
|
|
106
|
+
const originalAccounts = {
|
|
107
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
108
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: true },
|
|
109
|
+
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
110
|
+
claimList: {
|
|
111
|
+
value: input.claimList ?? null,
|
|
112
|
+
isSigner: false,
|
|
113
|
+
isWritable: true,
|
|
114
|
+
},
|
|
115
|
+
systemProgram: {
|
|
116
|
+
value: input.systemProgram ?? null,
|
|
117
|
+
isSigner: false,
|
|
118
|
+
isWritable: false,
|
|
119
|
+
},
|
|
120
|
+
eventAuthority: {
|
|
121
|
+
value: input.eventAuthority ?? null,
|
|
122
|
+
isSigner: false,
|
|
123
|
+
isWritable: false,
|
|
124
|
+
},
|
|
125
|
+
program: {
|
|
126
|
+
value: input.program ?? null,
|
|
127
|
+
isSigner: false,
|
|
128
|
+
isWritable: false,
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
const accounts = originalAccounts;
|
|
132
|
+
// Original args.
|
|
133
|
+
const args = { ...input };
|
|
134
|
+
// Resolve default values.
|
|
135
|
+
if (!accounts.systemProgram.value) {
|
|
136
|
+
accounts.systemProgram.value =
|
|
137
|
+
"11111111111111111111111111111111";
|
|
138
|
+
}
|
|
139
|
+
return Object.freeze({
|
|
140
|
+
accounts: [
|
|
141
|
+
getAccountMeta("owner", accounts.owner),
|
|
142
|
+
getAccountMeta("intent", accounts.intent),
|
|
143
|
+
getAccountMeta("board", accounts.board),
|
|
144
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
145
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
146
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
147
|
+
getAccountMeta("program", accounts.program),
|
|
148
|
+
],
|
|
149
|
+
data: getOpenClaimsListedInstructionDataEncoder().encode(args),
|
|
150
|
+
programAddress,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
export function parseOpenClaimsListedInstruction(instruction) {
|
|
154
|
+
if (instruction.accounts.length < 7) {
|
|
155
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
156
|
+
actualAccountMetas: instruction.accounts.length,
|
|
157
|
+
expectedAccountMetas: 7,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
let accountIndex = 0;
|
|
161
|
+
const getNextAccount = () => {
|
|
162
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
163
|
+
accountIndex += 1;
|
|
164
|
+
return accountMeta;
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
programAddress: instruction.programAddress,
|
|
168
|
+
accounts: {
|
|
169
|
+
owner: getNextAccount(),
|
|
170
|
+
intent: getNextAccount(),
|
|
171
|
+
board: getNextAccount(),
|
|
172
|
+
claimList: getNextAccount(),
|
|
173
|
+
systemProgram: getNextAccount(),
|
|
174
|
+
eventAuthority: getNextAccount(),
|
|
175
|
+
program: getNextAccount(),
|
|
176
|
+
},
|
|
177
|
+
data: getOpenClaimsListedInstructionDataDecoder().decode(instruction.data),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=openClaimsListed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openClaimsListed.js","sourceRoot":"","sources":["../../../../generated/client/instructions/openClaimsListed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAMzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,gCAAgC,GAC3C,IAAI,UAAU,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAEvD,MAAM,UAAU,qCAAqC;IACnD,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,gCAAgC,CACjC,CAAC;AACJ,CAAC;AA0DD,MAAM,UAAU,yCAAyC;IACvD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC;QACf,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC;QAC5B,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC;QAC1B,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC;QACxB,CAAC,SAAS,EAAE,eAAe,CAAC,iBAAiB,EAAE,CAAC,C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5C;QACD,cAAc;KA+Bf,CAAC,CAAC;AACL,CAAC;AAmBD,MAAM,UAAU,gCAAgC,CAI9C,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,WAAW,CACnB,yDAAyD,EACzD;YACE,kBAAkB,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM;YAC/C,oBAAoB,EAAE,CAAC;SACxB,CACF,CAAC;IACJ,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAI,WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,KAAK,EAAE,cAAc,EAAE;YACvB,MAAM,EAAE,cAAc,EAAE;YACxB,KAAK,EAAE,cAAc,EAAE;YACvB,SAAS,EAAE,cAAc,EAAE;YAC3B,aAAa,EAAE,cAAc,EAAE;YAC/B,cAAc,EAAE,cAAc,EAAE;YAChC,OAAO,EAAE,cAAc,EAAE;SAC1B;QACD,IAAI,EAAE,yCAAyC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KAC3E,CAAC;AACJ,CAAC"}
|
|
@@ -10,11 +10,12 @@ import { type InstructionAccountInput, type InstructionAccountInputAddress, type
|
|
|
10
10
|
import { INTENT_ENGINE_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
11
|
export declare const SETTLE_CLAIMS_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
12
|
export declare function getSettleClaimsDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
-
export type SettleClaimsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountIntent extends string | AccountMeta<string> = string, TAccountBoard extends string | AccountMeta<string> = string, TAccountOwner extends string | AccountMeta<string> = string, TAccountWorker extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
export type SettleClaimsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountIntent extends string | AccountMeta<string> = string, TAccountBoard extends string | AccountMeta<string> = string, TAccountOwner extends string | AccountMeta<string> = string, TAccountWorker extends string | AccountMeta<string> = string, TAccountClaimList extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
14
14
|
TAccountIntent extends string ? ReadonlyAccount<TAccountIntent> : TAccountIntent,
|
|
15
15
|
TAccountBoard extends string ? WritableAccount<TAccountBoard> : TAccountBoard,
|
|
16
16
|
TAccountOwner extends string ? WritableAccount<TAccountOwner> : TAccountOwner,
|
|
17
17
|
TAccountWorker extends string ? WritableAccount<TAccountWorker> : TAccountWorker,
|
|
18
|
+
TAccountClaimList extends string ? WritableAccount<TAccountClaimList> : TAccountClaimList,
|
|
18
19
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
19
20
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
20
21
|
...TRemainingAccounts
|
|
@@ -26,28 +27,30 @@ export type SettleClaimsInstructionDataArgs = {};
|
|
|
26
27
|
export declare function getSettleClaimsInstructionDataEncoder(): FixedSizeEncoder<SettleClaimsInstructionDataArgs>;
|
|
27
28
|
export declare function getSettleClaimsInstructionDataDecoder(): FixedSizeDecoder<SettleClaimsInstructionData>;
|
|
28
29
|
export declare function getSettleClaimsInstructionDataCodec(): FixedSizeCodec<SettleClaimsInstructionDataArgs, SettleClaimsInstructionData>;
|
|
29
|
-
export type SettleClaimsAsyncInput<TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountOwner extends InstructionAccountInput = InstructionAccountInput, TAccountWorker extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
30
|
+
export type SettleClaimsAsyncInput<TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountOwner extends InstructionAccountInput = InstructionAccountInput, TAccountWorker extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
30
31
|
intent: TAccountIntent;
|
|
31
32
|
board?: TAccountBoard;
|
|
32
33
|
owner: TAccountOwner;
|
|
33
34
|
worker?: TAccountWorker;
|
|
35
|
+
claimList?: TAccountClaimList;
|
|
34
36
|
eventAuthority: TAccountEventAuthority;
|
|
35
37
|
program: TAccountProgram;
|
|
36
38
|
};
|
|
37
|
-
export declare function getSettleClaimsInstructionAsync<TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountOwner extends InstructionAccountInput, TAccountWorker extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: SettleClaimsAsyncInput<TAccountIntent, TAccountBoard, TAccountOwner, TAccountWorker, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
39
|
+
export declare function getSettleClaimsInstructionAsync<TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountOwner extends InstructionAccountInput, TAccountWorker extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: SettleClaimsAsyncInput<TAccountIntent, TAccountBoard, TAccountOwner, TAccountWorker, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
38
40
|
programAddress?: TProgramAddress;
|
|
39
|
-
}): Promise<SettleClaimsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
40
|
-
export type SettleClaimsInput<TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountOwner extends InstructionAccountInput = InstructionAccountInput, TAccountWorker extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
41
|
+
}): Promise<SettleClaimsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
42
|
+
export type SettleClaimsInput<TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountOwner extends InstructionAccountInput = InstructionAccountInput, TAccountWorker extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
41
43
|
intent: TAccountIntent;
|
|
42
44
|
board: TAccountBoard;
|
|
43
45
|
owner: TAccountOwner;
|
|
44
46
|
worker?: TAccountWorker;
|
|
47
|
+
claimList?: TAccountClaimList;
|
|
45
48
|
eventAuthority: TAccountEventAuthority;
|
|
46
49
|
program: TAccountProgram;
|
|
47
50
|
};
|
|
48
|
-
export declare function getSettleClaimsInstruction<TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountOwner extends InstructionAccountInput, TAccountWorker extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: SettleClaimsInput<TAccountIntent, TAccountBoard, TAccountOwner, TAccountWorker, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
51
|
+
export declare function getSettleClaimsInstruction<TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountOwner extends InstructionAccountInput, TAccountWorker extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: SettleClaimsInput<TAccountIntent, TAccountBoard, TAccountOwner, TAccountWorker, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
49
52
|
programAddress?: TProgramAddress;
|
|
50
|
-
}): SettleClaimsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
53
|
+
}): SettleClaimsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
51
54
|
export type ParsedSettleClaimsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
52
55
|
programAddress: Address<TProgram>;
|
|
53
56
|
accounts: {
|
|
@@ -55,8 +58,9 @@ export type ParsedSettleClaimsInstruction<TProgram extends string = typeof INTEN
|
|
|
55
58
|
board: TAccountMetas[1];
|
|
56
59
|
owner: TAccountMetas[2];
|
|
57
60
|
worker?: TAccountMetas[3] | undefined;
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
claimList?: TAccountMetas[4] | undefined;
|
|
62
|
+
eventAuthority: TAccountMetas[5];
|
|
63
|
+
program: TAccountMetas[6];
|
|
60
64
|
};
|
|
61
65
|
data: SettleClaimsInstructionData;
|
|
62
66
|
};
|
|
@@ -37,6 +37,11 @@ export async function getSettleClaimsInstructionAsync(input, config) {
|
|
|
37
37
|
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
38
38
|
owner: { value: input.owner ?? null, isSigner: false, isWritable: true },
|
|
39
39
|
worker: { value: input.worker ?? null, isSigner: false, isWritable: true },
|
|
40
|
+
claimList: {
|
|
41
|
+
value: input.claimList ?? null,
|
|
42
|
+
isSigner: false,
|
|
43
|
+
isWritable: true,
|
|
44
|
+
},
|
|
40
45
|
eventAuthority: {
|
|
41
46
|
value: input.eventAuthority ?? null,
|
|
42
47
|
isSigner: false,
|
|
@@ -61,6 +66,7 @@ export async function getSettleClaimsInstructionAsync(input, config) {
|
|
|
61
66
|
getAccountMeta("board", accounts.board),
|
|
62
67
|
getAccountMeta("owner", accounts.owner),
|
|
63
68
|
getAccountMeta("worker", accounts.worker),
|
|
69
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
64
70
|
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
65
71
|
getAccountMeta("program", accounts.program),
|
|
66
72
|
],
|
|
@@ -79,6 +85,11 @@ export function getSettleClaimsInstruction(input, config) {
|
|
|
79
85
|
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
80
86
|
owner: { value: input.owner ?? null, isSigner: false, isWritable: true },
|
|
81
87
|
worker: { value: input.worker ?? null, isSigner: false, isWritable: true },
|
|
88
|
+
claimList: {
|
|
89
|
+
value: input.claimList ?? null,
|
|
90
|
+
isSigner: false,
|
|
91
|
+
isWritable: true,
|
|
92
|
+
},
|
|
82
93
|
eventAuthority: {
|
|
83
94
|
value: input.eventAuthority ?? null,
|
|
84
95
|
isSigner: false,
|
|
@@ -97,6 +108,7 @@ export function getSettleClaimsInstruction(input, config) {
|
|
|
97
108
|
getAccountMeta("board", accounts.board),
|
|
98
109
|
getAccountMeta("owner", accounts.owner),
|
|
99
110
|
getAccountMeta("worker", accounts.worker),
|
|
111
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
100
112
|
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
101
113
|
getAccountMeta("program", accounts.program),
|
|
102
114
|
],
|
|
@@ -105,10 +117,10 @@ export function getSettleClaimsInstruction(input, config) {
|
|
|
105
117
|
});
|
|
106
118
|
}
|
|
107
119
|
export function parseSettleClaimsInstruction(instruction) {
|
|
108
|
-
if (instruction.accounts.length <
|
|
120
|
+
if (instruction.accounts.length < 7) {
|
|
109
121
|
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
110
122
|
actualAccountMetas: instruction.accounts.length,
|
|
111
|
-
expectedAccountMetas:
|
|
123
|
+
expectedAccountMetas: 7,
|
|
112
124
|
});
|
|
113
125
|
}
|
|
114
126
|
let accountIndex = 0;
|
|
@@ -130,6 +142,7 @@ export function parseSettleClaimsInstruction(instruction) {
|
|
|
130
142
|
board: getNextAccount(),
|
|
131
143
|
owner: getNextAccount(),
|
|
132
144
|
worker: getNextOptionalAccount(),
|
|
145
|
+
claimList: getNextOptionalAccount(),
|
|
133
146
|
eventAuthority: getNextAccount(),
|
|
134
147
|
program: getNextAccount(),
|
|
135
148
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settleClaims.js","sourceRoot":"","sources":["../../../../generated/client/instructions/settleClaims.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAYjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAKzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,2BAA2B,GAAuB,IAAI,UAAU,CAAC;IAC5E,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,2BAA2B,CAC5B,CAAC;AACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"settleClaims.js","sourceRoot":"","sources":["../../../../generated/client/instructions/settleClaims.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAYjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAKzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,2BAA2B,GAAuB,IAAI,UAAU,CAAC;IAC5E,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,2BAA2B,CAC5B,CAAC;AACJ,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ACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,MAAM,EAAE,cAAc,EAAE;YACxB,KAAK,EAAE,cAAc,EAAE;YACvB,KAAK,EAAE,cAAc,EAAE;YACvB,MAAM,EAAE,sBAAsB,EAAE;YAChC,SAAS,EAAE,sBAAsB,EAAE;YACnC,cAAc,EAAE,cAAc,EAAE;YAChC,OAAO,EAAE,cAAc,EAAE;SAC1B;QACD,IAAI,EAAE,qCAAqC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACvE,CAAC;AACJ,CAAC"}
|
|
@@ -10,13 +10,14 @@ import { type InstructionAccountInput, type InstructionAccountInputAddress, type
|
|
|
10
10
|
import { INTENT_ENGINE_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
11
11
|
export declare const STAND_BY_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
12
|
export declare function getStandByDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
-
export type StandByInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountWorker extends string | AccountMeta<string> = string, TAccountIntent extends string | AccountMeta<string> = string, TAccountBoard extends string | AccountMeta<string> = string, TAccountEntry extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountConfig extends string | AccountMeta<string> = "6As2PgaNQ2DdSZMcrZeUJZ7RfyE2kXnVd33yxbgXULYz", TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
export type StandByInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountWorker extends string | AccountMeta<string> = string, TAccountIntent extends string | AccountMeta<string> = string, TAccountBoard extends string | AccountMeta<string> = string, TAccountEntry extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountConfig extends string | AccountMeta<string> = "6As2PgaNQ2DdSZMcrZeUJZ7RfyE2kXnVd33yxbgXULYz", TAccountClaimList extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
14
14
|
TAccountWorker extends string ? WritableSignerAccount<TAccountWorker> & AccountSignerMeta<TAccountWorker> : TAccountWorker,
|
|
15
15
|
TAccountIntent extends string ? ReadonlyAccount<TAccountIntent> : TAccountIntent,
|
|
16
16
|
TAccountBoard extends string ? WritableAccount<TAccountBoard> : TAccountBoard,
|
|
17
17
|
TAccountEntry extends string ? WritableAccount<TAccountEntry> : TAccountEntry,
|
|
18
18
|
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
19
19
|
TAccountConfig extends string ? ReadonlyAccount<TAccountConfig> : TAccountConfig,
|
|
20
|
+
TAccountClaimList extends string ? ReadonlyAccount<TAccountClaimList> : TAccountClaimList,
|
|
20
21
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
21
22
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
22
23
|
...TRemainingAccounts
|
|
@@ -31,34 +32,36 @@ export type StandByInstructionDataArgs = {
|
|
|
31
32
|
export declare function getStandByInstructionDataEncoder(): FixedSizeEncoder<StandByInstructionDataArgs>;
|
|
32
33
|
export declare function getStandByInstructionDataDecoder(): FixedSizeDecoder<StandByInstructionData>;
|
|
33
34
|
export declare function getStandByInstructionDataCodec(): FixedSizeCodec<StandByInstructionDataArgs, StandByInstructionData>;
|
|
34
|
-
export type StandByAsyncInput<TAccountWorker extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountEntry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
35
|
+
export type StandByAsyncInput<TAccountWorker extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountEntry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
35
36
|
worker: TAccountWorker;
|
|
36
37
|
intent: TAccountIntent;
|
|
37
38
|
board?: TAccountBoard;
|
|
38
39
|
entry: TAccountEntry;
|
|
39
40
|
systemProgram?: TAccountSystemProgram;
|
|
40
41
|
config?: TAccountConfig;
|
|
42
|
+
claimList?: TAccountClaimList;
|
|
41
43
|
eventAuthority: TAccountEventAuthority;
|
|
42
44
|
program: TAccountProgram;
|
|
43
45
|
secs: StandByInstructionDataArgs["secs"];
|
|
44
46
|
};
|
|
45
|
-
export declare function getStandByInstructionAsync<TAccountWorker extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountEntry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: StandByAsyncInput<TAccountWorker, TAccountIntent, TAccountBoard, TAccountEntry, TAccountSystemProgram, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
47
|
+
export declare function getStandByInstructionAsync<TAccountWorker extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountEntry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: StandByAsyncInput<TAccountWorker, TAccountIntent, TAccountBoard, TAccountEntry, TAccountSystemProgram, TAccountConfig, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
46
48
|
programAddress?: TProgramAddress;
|
|
47
|
-
}): Promise<StandByInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountEntry, InstructionAccountInputAddress<TAccountEntry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
48
|
-
export type StandByInput<TAccountWorker extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountEntry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
49
|
+
}): Promise<StandByInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountEntry, InstructionAccountInputAddress<TAccountEntry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
50
|
+
export type StandByInput<TAccountWorker extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountBoard extends InstructionAccountInput = InstructionAccountInput, TAccountEntry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
49
51
|
worker: TAccountWorker;
|
|
50
52
|
intent: TAccountIntent;
|
|
51
53
|
board: TAccountBoard;
|
|
52
54
|
entry: TAccountEntry;
|
|
53
55
|
systemProgram?: TAccountSystemProgram;
|
|
54
56
|
config?: TAccountConfig;
|
|
57
|
+
claimList?: TAccountClaimList;
|
|
55
58
|
eventAuthority: TAccountEventAuthority;
|
|
56
59
|
program: TAccountProgram;
|
|
57
60
|
secs: StandByInstructionDataArgs["secs"];
|
|
58
61
|
};
|
|
59
|
-
export declare function getStandByInstruction<TAccountWorker extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountEntry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: StandByInput<TAccountWorker, TAccountIntent, TAccountBoard, TAccountEntry, TAccountSystemProgram, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
62
|
+
export declare function getStandByInstruction<TAccountWorker extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountBoard extends InstructionAccountInput, TAccountEntry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: StandByInput<TAccountWorker, TAccountIntent, TAccountBoard, TAccountEntry, TAccountSystemProgram, TAccountConfig, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
60
63
|
programAddress?: TProgramAddress;
|
|
61
|
-
}): StandByInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountEntry, InstructionAccountInputAddress<TAccountEntry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
64
|
+
}): StandByInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountWorker, InstructionAccountInputAddress<TAccountWorker>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountBoard, InstructionAccountInputAddress<TAccountBoard>>, ResolvedInstructionAccountMeta<TAccountEntry, InstructionAccountInputAddress<TAccountEntry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
62
65
|
export type ParsedStandByInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
63
66
|
programAddress: Address<TProgram>;
|
|
64
67
|
accounts: {
|
|
@@ -68,8 +71,9 @@ export type ParsedStandByInstruction<TProgram extends string = typeof INTENT_ENG
|
|
|
68
71
|
entry: TAccountMetas[3];
|
|
69
72
|
systemProgram: TAccountMetas[4];
|
|
70
73
|
config: TAccountMetas[5];
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
claimList?: TAccountMetas[6] | undefined;
|
|
75
|
+
eventAuthority: TAccountMetas[7];
|
|
76
|
+
program: TAccountMetas[8];
|
|
73
77
|
};
|
|
74
78
|
data: StandByInstructionData;
|
|
75
79
|
};
|
|
@@ -47,6 +47,11 @@ export async function getStandByInstructionAsync(input, config) {
|
|
|
47
47
|
isWritable: false,
|
|
48
48
|
},
|
|
49
49
|
config: { value: input.config ?? null, isSigner: false, isWritable: false },
|
|
50
|
+
claimList: {
|
|
51
|
+
value: input.claimList ?? null,
|
|
52
|
+
isSigner: false,
|
|
53
|
+
isWritable: false,
|
|
54
|
+
},
|
|
50
55
|
eventAuthority: {
|
|
51
56
|
value: input.eventAuthority ?? null,
|
|
52
57
|
isSigner: false,
|
|
@@ -83,6 +88,7 @@ export async function getStandByInstructionAsync(input, config) {
|
|
|
83
88
|
getAccountMeta("entry", accounts.entry),
|
|
84
89
|
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
85
90
|
getAccountMeta("config", accounts.config),
|
|
91
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
86
92
|
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
87
93
|
getAccountMeta("program", accounts.program),
|
|
88
94
|
],
|
|
@@ -107,6 +113,11 @@ export function getStandByInstruction(input, config) {
|
|
|
107
113
|
isWritable: false,
|
|
108
114
|
},
|
|
109
115
|
config: { value: input.config ?? null, isSigner: false, isWritable: false },
|
|
116
|
+
claimList: {
|
|
117
|
+
value: input.claimList ?? null,
|
|
118
|
+
isSigner: false,
|
|
119
|
+
isWritable: false,
|
|
120
|
+
},
|
|
110
121
|
eventAuthority: {
|
|
111
122
|
value: input.eventAuthority ?? null,
|
|
112
123
|
isSigner: false,
|
|
@@ -138,6 +149,7 @@ export function getStandByInstruction(input, config) {
|
|
|
138
149
|
getAccountMeta("entry", accounts.entry),
|
|
139
150
|
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
140
151
|
getAccountMeta("config", accounts.config),
|
|
152
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
141
153
|
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
142
154
|
getAccountMeta("program", accounts.program),
|
|
143
155
|
],
|
|
@@ -146,10 +158,10 @@ export function getStandByInstruction(input, config) {
|
|
|
146
158
|
});
|
|
147
159
|
}
|
|
148
160
|
export function parseStandByInstruction(instruction) {
|
|
149
|
-
if (instruction.accounts.length <
|
|
161
|
+
if (instruction.accounts.length < 9) {
|
|
150
162
|
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
151
163
|
actualAccountMetas: instruction.accounts.length,
|
|
152
|
-
expectedAccountMetas:
|
|
164
|
+
expectedAccountMetas: 9,
|
|
153
165
|
});
|
|
154
166
|
}
|
|
155
167
|
let accountIndex = 0;
|
|
@@ -158,6 +170,12 @@ export function parseStandByInstruction(instruction) {
|
|
|
158
170
|
accountIndex += 1;
|
|
159
171
|
return accountMeta;
|
|
160
172
|
};
|
|
173
|
+
const getNextOptionalAccount = () => {
|
|
174
|
+
const accountMeta = getNextAccount();
|
|
175
|
+
return accountMeta.address === INTENT_ENGINE_PROGRAM_ADDRESS
|
|
176
|
+
? undefined
|
|
177
|
+
: accountMeta;
|
|
178
|
+
};
|
|
161
179
|
return {
|
|
162
180
|
programAddress: instruction.programAddress,
|
|
163
181
|
accounts: {
|
|
@@ -167,6 +185,7 @@ export function parseStandByInstruction(instruction) {
|
|
|
167
185
|
entry: getNextAccount(),
|
|
168
186
|
systemProgram: getNextAccount(),
|
|
169
187
|
config: getNextAccount(),
|
|
188
|
+
claimList: getNextOptionalAccount(),
|
|
170
189
|
eventAuthority: getNextAccount(),
|
|
171
190
|
program: getNextAccount(),
|
|
172
191
|
},
|