@intent-engine/core 0.1.49 → 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/sealed-delivery.d.ts +1 -4
- package/dist/src/sealed-delivery.js.map +1 -1
- package/dist/src/sealed.d.ts +13 -5
- package/dist/src/sealed.js +150 -58
- package/dist/src/sealed.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claimJob.js","sourceRoot":"","sources":["../../../../generated/client/instructions/claimJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAMzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,uBAAuB,GAAuB,IAAI,UAAU,CAAC;IACxE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAC9E,CAAC;
|
|
1
|
+
{"version":3,"file":"claimJob.js","sourceRoot":"","sources":["../../../../generated/client/instructions/claimJob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,yDAAyD,EACzD,WAAW,EACX,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAMzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,uBAAuB,GAAuB,IAAI,UAAU,CAAC;IACxE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,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C;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,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;QACrC,OAAO,WAAW,CAAC,OAAO,KAAK,6BAA6B;YAC1D,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,WAAW,CAAC;IAClB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,MAAM,EAAE,cAAc,EAAE;YACxB,MAAM,EAAE,cAAc,EAAE;YACxB,KAAK,EAAE,cAAc,EAAE;YACvB,KAAK,EAAE,cAAc,EAAE;YACvB,aAAa,EAAE,cAAc,EAAE;YAC/B,MAAM,EAAE,cAAc,EAAE;YACxB,SAAS,EAAE,sBAAsB,EAAE;YACnC,cAAc,EAAE,cAAc,EAAE;YAChC,OAAO,EAAE,cAAc,EAAE;SAC1B;QACD,IAAI,EAAE,iCAAiC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } 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 EXTEND_CLAIMANTS_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getExtendClaimantsDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type ExtendClaimantsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountIntent 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
|
+
TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner,
|
|
15
|
+
TAccountIntent extends string ? ReadonlyAccount<TAccountIntent> : TAccountIntent,
|
|
16
|
+
TAccountClaimList extends string ? WritableAccount<TAccountClaimList> : TAccountClaimList,
|
|
17
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
18
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
19
|
+
...TRemainingAccounts
|
|
20
|
+
]>;
|
|
21
|
+
export type ExtendClaimantsInstructionData = {
|
|
22
|
+
discriminator: ReadonlyUint8Array;
|
|
23
|
+
workers: Array<Address>;
|
|
24
|
+
};
|
|
25
|
+
export type ExtendClaimantsInstructionDataArgs = {
|
|
26
|
+
workers: Array<Address>;
|
|
27
|
+
};
|
|
28
|
+
export declare function getExtendClaimantsInstructionDataEncoder(): Encoder<ExtendClaimantsInstructionDataArgs>;
|
|
29
|
+
export declare function getExtendClaimantsInstructionDataDecoder(): Decoder<ExtendClaimantsInstructionData>;
|
|
30
|
+
export declare function getExtendClaimantsInstructionDataCodec(): Codec<ExtendClaimantsInstructionDataArgs, ExtendClaimantsInstructionData>;
|
|
31
|
+
export type ExtendClaimantsAsyncInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
32
|
+
owner: TAccountOwner;
|
|
33
|
+
intent: TAccountIntent;
|
|
34
|
+
claimList?: TAccountClaimList;
|
|
35
|
+
eventAuthority: TAccountEventAuthority;
|
|
36
|
+
program: TAccountProgram;
|
|
37
|
+
workers: ExtendClaimantsInstructionDataArgs["workers"];
|
|
38
|
+
};
|
|
39
|
+
export declare function getExtendClaimantsInstructionAsync<TAccountOwner extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: ExtendClaimantsAsyncInput<TAccountOwner, TAccountIntent, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
40
|
+
programAddress?: TProgramAddress;
|
|
41
|
+
}): Promise<ExtendClaimantsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
42
|
+
export type ExtendClaimantsInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountIntent extends InstructionAccountInput = InstructionAccountInput, TAccountClaimList extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
43
|
+
owner: TAccountOwner;
|
|
44
|
+
intent: TAccountIntent;
|
|
45
|
+
claimList: TAccountClaimList;
|
|
46
|
+
eventAuthority: TAccountEventAuthority;
|
|
47
|
+
program: TAccountProgram;
|
|
48
|
+
workers: ExtendClaimantsInstructionDataArgs["workers"];
|
|
49
|
+
};
|
|
50
|
+
export declare function getExtendClaimantsInstruction<TAccountOwner extends InstructionSignerInput, TAccountIntent extends InstructionAccountInput, TAccountClaimList extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof INTENT_ENGINE_PROGRAM_ADDRESS>(input: ExtendClaimantsInput<TAccountOwner, TAccountIntent, TAccountClaimList, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
51
|
+
programAddress?: TProgramAddress;
|
|
52
|
+
}): ExtendClaimantsInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountIntent, InstructionAccountInputAddress<TAccountIntent>>, ResolvedInstructionAccountMeta<TAccountClaimList, InstructionAccountInputAddress<TAccountClaimList>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
53
|
+
export type ParsedExtendClaimantsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
54
|
+
programAddress: Address<TProgram>;
|
|
55
|
+
accounts: {
|
|
56
|
+
owner: TAccountMetas[0];
|
|
57
|
+
intent: TAccountMetas[1];
|
|
58
|
+
claimList: TAccountMetas[2];
|
|
59
|
+
eventAuthority: TAccountMetas[3];
|
|
60
|
+
program: TAccountMetas[4];
|
|
61
|
+
};
|
|
62
|
+
data: ExtendClaimantsInstructionData;
|
|
63
|
+
};
|
|
64
|
+
export declare function parseExtendClaimantsInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedExtendClaimantsInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,142 @@
|
|
|
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, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, } from "@solana/kit";
|
|
9
|
+
import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, } from "@solana/kit/program-client-core";
|
|
10
|
+
import { findClaimListPda } from "../pdas/index.js";
|
|
11
|
+
import { INTENT_ENGINE_PROGRAM_ADDRESS } from "../programs/index.js";
|
|
12
|
+
export const EXTEND_CLAIMANTS_DISCRIMINATOR = new Uint8Array([167, 198, 71, 145, 207, 75, 8, 218]);
|
|
13
|
+
export function getExtendClaimantsDiscriminatorBytes() {
|
|
14
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(EXTEND_CLAIMANTS_DISCRIMINATOR);
|
|
15
|
+
}
|
|
16
|
+
export function getExtendClaimantsInstructionDataEncoder() {
|
|
17
|
+
return transformEncoder(getStructEncoder([
|
|
18
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
19
|
+
["workers", getArrayEncoder(getAddressEncoder())],
|
|
20
|
+
]), (value) => ({ ...value, discriminator: EXTEND_CLAIMANTS_DISCRIMINATOR }));
|
|
21
|
+
}
|
|
22
|
+
export function getExtendClaimantsInstructionDataDecoder() {
|
|
23
|
+
return getStructDecoder([
|
|
24
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
25
|
+
["workers", getArrayDecoder(getAddressDecoder())],
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
export function getExtendClaimantsInstructionDataCodec() {
|
|
29
|
+
return combineCodec(getExtendClaimantsInstructionDataEncoder(), getExtendClaimantsInstructionDataDecoder());
|
|
30
|
+
}
|
|
31
|
+
export async function getExtendClaimantsInstructionAsync(input, config) {
|
|
32
|
+
// Program address.
|
|
33
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
34
|
+
// Account meta helper.
|
|
35
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
36
|
+
// Original accounts.
|
|
37
|
+
const originalAccounts = {
|
|
38
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
|
|
39
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: false },
|
|
40
|
+
claimList: {
|
|
41
|
+
value: input.claimList ?? null,
|
|
42
|
+
isSigner: false,
|
|
43
|
+
isWritable: true,
|
|
44
|
+
},
|
|
45
|
+
eventAuthority: {
|
|
46
|
+
value: input.eventAuthority ?? null,
|
|
47
|
+
isSigner: false,
|
|
48
|
+
isWritable: false,
|
|
49
|
+
},
|
|
50
|
+
program: {
|
|
51
|
+
value: input.program ?? null,
|
|
52
|
+
isSigner: false,
|
|
53
|
+
isWritable: false,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
const accounts = originalAccounts;
|
|
57
|
+
// Original args.
|
|
58
|
+
const args = { ...input };
|
|
59
|
+
// Resolve default values.
|
|
60
|
+
if (!accounts.claimList.value) {
|
|
61
|
+
accounts.claimList.value = await findClaimListPda({
|
|
62
|
+
intent: getAddressFromResolvedInstructionAccount("intent", accounts.intent.value),
|
|
63
|
+
}, { programAddress });
|
|
64
|
+
}
|
|
65
|
+
return Object.freeze({
|
|
66
|
+
accounts: [
|
|
67
|
+
getAccountMeta("owner", accounts.owner),
|
|
68
|
+
getAccountMeta("intent", accounts.intent),
|
|
69
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
70
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
71
|
+
getAccountMeta("program", accounts.program),
|
|
72
|
+
],
|
|
73
|
+
data: getExtendClaimantsInstructionDataEncoder().encode(args),
|
|
74
|
+
programAddress,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export function getExtendClaimantsInstruction(input, config) {
|
|
78
|
+
// Program address.
|
|
79
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
80
|
+
// Account meta helper.
|
|
81
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
82
|
+
// Original accounts.
|
|
83
|
+
const originalAccounts = {
|
|
84
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
|
|
85
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: false },
|
|
86
|
+
claimList: {
|
|
87
|
+
value: input.claimList ?? null,
|
|
88
|
+
isSigner: false,
|
|
89
|
+
isWritable: true,
|
|
90
|
+
},
|
|
91
|
+
eventAuthority: {
|
|
92
|
+
value: input.eventAuthority ?? null,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
isWritable: false,
|
|
95
|
+
},
|
|
96
|
+
program: {
|
|
97
|
+
value: input.program ?? null,
|
|
98
|
+
isSigner: false,
|
|
99
|
+
isWritable: false,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
const accounts = originalAccounts;
|
|
103
|
+
// Original args.
|
|
104
|
+
const args = { ...input };
|
|
105
|
+
return Object.freeze({
|
|
106
|
+
accounts: [
|
|
107
|
+
getAccountMeta("owner", accounts.owner),
|
|
108
|
+
getAccountMeta("intent", accounts.intent),
|
|
109
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
110
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
111
|
+
getAccountMeta("program", accounts.program),
|
|
112
|
+
],
|
|
113
|
+
data: getExtendClaimantsInstructionDataEncoder().encode(args),
|
|
114
|
+
programAddress,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
export function parseExtendClaimantsInstruction(instruction) {
|
|
118
|
+
if (instruction.accounts.length < 5) {
|
|
119
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
120
|
+
actualAccountMetas: instruction.accounts.length,
|
|
121
|
+
expectedAccountMetas: 5,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
let accountIndex = 0;
|
|
125
|
+
const getNextAccount = () => {
|
|
126
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
127
|
+
accountIndex += 1;
|
|
128
|
+
return accountMeta;
|
|
129
|
+
};
|
|
130
|
+
return {
|
|
131
|
+
programAddress: instruction.programAddress,
|
|
132
|
+
accounts: {
|
|
133
|
+
owner: getNextAccount(),
|
|
134
|
+
intent: getNextAccount(),
|
|
135
|
+
claimList: getNextAccount(),
|
|
136
|
+
eventAuthority: getNextAccount(),
|
|
137
|
+
program: getNextAccount(),
|
|
138
|
+
},
|
|
139
|
+
data: getExtendClaimantsInstructionDataDecoder().decode(instruction.data),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=extendClaimants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendClaimants.js","sourceRoot":"","sources":["../../../../generated/client/instructions/extendClaimants.ts"],"names":[],"mappings":"AAA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,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,SAAS,EAAE,cAAc,EAAE;YAC3B,cAAc,EAAE,cAAc,EAAE;YAChC,OAAO,EAAE,cAAc,EAAE;SAC1B;QACD,IAAI,EAAE,wCAAwC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -24,6 +24,7 @@ export * from "./createProfile.js";
|
|
|
24
24
|
export * from "./dropClaim.js";
|
|
25
25
|
export * from "./endFill.js";
|
|
26
26
|
export * from "./expireIntent.js";
|
|
27
|
+
export * from "./extendClaimants.js";
|
|
27
28
|
export * from "./fillAttested.js";
|
|
28
29
|
export * from "./fillAttestedCommittee.js";
|
|
29
30
|
export * from "./fillAttestedSplit.js";
|
|
@@ -32,9 +33,11 @@ export * from "./fillIntent.js";
|
|
|
32
33
|
export * from "./initConfig.js";
|
|
33
34
|
export * from "./initUser.js";
|
|
34
35
|
export * from "./leave.js";
|
|
36
|
+
export * from "./listClaimants.js";
|
|
35
37
|
export * from "./lowerPause.js";
|
|
36
38
|
export * from "./migrate.js";
|
|
37
39
|
export * from "./openClaims.js";
|
|
40
|
+
export * from "./openClaimsListed.js";
|
|
38
41
|
export * from "./proposeAdmin.js";
|
|
39
42
|
export * from "./raisePause.js";
|
|
40
43
|
export * from "./revokeMandate.js";
|
|
@@ -24,6 +24,7 @@ export * from "./createProfile.js";
|
|
|
24
24
|
export * from "./dropClaim.js";
|
|
25
25
|
export * from "./endFill.js";
|
|
26
26
|
export * from "./expireIntent.js";
|
|
27
|
+
export * from "./extendClaimants.js";
|
|
27
28
|
export * from "./fillAttested.js";
|
|
28
29
|
export * from "./fillAttestedCommittee.js";
|
|
29
30
|
export * from "./fillAttestedSplit.js";
|
|
@@ -32,9 +33,11 @@ export * from "./fillIntent.js";
|
|
|
32
33
|
export * from "./initConfig.js";
|
|
33
34
|
export * from "./initUser.js";
|
|
34
35
|
export * from "./leave.js";
|
|
36
|
+
export * from "./listClaimants.js";
|
|
35
37
|
export * from "./lowerPause.js";
|
|
36
38
|
export * from "./migrate.js";
|
|
37
39
|
export * from "./openClaims.js";
|
|
40
|
+
export * from "./openClaimsListed.js";
|
|
38
41
|
export * from "./proposeAdmin.js";
|
|
39
42
|
export * from "./raisePause.js";
|
|
40
43
|
export * from "./revokeMandate.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../generated/client/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../generated/client/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 LIST_CLAIMANTS_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getListClaimantsDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type ListClaimantsInstruction<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 ? ReadonlyAccount<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 ListClaimantsInstructionData = {
|
|
24
|
+
discriminator: ReadonlyUint8Array;
|
|
25
|
+
size: number;
|
|
26
|
+
workers: Array<Address>;
|
|
27
|
+
};
|
|
28
|
+
export type ListClaimantsInstructionDataArgs = {
|
|
29
|
+
size: number;
|
|
30
|
+
workers: Array<Address>;
|
|
31
|
+
};
|
|
32
|
+
export declare function getListClaimantsInstructionDataEncoder(): Encoder<ListClaimantsInstructionDataArgs>;
|
|
33
|
+
export declare function getListClaimantsInstructionDataDecoder(): Decoder<ListClaimantsInstructionData>;
|
|
34
|
+
export declare function getListClaimantsInstructionDataCodec(): Codec<ListClaimantsInstructionDataArgs, ListClaimantsInstructionData>;
|
|
35
|
+
export type ListClaimantsAsyncInput<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> = {
|
|
36
|
+
owner: TAccountOwner;
|
|
37
|
+
intent: TAccountIntent;
|
|
38
|
+
board?: TAccountBoard;
|
|
39
|
+
claimList?: TAccountClaimList;
|
|
40
|
+
systemProgram?: TAccountSystemProgram;
|
|
41
|
+
eventAuthority: TAccountEventAuthority;
|
|
42
|
+
program: TAccountProgram;
|
|
43
|
+
size: ListClaimantsInstructionDataArgs["size"];
|
|
44
|
+
workers: ListClaimantsInstructionDataArgs["workers"];
|
|
45
|
+
};
|
|
46
|
+
export declare function getListClaimantsInstructionAsync<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: ListClaimantsAsyncInput<TAccountOwner, TAccountIntent, TAccountBoard, TAccountClaimList, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
47
|
+
programAddress?: TProgramAddress;
|
|
48
|
+
}): Promise<ListClaimantsInstruction<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>>>>;
|
|
49
|
+
export type ListClaimantsInput<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> = {
|
|
50
|
+
owner: TAccountOwner;
|
|
51
|
+
intent: TAccountIntent;
|
|
52
|
+
board: TAccountBoard;
|
|
53
|
+
claimList: TAccountClaimList;
|
|
54
|
+
systemProgram?: TAccountSystemProgram;
|
|
55
|
+
eventAuthority: TAccountEventAuthority;
|
|
56
|
+
program: TAccountProgram;
|
|
57
|
+
size: ListClaimantsInstructionDataArgs["size"];
|
|
58
|
+
workers: ListClaimantsInstructionDataArgs["workers"];
|
|
59
|
+
};
|
|
60
|
+
export declare function getListClaimantsInstruction<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: ListClaimantsInput<TAccountOwner, TAccountIntent, TAccountBoard, TAccountClaimList, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
61
|
+
programAddress?: TProgramAddress;
|
|
62
|
+
}): ListClaimantsInstruction<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>>>;
|
|
63
|
+
export type ParsedListClaimantsInstruction<TProgram extends string = typeof INTENT_ENGINE_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
64
|
+
programAddress: Address<TProgram>;
|
|
65
|
+
accounts: {
|
|
66
|
+
owner: TAccountMetas[0];
|
|
67
|
+
intent: TAccountMetas[1];
|
|
68
|
+
board: TAccountMetas[2];
|
|
69
|
+
claimList: TAccountMetas[3];
|
|
70
|
+
systemProgram: TAccountMetas[4];
|
|
71
|
+
eventAuthority: TAccountMetas[5];
|
|
72
|
+
program: TAccountMetas[6];
|
|
73
|
+
};
|
|
74
|
+
data: ListClaimantsInstructionData;
|
|
75
|
+
};
|
|
76
|
+
export declare function parseListClaimantsInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedListClaimantsInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,178 @@
|
|
|
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, 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 LIST_CLAIMANTS_DISCRIMINATOR = new Uint8Array([
|
|
13
|
+
141, 9, 120, 20, 17, 243, 224, 62,
|
|
14
|
+
]);
|
|
15
|
+
export function getListClaimantsDiscriminatorBytes() {
|
|
16
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(LIST_CLAIMANTS_DISCRIMINATOR);
|
|
17
|
+
}
|
|
18
|
+
export function getListClaimantsInstructionDataEncoder() {
|
|
19
|
+
return transformEncoder(getStructEncoder([
|
|
20
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
21
|
+
["size", getU8Encoder()],
|
|
22
|
+
["workers", getArrayEncoder(getAddressEncoder())],
|
|
23
|
+
]), (value) => ({ ...value, discriminator: LIST_CLAIMANTS_DISCRIMINATOR }));
|
|
24
|
+
}
|
|
25
|
+
export function getListClaimantsInstructionDataDecoder() {
|
|
26
|
+
return getStructDecoder([
|
|
27
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
28
|
+
["size", getU8Decoder()],
|
|
29
|
+
["workers", getArrayDecoder(getAddressDecoder())],
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
export function getListClaimantsInstructionDataCodec() {
|
|
33
|
+
return combineCodec(getListClaimantsInstructionDataEncoder(), getListClaimantsInstructionDataDecoder());
|
|
34
|
+
}
|
|
35
|
+
export async function getListClaimantsInstructionAsync(input, config) {
|
|
36
|
+
// Program address.
|
|
37
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
38
|
+
// Account meta helper.
|
|
39
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
40
|
+
// Original accounts.
|
|
41
|
+
const originalAccounts = {
|
|
42
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
43
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: false },
|
|
44
|
+
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
45
|
+
claimList: {
|
|
46
|
+
value: input.claimList ?? null,
|
|
47
|
+
isSigner: false,
|
|
48
|
+
isWritable: true,
|
|
49
|
+
},
|
|
50
|
+
systemProgram: {
|
|
51
|
+
value: input.systemProgram ?? null,
|
|
52
|
+
isSigner: false,
|
|
53
|
+
isWritable: false,
|
|
54
|
+
},
|
|
55
|
+
eventAuthority: {
|
|
56
|
+
value: input.eventAuthority ?? null,
|
|
57
|
+
isSigner: false,
|
|
58
|
+
isWritable: false,
|
|
59
|
+
},
|
|
60
|
+
program: {
|
|
61
|
+
value: input.program ?? null,
|
|
62
|
+
isSigner: false,
|
|
63
|
+
isWritable: false,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
const accounts = originalAccounts;
|
|
67
|
+
// Original args.
|
|
68
|
+
const args = { ...input };
|
|
69
|
+
// Resolve default values.
|
|
70
|
+
if (!accounts.board.value) {
|
|
71
|
+
accounts.board.value = await findBoardPda({
|
|
72
|
+
intent: getAddressFromResolvedInstructionAccount("intent", accounts.intent.value),
|
|
73
|
+
}, { programAddress });
|
|
74
|
+
}
|
|
75
|
+
if (!accounts.claimList.value) {
|
|
76
|
+
accounts.claimList.value = await findClaimListPda({
|
|
77
|
+
intent: getAddressFromResolvedInstructionAccount("intent", accounts.intent.value),
|
|
78
|
+
}, { programAddress });
|
|
79
|
+
}
|
|
80
|
+
if (!accounts.systemProgram.value) {
|
|
81
|
+
accounts.systemProgram.value =
|
|
82
|
+
"11111111111111111111111111111111";
|
|
83
|
+
}
|
|
84
|
+
return Object.freeze({
|
|
85
|
+
accounts: [
|
|
86
|
+
getAccountMeta("owner", accounts.owner),
|
|
87
|
+
getAccountMeta("intent", accounts.intent),
|
|
88
|
+
getAccountMeta("board", accounts.board),
|
|
89
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
90
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
91
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
92
|
+
getAccountMeta("program", accounts.program),
|
|
93
|
+
],
|
|
94
|
+
data: getListClaimantsInstructionDataEncoder().encode(args),
|
|
95
|
+
programAddress,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function getListClaimantsInstruction(input, config) {
|
|
99
|
+
// Program address.
|
|
100
|
+
const programAddress = config?.programAddress ?? INTENT_ENGINE_PROGRAM_ADDRESS;
|
|
101
|
+
// Account meta helper.
|
|
102
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
103
|
+
// Original accounts.
|
|
104
|
+
const originalAccounts = {
|
|
105
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
106
|
+
intent: { value: input.intent ?? null, isSigner: false, isWritable: false },
|
|
107
|
+
board: { value: input.board ?? null, isSigner: false, isWritable: true },
|
|
108
|
+
claimList: {
|
|
109
|
+
value: input.claimList ?? null,
|
|
110
|
+
isSigner: false,
|
|
111
|
+
isWritable: true,
|
|
112
|
+
},
|
|
113
|
+
systemProgram: {
|
|
114
|
+
value: input.systemProgram ?? null,
|
|
115
|
+
isSigner: false,
|
|
116
|
+
isWritable: false,
|
|
117
|
+
},
|
|
118
|
+
eventAuthority: {
|
|
119
|
+
value: input.eventAuthority ?? null,
|
|
120
|
+
isSigner: false,
|
|
121
|
+
isWritable: false,
|
|
122
|
+
},
|
|
123
|
+
program: {
|
|
124
|
+
value: input.program ?? null,
|
|
125
|
+
isSigner: false,
|
|
126
|
+
isWritable: false,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
const accounts = originalAccounts;
|
|
130
|
+
// Original args.
|
|
131
|
+
const args = { ...input };
|
|
132
|
+
// Resolve default values.
|
|
133
|
+
if (!accounts.systemProgram.value) {
|
|
134
|
+
accounts.systemProgram.value =
|
|
135
|
+
"11111111111111111111111111111111";
|
|
136
|
+
}
|
|
137
|
+
return Object.freeze({
|
|
138
|
+
accounts: [
|
|
139
|
+
getAccountMeta("owner", accounts.owner),
|
|
140
|
+
getAccountMeta("intent", accounts.intent),
|
|
141
|
+
getAccountMeta("board", accounts.board),
|
|
142
|
+
getAccountMeta("claimList", accounts.claimList),
|
|
143
|
+
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
144
|
+
getAccountMeta("eventAuthority", accounts.eventAuthority),
|
|
145
|
+
getAccountMeta("program", accounts.program),
|
|
146
|
+
],
|
|
147
|
+
data: getListClaimantsInstructionDataEncoder().encode(args),
|
|
148
|
+
programAddress,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
export function parseListClaimantsInstruction(instruction) {
|
|
152
|
+
if (instruction.accounts.length < 7) {
|
|
153
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, {
|
|
154
|
+
actualAccountMetas: instruction.accounts.length,
|
|
155
|
+
expectedAccountMetas: 7,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
let accountIndex = 0;
|
|
159
|
+
const getNextAccount = () => {
|
|
160
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
161
|
+
accountIndex += 1;
|
|
162
|
+
return accountMeta;
|
|
163
|
+
};
|
|
164
|
+
return {
|
|
165
|
+
programAddress: instruction.programAddress,
|
|
166
|
+
accounts: {
|
|
167
|
+
owner: getNextAccount(),
|
|
168
|
+
intent: getNextAccount(),
|
|
169
|
+
board: getNextAccount(),
|
|
170
|
+
claimList: getNextAccount(),
|
|
171
|
+
systemProgram: getNextAccount(),
|
|
172
|
+
eventAuthority: getNextAccount(),
|
|
173
|
+
program: getNextAccount(),
|
|
174
|
+
},
|
|
175
|
+
data: getListClaimantsInstructionDataDecoder().decode(instruction.data),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=listClaimants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listClaimants.js","sourceRoot":"","sources":["../../../../generated/client/instructions/listClaimants.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,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,4BAA4B,GAAuB,IAAI,UAAU,CAAC;IAC7E,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,kCAAkC;IAChD,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAChD,4BAA4B,CAC7B,CAAC;AACJ,CAAC;AAsDD,MAAM,UAAU,sCAAsC;IACpD,OAAO,gBAAgB,CACrB,gBAAgB,CAAC;QACf,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC;QACxB,CAAC,SAAS,EAAE,eAAe,CAAC,iBAAiB,EAAE,CAAC,CAAC;KAClD,CAAC,EACF,CAAC,KAAK,EAAE,EAAE,CAA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