@intent-engine/core 0.1.23 → 0.1.27
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 +50 -0
- package/dist/generated/client/accounts/claimBoard.js +77 -0
- package/dist/generated/client/accounts/claimBoard.js.map +1 -0
- package/dist/generated/client/accounts/committee.d.ts +48 -0
- package/dist/generated/client/accounts/committee.js +75 -0
- package/dist/generated/client/accounts/committee.js.map +1 -0
- package/dist/generated/client/accounts/config.d.ts +2 -0
- package/dist/generated/client/accounts/config.js +4 -2
- package/dist/generated/client/accounts/config.js.map +1 -1
- package/dist/generated/client/accounts/index.d.ts +4 -0
- package/dist/generated/client/accounts/index.js +4 -0
- package/dist/generated/client/accounts/index.js.map +1 -1
- package/dist/generated/client/accounts/intent.d.ts +2 -0
- package/dist/generated/client/accounts/intent.js +4 -2
- package/dist/generated/client/accounts/intent.js.map +1 -1
- package/dist/generated/client/accounts/mintCap.d.ts +48 -0
- package/dist/generated/client/accounts/mintCap.js +75 -0
- package/dist/generated/client/accounts/mintCap.js.map +1 -0
- package/dist/generated/client/accounts/profile.d.ts +48 -0
- package/dist/generated/client/accounts/profile.js +81 -0
- package/dist/generated/client/accounts/profile.js.map +1 -0
- package/dist/generated/client/errors/intentEngine.d.ts +31 -1
- package/dist/generated/client/errors/intentEngine.js +45 -0
- package/dist/generated/client/errors/intentEngine.js.map +1 -1
- package/dist/generated/client/events/capsRequiredSet.d.ts +22 -0
- package/dist/generated/client/events/capsRequiredSet.js +32 -0
- package/dist/generated/client/events/capsRequiredSet.js.map +1 -0
- package/dist/generated/client/events/claimDropped.d.ts +28 -0
- package/dist/generated/client/events/claimDropped.js +40 -0
- package/dist/generated/client/events/claimDropped.js.map +1 -0
- package/dist/generated/client/events/claimsClosed.d.ts +23 -0
- package/dist/generated/client/events/claimsClosed.js +38 -0
- package/dist/generated/client/events/claimsClosed.js.map +1 -0
- package/dist/generated/client/events/claimsOpened.d.ts +30 -0
- package/dist/generated/client/events/claimsOpened.js +42 -0
- package/dist/generated/client/events/claimsOpened.js.map +1 -0
- package/dist/generated/client/events/committeeAttested.d.ts +24 -0
- package/dist/generated/client/events/committeeAttested.js +40 -0
- package/dist/generated/client/events/committeeAttested.js.map +1 -0
- package/dist/generated/client/events/committeeCreated.d.ts +25 -0
- package/dist/generated/client/events/committeeCreated.js +42 -0
- package/dist/generated/client/events/committeeCreated.js.map +1 -0
- package/dist/generated/client/events/index.d.ts +11 -0
- package/dist/generated/client/events/index.js +11 -0
- package/dist/generated/client/events/index.js.map +1 -1
- package/dist/generated/client/events/jobClaimed.d.ts +30 -0
- package/dist/generated/client/events/jobClaimed.js +42 -0
- package/dist/generated/client/events/jobClaimed.js.map +1 -0
- package/dist/generated/client/events/mintCapSet.d.ts +36 -0
- package/dist/generated/client/events/mintCapSet.js +48 -0
- package/dist/generated/client/events/mintCapSet.js.map +1 -0
- package/dist/generated/client/events/profileClosed.d.ts +22 -0
- package/dist/generated/client/events/profileClosed.js +32 -0
- package/dist/generated/client/events/profileClosed.js.map +1 -0
- package/dist/generated/client/events/profileSet.d.ts +26 -0
- package/dist/generated/client/events/profileSet.js +50 -0
- package/dist/generated/client/events/profileSet.js.map +1 -0
- package/dist/generated/client/events/stakeMoved.d.ts +32 -0
- package/dist/generated/client/events/stakeMoved.js +44 -0
- package/dist/generated/client/events/stakeMoved.js.map +1 -0
- package/dist/generated/client/instructions/claimJob.d.ts +72 -0
- package/dist/generated/client/instructions/claimJob.js +163 -0
- package/dist/generated/client/instructions/claimJob.js.map +1 -0
- package/dist/generated/client/instructions/closeProfile.d.ts +55 -0
- package/dist/generated/client/instructions/closeProfile.js +131 -0
- package/dist/generated/client/instructions/closeProfile.js.map +1 -0
- package/dist/generated/client/instructions/createCommittee.d.ts +76 -0
- package/dist/generated/client/instructions/createCommittee.js +163 -0
- package/dist/generated/client/instructions/createCommittee.js.map +1 -0
- package/dist/generated/client/instructions/createIntent.d.ts +13 -9
- package/dist/generated/client/instructions/createIntent.js +21 -2
- package/dist/generated/client/instructions/createIntent.js.map +1 -1
- package/dist/generated/client/instructions/createIntentByAgent.d.ts +13 -9
- package/dist/generated/client/instructions/createIntentByAgent.js +21 -2
- package/dist/generated/client/instructions/createIntentByAgent.js.map +1 -1
- package/dist/generated/client/instructions/createIntentSigned.d.ts +13 -9
- package/dist/generated/client/instructions/createIntentSigned.js +15 -2
- package/dist/generated/client/instructions/createIntentSigned.js.map +1 -1
- package/dist/generated/client/instructions/createProfile.d.ts +65 -0
- package/dist/generated/client/instructions/createProfile.js +162 -0
- package/dist/generated/client/instructions/createProfile.js.map +1 -0
- package/dist/generated/client/instructions/dropClaim.d.ts +59 -0
- package/dist/generated/client/instructions/dropClaim.js +128 -0
- package/dist/generated/client/instructions/dropClaim.js.map +1 -0
- package/dist/generated/client/instructions/fillAttested.d.ts +17 -9
- package/dist/generated/client/instructions/fillAttested.js +20 -2
- package/dist/generated/client/instructions/fillAttested.js.map +1 -1
- package/dist/generated/client/instructions/fillAttestedCommittee.d.ts +124 -0
- package/dist/generated/client/instructions/fillAttestedCommittee.js +271 -0
- package/dist/generated/client/instructions/fillAttestedCommittee.js.map +1 -0
- package/dist/generated/client/instructions/fillAttestedSplit.d.ts +22 -17
- package/dist/generated/client/instructions/fillAttestedSplit.js +24 -7
- package/dist/generated/client/instructions/fillAttestedSplit.js.map +1 -1
- package/dist/generated/client/instructions/fillAttestedSplitCommittee.d.ts +157 -0
- package/dist/generated/client/instructions/fillAttestedSplitCommittee.js +373 -0
- package/dist/generated/client/instructions/fillAttestedSplitCommittee.js.map +1 -0
- package/dist/generated/client/instructions/index.d.ts +12 -0
- package/dist/generated/client/instructions/index.js +12 -0
- package/dist/generated/client/instructions/index.js.map +1 -1
- package/dist/generated/client/instructions/openClaims.d.ts +72 -0
- package/dist/generated/client/instructions/openClaims.js +160 -0
- package/dist/generated/client/instructions/openClaims.js.map +1 -0
- package/dist/generated/client/instructions/setCapsRequired.d.ts +50 -0
- package/dist/generated/client/instructions/setCapsRequired.js +93 -0
- package/dist/generated/client/instructions/setCapsRequired.js.map +1 -0
- package/dist/generated/client/instructions/setMintCap.d.ts +84 -0
- package/dist/generated/client/instructions/setMintCap.js +188 -0
- package/dist/generated/client/instructions/setMintCap.js.map +1 -0
- package/dist/generated/client/instructions/settleClaims.d.ts +63 -0
- package/dist/generated/client/instructions/settleClaims.js +139 -0
- package/dist/generated/client/instructions/settleClaims.js.map +1 -0
- package/dist/generated/client/instructions/updateProfile.d.ts +61 -0
- package/dist/generated/client/instructions/updateProfile.js +140 -0
- package/dist/generated/client/instructions/updateProfile.js.map +1 -0
- package/dist/generated/client/pdas/board.d.ts +14 -0
- package/dist/generated/client/pdas/board.js +19 -0
- package/dist/generated/client/pdas/board.js.map +1 -0
- package/dist/generated/client/pdas/committee.d.ts +14 -0
- package/dist/generated/client/pdas/committee.js +19 -0
- package/dist/generated/client/pdas/committee.js.map +1 -0
- package/dist/generated/client/pdas/index.d.ts +4 -0
- package/dist/generated/client/pdas/index.js +4 -0
- package/dist/generated/client/pdas/index.js.map +1 -1
- package/dist/generated/client/pdas/mintCap.d.ts +14 -0
- package/dist/generated/client/pdas/mintCap.js +19 -0
- package/dist/generated/client/pdas/mintCap.js.map +1 -0
- package/dist/generated/client/pdas/profile.d.ts +14 -0
- package/dist/generated/client/pdas/profile.js +19 -0
- package/dist/generated/client/pdas/profile.js.map +1 -0
- package/dist/generated/client/programs/intentEngine.d.ts +190 -92
- package/dist/generated/client/programs/intentEngine.js +336 -91
- package/dist/generated/client/programs/intentEngine.js.map +1 -1
- package/dist/generated/client/types/index.d.ts +2 -0
- package/dist/generated/client/types/index.js +2 -0
- package/dist/generated/client/types/index.js.map +1 -1
- package/dist/generated/client/types/profileFields.d.ts +18 -0
- package/dist/generated/client/types/profileFields.js +34 -0
- package/dist/generated/client/types/profileFields.js.map +1 -0
- package/dist/generated/client/types/splitClaim.d.ts +16 -0
- package/dist/generated/client/types/splitClaim.js +24 -0
- package/dist/generated/client/types/splitClaim.js.map +1 -0
- package/dist/src/admin-builders.d.ts +49 -0
- package/dist/src/admin-builders.js +52 -0
- package/dist/src/admin-builders.js.map +1 -0
- package/dist/src/bounty.d.ts +3 -1
- package/dist/src/bounty.js +6 -2
- package/dist/src/bounty.js.map +1 -1
- package/dist/src/builder-accounts.d.ts +62 -0
- package/dist/src/builder-accounts.js +64 -0
- package/dist/src/builder-accounts.js.map +1 -0
- package/dist/src/builders.d.ts +5 -213
- package/dist/src/builders.js +5 -493
- package/dist/src/builders.js.map +1 -1
- package/dist/src/claims.d.ts +47 -0
- package/dist/src/claims.js +69 -0
- package/dist/src/claims.js.map +1 -0
- package/dist/src/committee.d.ts +40 -0
- package/dist/src/committee.js +145 -0
- package/dist/src/committee.js.map +1 -0
- package/dist/src/describe.d.ts +6 -1
- package/dist/src/describe.js +25 -3
- package/dist/src/describe.js.map +1 -1
- package/dist/src/errors.d.ts +2 -1
- package/dist/src/errors.js +44 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/events.d.ts +12 -1
- package/dist/src/events.js +15 -1
- package/dist/src/events.js.map +1 -1
- package/dist/src/fee.d.ts +1 -0
- package/dist/src/fee.js +13 -5
- package/dist/src/fee.js.map +1 -1
- package/dist/src/fill-builders.d.ts +63 -0
- package/dist/src/fill-builders.js +151 -0
- package/dist/src/fill-builders.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/intent-builders.d.ts +65 -0
- package/dist/src/intent-builders.js +159 -0
- package/dist/src/intent-builders.js.map +1 -0
- package/dist/src/mandate.js +2 -2
- package/dist/src/mandate.js.map +1 -1
- package/dist/src/math.d.ts +1 -0
- package/dist/src/math.js +9 -0
- package/dist/src/math.js.map +1 -1
- package/dist/src/memo.d.ts +11 -1
- package/dist/src/memo.js +40 -4
- package/dist/src/memo.js.map +1 -1
- package/dist/src/mint-caps.d.ts +31 -0
- package/dist/src/mint-caps.js +73 -0
- package/dist/src/mint-caps.js.map +1 -0
- package/dist/src/owner-builders.d.ts +52 -0
- package/dist/src/owner-builders.js +83 -0
- package/dist/src/owner-builders.js.map +1 -0
- package/dist/src/sig.d.ts +1 -0
- package/dist/src/sig.js +4 -0
- package/dist/src/sig.js.map +1 -1
- package/dist/src/state.d.ts +3 -0
- package/dist/src/state.js +5 -0
- package/dist/src/state.js.map +1 -1
- package/dist/src/validate.d.ts +2 -0
- package/dist/src/validate.js +15 -0
- package/dist/src/validate.js.map +1 -1
- package/generated/idl.json +1990 -63
- package/package.json +19 -6
- package/dist/generated/client/types/configSettings.d.ts +0 -25
- package/dist/generated/client/types/configSettings.js +0 -30
- package/dist/generated/client/types/configSettings.js.map +0 -1
|
@@ -7,22 +7,36 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { assertIsInstructionWithAccounts, containsBytes, extendClient, fixEncoderSize, getBytesEncoder, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, SolanaError, } from "@solana/kit";
|
|
9
9
|
import { addSelfFetchFunctions, addSelfPlanAndSendFunctions, } from "@solana/kit/program-client-core";
|
|
10
|
-
import { getConfigCodec, getIntentCodec, getMandateCodec, getUserStateCodec, } from "../accounts/index.js";
|
|
11
|
-
import { getAcceptAdminInstruction, getAdvanceEpochInstructionAsync, getAdvanceNonceInstructionAsync, getBeginFillInstructionAsync, getCancelIntentInstructionAsync, getCloseIntentInstructionAsync, getCreateIntentByAgentInstructionAsync, getCreateIntentInstructionAsync, getCreateIntentSignedInstructionAsync, getCreateMandateInstructionAsync, getEndFillInstruction, getExpireIntentInstructionAsync, getFillAttestedInstructionAsync, getFillAttestedSplitInstructionAsync, getFillIntentInstructionAsync, getInitConfigInstructionAsync, getInitUserInstructionAsync, getLowerPauseInstruction, getProposeAdminInstruction, getRaisePauseInstruction, getRevokeMandateInstruction, getUpdateConfigInstruction, getUpdateEconomicsInstruction, parseAcceptAdminInstruction, parseAdvanceEpochInstruction, parseAdvanceNonceInstruction, parseBeginFillInstruction, parseCancelIntentInstruction, parseCloseIntentInstruction, parseCreateIntentByAgentInstruction, parseCreateIntentInstruction, parseCreateIntentSignedInstruction, parseCreateMandateInstruction, parseEndFillInstruction, parseExpireIntentInstruction, parseFillAttestedInstruction, parseFillAttestedSplitInstruction, parseFillIntentInstruction, parseInitConfigInstruction, parseInitUserInstruction, parseLowerPauseInstruction, parseProposeAdminInstruction, parseRaisePauseInstruction, parseRevokeMandateInstruction, parseUpdateConfigInstruction, parseUpdateEconomicsInstruction, } from "../instructions/index.js";
|
|
12
|
-
import { findConfigPda, findDelegatePda, findUserStatePda, findVaultPda, } from "../pdas/index.js";
|
|
10
|
+
import { getClaimBoardCodec, getCommitteeCodec, getConfigCodec, getIntentCodec, getMandateCodec, getMintCapCodec, getProfileCodec, getUserStateCodec, } from "../accounts/index.js";
|
|
11
|
+
import { getAcceptAdminInstruction, getAdvanceEpochInstructionAsync, getAdvanceNonceInstructionAsync, getBeginFillInstructionAsync, getCancelIntentInstructionAsync, getClaimJobInstructionAsync, getCloseIntentInstructionAsync, getCloseProfileInstructionAsync, getCreateCommitteeInstructionAsync, getCreateIntentByAgentInstructionAsync, getCreateIntentInstructionAsync, getCreateIntentSignedInstructionAsync, getCreateMandateInstructionAsync, getCreateProfileInstructionAsync, getDropClaimInstructionAsync, getEndFillInstruction, getExpireIntentInstructionAsync, getFillAttestedCommitteeInstructionAsync, getFillAttestedInstructionAsync, getFillAttestedSplitCommitteeInstructionAsync, getFillAttestedSplitInstructionAsync, getFillIntentInstructionAsync, getInitConfigInstructionAsync, getInitUserInstructionAsync, getLowerPauseInstruction, getOpenClaimsInstructionAsync, getProposeAdminInstruction, getRaisePauseInstruction, getRevokeMandateInstruction, getSetCapsRequiredInstruction, getSetMintCapInstructionAsync, getSettleClaimsInstructionAsync, getUpdateConfigInstruction, getUpdateEconomicsInstruction, getUpdateProfileInstructionAsync, parseAcceptAdminInstruction, parseAdvanceEpochInstruction, parseAdvanceNonceInstruction, parseBeginFillInstruction, parseCancelIntentInstruction, parseClaimJobInstruction, parseCloseIntentInstruction, parseCloseProfileInstruction, parseCreateCommitteeInstruction, parseCreateIntentByAgentInstruction, parseCreateIntentInstruction, parseCreateIntentSignedInstruction, parseCreateMandateInstruction, parseCreateProfileInstruction, parseDropClaimInstruction, parseEndFillInstruction, parseExpireIntentInstruction, parseFillAttestedCommitteeInstruction, parseFillAttestedInstruction, parseFillAttestedSplitCommitteeInstruction, parseFillAttestedSplitInstruction, parseFillIntentInstruction, parseInitConfigInstruction, parseInitUserInstruction, parseLowerPauseInstruction, parseOpenClaimsInstruction, parseProposeAdminInstruction, parseRaisePauseInstruction, parseRevokeMandateInstruction, parseSetCapsRequiredInstruction, parseSetMintCapInstruction, parseSettleClaimsInstruction, parseUpdateConfigInstruction, parseUpdateEconomicsInstruction, parseUpdateProfileInstruction, } from "../instructions/index.js";
|
|
12
|
+
import { findBoardPda, findCommitteePda, findConfigPda, findDelegatePda, findMintCapPda, findProfilePda, findUserStatePda, findVaultPda, } from "../pdas/index.js";
|
|
13
13
|
export const INTENT_ENGINE_PROGRAM_ADDRESS = "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU";
|
|
14
14
|
export const IntentEngineAccount = {
|
|
15
|
-
0: "
|
|
16
|
-
1: "
|
|
17
|
-
2: "
|
|
18
|
-
3: "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
0: "ClaimBoard",
|
|
16
|
+
1: "Committee",
|
|
17
|
+
2: "Config",
|
|
18
|
+
3: "Intent",
|
|
19
|
+
4: "Mandate",
|
|
20
|
+
5: "MintCap",
|
|
21
|
+
6: "Profile",
|
|
22
|
+
7: "UserState",
|
|
23
|
+
ClaimBoard: 0,
|
|
24
|
+
Committee: 1,
|
|
25
|
+
Config: 2,
|
|
26
|
+
Intent: 3,
|
|
27
|
+
Mandate: 4,
|
|
28
|
+
MintCap: 5,
|
|
29
|
+
Profile: 6,
|
|
30
|
+
UserState: 7,
|
|
23
31
|
};
|
|
24
32
|
export function identifyIntentEngineAccount(account) {
|
|
25
33
|
const data = "data" in account ? account.data : account;
|
|
34
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([23, 21, 23, 22, 82, 109, 232, 161])), 0)) {
|
|
35
|
+
return IntentEngineAccount.ClaimBoard;
|
|
36
|
+
}
|
|
37
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([96, 136, 210, 244, 137, 110, 178, 104])), 0)) {
|
|
38
|
+
return IntentEngineAccount.Committee;
|
|
39
|
+
}
|
|
26
40
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([155, 12, 170, 224, 30, 250, 204, 130])), 0)) {
|
|
27
41
|
return IntentEngineAccount.Config;
|
|
28
42
|
}
|
|
@@ -32,6 +46,12 @@ export function identifyIntentEngineAccount(account) {
|
|
|
32
46
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([113, 216, 98, 159, 185, 63, 55, 18])), 0)) {
|
|
33
47
|
return IntentEngineAccount.Mandate;
|
|
34
48
|
}
|
|
49
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([128, 26, 215, 34, 114, 101, 30, 148])), 0)) {
|
|
50
|
+
return IntentEngineAccount.MintCap;
|
|
51
|
+
}
|
|
52
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([184, 101, 165, 188, 95, 63, 127, 188])), 0)) {
|
|
53
|
+
return IntentEngineAccount.Profile;
|
|
54
|
+
}
|
|
35
55
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([72, 177, 85, 249, 76, 167, 186, 126])), 0)) {
|
|
36
56
|
return IntentEngineAccount.UserState;
|
|
37
57
|
}
|
|
@@ -41,53 +61,75 @@ export const IntentEngineEvent = {
|
|
|
41
61
|
0: "AdminAccepted",
|
|
42
62
|
1: "AdminProposed",
|
|
43
63
|
2: "AgentPaid",
|
|
44
|
-
3: "
|
|
45
|
-
4: "
|
|
46
|
-
5: "
|
|
47
|
-
6: "
|
|
48
|
-
7: "
|
|
49
|
-
8: "
|
|
50
|
-
9: "
|
|
51
|
-
10: "
|
|
52
|
-
11: "
|
|
53
|
-
12: "
|
|
54
|
-
13: "
|
|
55
|
-
14: "
|
|
56
|
-
15: "
|
|
57
|
-
16: "
|
|
58
|
-
17: "
|
|
59
|
-
18: "
|
|
60
|
-
19: "
|
|
61
|
-
20: "
|
|
62
|
-
21: "
|
|
63
|
-
22: "
|
|
64
|
-
23: "
|
|
65
|
-
24: "
|
|
64
|
+
3: "CapsRequiredSet",
|
|
65
|
+
4: "ClaimDropped",
|
|
66
|
+
5: "ClaimsClosed",
|
|
67
|
+
6: "ClaimsOpened",
|
|
68
|
+
7: "CommitteeAttested",
|
|
69
|
+
8: "CommitteeCreated",
|
|
70
|
+
9: "ConfigInitialized",
|
|
71
|
+
10: "ConfigUpdated",
|
|
72
|
+
11: "EconomicsUpdated",
|
|
73
|
+
12: "EpochAdvanced",
|
|
74
|
+
13: "FeeWithheld",
|
|
75
|
+
14: "FillBegun",
|
|
76
|
+
15: "FillEnded",
|
|
77
|
+
16: "IntentAttested",
|
|
78
|
+
17: "IntentCancelled",
|
|
79
|
+
18: "IntentClosed",
|
|
80
|
+
19: "IntentCreated",
|
|
81
|
+
20: "IntentExpired",
|
|
82
|
+
21: "IntentFilled",
|
|
83
|
+
22: "IntentSplit",
|
|
84
|
+
23: "JobClaimed",
|
|
85
|
+
24: "MandateClosed",
|
|
86
|
+
25: "MandateCreated",
|
|
87
|
+
26: "MandateUsed",
|
|
88
|
+
27: "MintCapSet",
|
|
89
|
+
28: "NonceAdvanced",
|
|
90
|
+
29: "PauseLowered",
|
|
91
|
+
30: "PauseRaised",
|
|
92
|
+
31: "ProfileClosed",
|
|
93
|
+
32: "ProfileSet",
|
|
94
|
+
33: "RelayerPaid",
|
|
95
|
+
34: "StakeMoved",
|
|
96
|
+
35: "UserInitialized",
|
|
66
97
|
AdminAccepted: 0,
|
|
67
98
|
AdminProposed: 1,
|
|
68
99
|
AgentPaid: 2,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
CapsRequiredSet: 3,
|
|
101
|
+
ClaimDropped: 4,
|
|
102
|
+
ClaimsClosed: 5,
|
|
103
|
+
ClaimsOpened: 6,
|
|
104
|
+
CommitteeAttested: 7,
|
|
105
|
+
CommitteeCreated: 8,
|
|
106
|
+
ConfigInitialized: 9,
|
|
107
|
+
ConfigUpdated: 10,
|
|
108
|
+
EconomicsUpdated: 11,
|
|
109
|
+
EpochAdvanced: 12,
|
|
110
|
+
FeeWithheld: 13,
|
|
111
|
+
FillBegun: 14,
|
|
112
|
+
FillEnded: 15,
|
|
113
|
+
IntentAttested: 16,
|
|
114
|
+
IntentCancelled: 17,
|
|
115
|
+
IntentClosed: 18,
|
|
116
|
+
IntentCreated: 19,
|
|
117
|
+
IntentExpired: 20,
|
|
118
|
+
IntentFilled: 21,
|
|
119
|
+
IntentSplit: 22,
|
|
120
|
+
JobClaimed: 23,
|
|
121
|
+
MandateClosed: 24,
|
|
122
|
+
MandateCreated: 25,
|
|
123
|
+
MandateUsed: 26,
|
|
124
|
+
MintCapSet: 27,
|
|
125
|
+
NonceAdvanced: 28,
|
|
126
|
+
PauseLowered: 29,
|
|
127
|
+
PauseRaised: 30,
|
|
128
|
+
ProfileClosed: 31,
|
|
129
|
+
ProfileSet: 32,
|
|
130
|
+
RelayerPaid: 33,
|
|
131
|
+
StakeMoved: 34,
|
|
132
|
+
UserInitialized: 35,
|
|
91
133
|
};
|
|
92
134
|
export function identifyIntentEngineEvent(event) {
|
|
93
135
|
const data = "data" in event ? event.data : event;
|
|
@@ -100,6 +142,24 @@ export function identifyIntentEngineEvent(event) {
|
|
|
100
142
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([139, 166, 125, 203, 163, 24, 31, 93])), 0)) {
|
|
101
143
|
return IntentEngineEvent.AgentPaid;
|
|
102
144
|
}
|
|
145
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([184, 159, 173, 240, 22, 243, 236, 158])), 0)) {
|
|
146
|
+
return IntentEngineEvent.CapsRequiredSet;
|
|
147
|
+
}
|
|
148
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([171, 220, 49, 208, 172, 242, 71, 154])), 0)) {
|
|
149
|
+
return IntentEngineEvent.ClaimDropped;
|
|
150
|
+
}
|
|
151
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([218, 185, 246, 42, 164, 178, 89, 108])), 0)) {
|
|
152
|
+
return IntentEngineEvent.ClaimsClosed;
|
|
153
|
+
}
|
|
154
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([126, 92, 24, 148, 242, 66, 8, 28])), 0)) {
|
|
155
|
+
return IntentEngineEvent.ClaimsOpened;
|
|
156
|
+
}
|
|
157
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([23, 7, 101, 168, 248, 95, 104, 5])), 0)) {
|
|
158
|
+
return IntentEngineEvent.CommitteeAttested;
|
|
159
|
+
}
|
|
160
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([150, 119, 144, 25, 171, 170, 67, 43])), 0)) {
|
|
161
|
+
return IntentEngineEvent.CommitteeCreated;
|
|
162
|
+
}
|
|
103
163
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([181, 49, 200, 156, 19, 167, 178, 91])), 0)) {
|
|
104
164
|
return IntentEngineEvent.ConfigInitialized;
|
|
105
165
|
}
|
|
@@ -142,6 +202,9 @@ export function identifyIntentEngineEvent(event) {
|
|
|
142
202
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([11, 81, 56, 177, 231, 227, 244, 174])), 0)) {
|
|
143
203
|
return IntentEngineEvent.IntentSplit;
|
|
144
204
|
}
|
|
205
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([176, 110, 104, 38, 27, 220, 61, 191])), 0)) {
|
|
206
|
+
return IntentEngineEvent.JobClaimed;
|
|
207
|
+
}
|
|
145
208
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([217, 212, 155, 243, 4, 34, 255, 65])), 0)) {
|
|
146
209
|
return IntentEngineEvent.MandateClosed;
|
|
147
210
|
}
|
|
@@ -151,6 +214,9 @@ export function identifyIntentEngineEvent(event) {
|
|
|
151
214
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([146, 143, 185, 244, 9, 187, 211, 187])), 0)) {
|
|
152
215
|
return IntentEngineEvent.MandateUsed;
|
|
153
216
|
}
|
|
217
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([38, 33, 246, 14, 124, 58, 91, 188])), 0)) {
|
|
218
|
+
return IntentEngineEvent.MintCapSet;
|
|
219
|
+
}
|
|
154
220
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([167, 74, 249, 119, 105, 11, 136, 130])), 0)) {
|
|
155
221
|
return IntentEngineEvent.NonceAdvanced;
|
|
156
222
|
}
|
|
@@ -160,9 +226,18 @@ export function identifyIntentEngineEvent(event) {
|
|
|
160
226
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([177, 125, 72, 185, 68, 247, 129, 112])), 0)) {
|
|
161
227
|
return IntentEngineEvent.PauseRaised;
|
|
162
228
|
}
|
|
229
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([240, 230, 21, 163, 106, 38, 166, 89])), 0)) {
|
|
230
|
+
return IntentEngineEvent.ProfileClosed;
|
|
231
|
+
}
|
|
232
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([68, 214, 252, 160, 38, 244, 12, 214])), 0)) {
|
|
233
|
+
return IntentEngineEvent.ProfileSet;
|
|
234
|
+
}
|
|
163
235
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([117, 169, 2, 222, 150, 114, 118, 250])), 0)) {
|
|
164
236
|
return IntentEngineEvent.RelayerPaid;
|
|
165
237
|
}
|
|
238
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([229, 213, 90, 235, 88, 242, 57, 27])), 0)) {
|
|
239
|
+
return IntentEngineEvent.StakeMoved;
|
|
240
|
+
}
|
|
166
241
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([66, 195, 5, 223, 42, 84, 135, 60])), 0)) {
|
|
167
242
|
return IntentEngineEvent.UserInitialized;
|
|
168
243
|
}
|
|
@@ -174,47 +249,71 @@ export const IntentEngineInstruction = {
|
|
|
174
249
|
2: "AdvanceNonce",
|
|
175
250
|
3: "BeginFill",
|
|
176
251
|
4: "CancelIntent",
|
|
177
|
-
5: "
|
|
178
|
-
6: "
|
|
179
|
-
7: "
|
|
180
|
-
8: "
|
|
181
|
-
9: "
|
|
182
|
-
10: "
|
|
183
|
-
11: "
|
|
184
|
-
12: "
|
|
185
|
-
13: "
|
|
186
|
-
14: "
|
|
187
|
-
15: "
|
|
188
|
-
16: "
|
|
189
|
-
17: "
|
|
190
|
-
18: "
|
|
191
|
-
19: "
|
|
192
|
-
20: "
|
|
193
|
-
21: "
|
|
194
|
-
22: "
|
|
252
|
+
5: "ClaimJob",
|
|
253
|
+
6: "CloseIntent",
|
|
254
|
+
7: "CloseProfile",
|
|
255
|
+
8: "CreateCommittee",
|
|
256
|
+
9: "CreateIntent",
|
|
257
|
+
10: "CreateIntentByAgent",
|
|
258
|
+
11: "CreateIntentSigned",
|
|
259
|
+
12: "CreateMandate",
|
|
260
|
+
13: "CreateProfile",
|
|
261
|
+
14: "DropClaim",
|
|
262
|
+
15: "EndFill",
|
|
263
|
+
16: "ExpireIntent",
|
|
264
|
+
17: "FillAttested",
|
|
265
|
+
18: "FillAttestedCommittee",
|
|
266
|
+
19: "FillAttestedSplit",
|
|
267
|
+
20: "FillAttestedSplitCommittee",
|
|
268
|
+
21: "FillIntent",
|
|
269
|
+
22: "InitConfig",
|
|
270
|
+
23: "InitUser",
|
|
271
|
+
24: "LowerPause",
|
|
272
|
+
25: "OpenClaims",
|
|
273
|
+
26: "ProposeAdmin",
|
|
274
|
+
27: "RaisePause",
|
|
275
|
+
28: "RevokeMandate",
|
|
276
|
+
29: "SetCapsRequired",
|
|
277
|
+
30: "SetMintCap",
|
|
278
|
+
31: "SettleClaims",
|
|
279
|
+
32: "UpdateConfig",
|
|
280
|
+
33: "UpdateEconomics",
|
|
281
|
+
34: "UpdateProfile",
|
|
195
282
|
AcceptAdmin: 0,
|
|
196
283
|
AdvanceEpoch: 1,
|
|
197
284
|
AdvanceNonce: 2,
|
|
198
285
|
BeginFill: 3,
|
|
199
286
|
CancelIntent: 4,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
287
|
+
ClaimJob: 5,
|
|
288
|
+
CloseIntent: 6,
|
|
289
|
+
CloseProfile: 7,
|
|
290
|
+
CreateCommittee: 8,
|
|
291
|
+
CreateIntent: 9,
|
|
292
|
+
CreateIntentByAgent: 10,
|
|
293
|
+
CreateIntentSigned: 11,
|
|
294
|
+
CreateMandate: 12,
|
|
295
|
+
CreateProfile: 13,
|
|
296
|
+
DropClaim: 14,
|
|
297
|
+
EndFill: 15,
|
|
298
|
+
ExpireIntent: 16,
|
|
299
|
+
FillAttested: 17,
|
|
300
|
+
FillAttestedCommittee: 18,
|
|
301
|
+
FillAttestedSplit: 19,
|
|
302
|
+
FillAttestedSplitCommittee: 20,
|
|
303
|
+
FillIntent: 21,
|
|
304
|
+
InitConfig: 22,
|
|
305
|
+
InitUser: 23,
|
|
306
|
+
LowerPause: 24,
|
|
307
|
+
OpenClaims: 25,
|
|
308
|
+
ProposeAdmin: 26,
|
|
309
|
+
RaisePause: 27,
|
|
310
|
+
RevokeMandate: 28,
|
|
311
|
+
SetCapsRequired: 29,
|
|
312
|
+
SetMintCap: 30,
|
|
313
|
+
SettleClaims: 31,
|
|
314
|
+
UpdateConfig: 32,
|
|
315
|
+
UpdateEconomics: 33,
|
|
316
|
+
UpdateProfile: 34,
|
|
218
317
|
};
|
|
219
318
|
export function identifyIntentEngineInstruction(instruction) {
|
|
220
319
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
@@ -233,9 +332,18 @@ export function identifyIntentEngineInstruction(instruction) {
|
|
|
233
332
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([67, 73, 238, 244, 208, 89, 225, 59])), 0)) {
|
|
234
333
|
return IntentEngineInstruction.CancelIntent;
|
|
235
334
|
}
|
|
335
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([9, 160, 5, 231, 116, 123, 198, 14])), 0)) {
|
|
336
|
+
return IntentEngineInstruction.ClaimJob;
|
|
337
|
+
}
|
|
236
338
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([112, 245, 154, 249, 57, 126, 54, 122])), 0)) {
|
|
237
339
|
return IntentEngineInstruction.CloseIntent;
|
|
238
340
|
}
|
|
341
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([167, 36, 181, 8, 136, 158, 46, 207])), 0)) {
|
|
342
|
+
return IntentEngineInstruction.CloseProfile;
|
|
343
|
+
}
|
|
344
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([216, 137, 130, 24, 113, 11, 204, 15])), 0)) {
|
|
345
|
+
return IntentEngineInstruction.CreateCommittee;
|
|
346
|
+
}
|
|
239
347
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([216, 214, 79, 121, 23, 194, 96, 104])), 0)) {
|
|
240
348
|
return IntentEngineInstruction.CreateIntent;
|
|
241
349
|
}
|
|
@@ -248,6 +356,12 @@ export function identifyIntentEngineInstruction(instruction) {
|
|
|
248
356
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([230, 170, 158, 68, 33, 169, 16, 158])), 0)) {
|
|
249
357
|
return IntentEngineInstruction.CreateMandate;
|
|
250
358
|
}
|
|
359
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([225, 205, 234, 143, 17, 186, 50, 220])), 0)) {
|
|
360
|
+
return IntentEngineInstruction.CreateProfile;
|
|
361
|
+
}
|
|
362
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([173, 223, 128, 244, 25, 87, 148, 63])), 0)) {
|
|
363
|
+
return IntentEngineInstruction.DropClaim;
|
|
364
|
+
}
|
|
251
365
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([54, 224, 12, 98, 243, 61, 136, 91])), 0)) {
|
|
252
366
|
return IntentEngineInstruction.EndFill;
|
|
253
367
|
}
|
|
@@ -257,9 +371,15 @@ export function identifyIntentEngineInstruction(instruction) {
|
|
|
257
371
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([241, 100, 218, 154, 206, 21, 102, 122])), 0)) {
|
|
258
372
|
return IntentEngineInstruction.FillAttested;
|
|
259
373
|
}
|
|
374
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([226, 186, 211, 191, 65, 241, 205, 76])), 0)) {
|
|
375
|
+
return IntentEngineInstruction.FillAttestedCommittee;
|
|
376
|
+
}
|
|
260
377
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([34, 107, 23, 102, 114, 73, 49, 40])), 0)) {
|
|
261
378
|
return IntentEngineInstruction.FillAttestedSplit;
|
|
262
379
|
}
|
|
380
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([228, 68, 231, 222, 93, 49, 145, 29])), 0)) {
|
|
381
|
+
return IntentEngineInstruction.FillAttestedSplitCommittee;
|
|
382
|
+
}
|
|
263
383
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([68, 255, 62, 77, 155, 136, 145, 148])), 0)) {
|
|
264
384
|
return IntentEngineInstruction.FillIntent;
|
|
265
385
|
}
|
|
@@ -272,6 +392,9 @@ export function identifyIntentEngineInstruction(instruction) {
|
|
|
272
392
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([162, 105, 90, 233, 47, 43, 98, 41])), 0)) {
|
|
273
393
|
return IntentEngineInstruction.LowerPause;
|
|
274
394
|
}
|
|
395
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([111, 108, 90, 115, 178, 90, 24, 228])), 0)) {
|
|
396
|
+
return IntentEngineInstruction.OpenClaims;
|
|
397
|
+
}
|
|
275
398
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([121, 214, 199, 212, 87, 39, 117, 234])), 0)) {
|
|
276
399
|
return IntentEngineInstruction.ProposeAdmin;
|
|
277
400
|
}
|
|
@@ -281,12 +404,24 @@ export function identifyIntentEngineInstruction(instruction) {
|
|
|
281
404
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([252, 97, 140, 119, 67, 43, 177, 108])), 0)) {
|
|
282
405
|
return IntentEngineInstruction.RevokeMandate;
|
|
283
406
|
}
|
|
407
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([28, 67, 121, 59, 229, 49, 30, 239])), 0)) {
|
|
408
|
+
return IntentEngineInstruction.SetCapsRequired;
|
|
409
|
+
}
|
|
410
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([192, 119, 105, 42, 212, 12, 202, 79])), 0)) {
|
|
411
|
+
return IntentEngineInstruction.SetMintCap;
|
|
412
|
+
}
|
|
413
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([58, 91, 9, 15, 201, 59, 179, 94])), 0)) {
|
|
414
|
+
return IntentEngineInstruction.SettleClaims;
|
|
415
|
+
}
|
|
284
416
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([29, 158, 252, 191, 10, 83, 219, 99])), 0)) {
|
|
285
417
|
return IntentEngineInstruction.UpdateConfig;
|
|
286
418
|
}
|
|
287
419
|
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([1, 75, 229, 0, 238, 66, 246, 51])), 0)) {
|
|
288
420
|
return IntentEngineInstruction.UpdateEconomics;
|
|
289
421
|
}
|
|
422
|
+
if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([98, 67, 99, 206, 86, 115, 175, 1])), 0)) {
|
|
423
|
+
return IntentEngineInstruction.UpdateProfile;
|
|
424
|
+
}
|
|
290
425
|
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, { instructionData: data, programName: "intentEngine" });
|
|
291
426
|
}
|
|
292
427
|
export function parseIntentEngineInstruction(instruction) {
|
|
@@ -327,6 +462,13 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
327
462
|
...parseCancelIntentInstruction(instruction),
|
|
328
463
|
};
|
|
329
464
|
}
|
|
465
|
+
case IntentEngineInstruction.ClaimJob: {
|
|
466
|
+
assertIsInstructionWithAccounts(instruction);
|
|
467
|
+
return {
|
|
468
|
+
instructionType: IntentEngineInstruction.ClaimJob,
|
|
469
|
+
...parseClaimJobInstruction(instruction),
|
|
470
|
+
};
|
|
471
|
+
}
|
|
330
472
|
case IntentEngineInstruction.CloseIntent: {
|
|
331
473
|
assertIsInstructionWithAccounts(instruction);
|
|
332
474
|
return {
|
|
@@ -334,6 +476,20 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
334
476
|
...parseCloseIntentInstruction(instruction),
|
|
335
477
|
};
|
|
336
478
|
}
|
|
479
|
+
case IntentEngineInstruction.CloseProfile: {
|
|
480
|
+
assertIsInstructionWithAccounts(instruction);
|
|
481
|
+
return {
|
|
482
|
+
instructionType: IntentEngineInstruction.CloseProfile,
|
|
483
|
+
...parseCloseProfileInstruction(instruction),
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
case IntentEngineInstruction.CreateCommittee: {
|
|
487
|
+
assertIsInstructionWithAccounts(instruction);
|
|
488
|
+
return {
|
|
489
|
+
instructionType: IntentEngineInstruction.CreateCommittee,
|
|
490
|
+
...parseCreateCommitteeInstruction(instruction),
|
|
491
|
+
};
|
|
492
|
+
}
|
|
337
493
|
case IntentEngineInstruction.CreateIntent: {
|
|
338
494
|
assertIsInstructionWithAccounts(instruction);
|
|
339
495
|
return {
|
|
@@ -362,6 +518,20 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
362
518
|
...parseCreateMandateInstruction(instruction),
|
|
363
519
|
};
|
|
364
520
|
}
|
|
521
|
+
case IntentEngineInstruction.CreateProfile: {
|
|
522
|
+
assertIsInstructionWithAccounts(instruction);
|
|
523
|
+
return {
|
|
524
|
+
instructionType: IntentEngineInstruction.CreateProfile,
|
|
525
|
+
...parseCreateProfileInstruction(instruction),
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
case IntentEngineInstruction.DropClaim: {
|
|
529
|
+
assertIsInstructionWithAccounts(instruction);
|
|
530
|
+
return {
|
|
531
|
+
instructionType: IntentEngineInstruction.DropClaim,
|
|
532
|
+
...parseDropClaimInstruction(instruction),
|
|
533
|
+
};
|
|
534
|
+
}
|
|
365
535
|
case IntentEngineInstruction.EndFill: {
|
|
366
536
|
assertIsInstructionWithAccounts(instruction);
|
|
367
537
|
return {
|
|
@@ -383,6 +553,13 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
383
553
|
...parseFillAttestedInstruction(instruction),
|
|
384
554
|
};
|
|
385
555
|
}
|
|
556
|
+
case IntentEngineInstruction.FillAttestedCommittee: {
|
|
557
|
+
assertIsInstructionWithAccounts(instruction);
|
|
558
|
+
return {
|
|
559
|
+
instructionType: IntentEngineInstruction.FillAttestedCommittee,
|
|
560
|
+
...parseFillAttestedCommitteeInstruction(instruction),
|
|
561
|
+
};
|
|
562
|
+
}
|
|
386
563
|
case IntentEngineInstruction.FillAttestedSplit: {
|
|
387
564
|
assertIsInstructionWithAccounts(instruction);
|
|
388
565
|
return {
|
|
@@ -390,6 +567,13 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
390
567
|
...parseFillAttestedSplitInstruction(instruction),
|
|
391
568
|
};
|
|
392
569
|
}
|
|
570
|
+
case IntentEngineInstruction.FillAttestedSplitCommittee: {
|
|
571
|
+
assertIsInstructionWithAccounts(instruction);
|
|
572
|
+
return {
|
|
573
|
+
instructionType: IntentEngineInstruction.FillAttestedSplitCommittee,
|
|
574
|
+
...parseFillAttestedSplitCommitteeInstruction(instruction),
|
|
575
|
+
};
|
|
576
|
+
}
|
|
393
577
|
case IntentEngineInstruction.FillIntent: {
|
|
394
578
|
assertIsInstructionWithAccounts(instruction);
|
|
395
579
|
return {
|
|
@@ -418,6 +602,13 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
418
602
|
...parseLowerPauseInstruction(instruction),
|
|
419
603
|
};
|
|
420
604
|
}
|
|
605
|
+
case IntentEngineInstruction.OpenClaims: {
|
|
606
|
+
assertIsInstructionWithAccounts(instruction);
|
|
607
|
+
return {
|
|
608
|
+
instructionType: IntentEngineInstruction.OpenClaims,
|
|
609
|
+
...parseOpenClaimsInstruction(instruction),
|
|
610
|
+
};
|
|
611
|
+
}
|
|
421
612
|
case IntentEngineInstruction.ProposeAdmin: {
|
|
422
613
|
assertIsInstructionWithAccounts(instruction);
|
|
423
614
|
return {
|
|
@@ -439,6 +630,27 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
439
630
|
...parseRevokeMandateInstruction(instruction),
|
|
440
631
|
};
|
|
441
632
|
}
|
|
633
|
+
case IntentEngineInstruction.SetCapsRequired: {
|
|
634
|
+
assertIsInstructionWithAccounts(instruction);
|
|
635
|
+
return {
|
|
636
|
+
instructionType: IntentEngineInstruction.SetCapsRequired,
|
|
637
|
+
...parseSetCapsRequiredInstruction(instruction),
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
case IntentEngineInstruction.SetMintCap: {
|
|
641
|
+
assertIsInstructionWithAccounts(instruction);
|
|
642
|
+
return {
|
|
643
|
+
instructionType: IntentEngineInstruction.SetMintCap,
|
|
644
|
+
...parseSetMintCapInstruction(instruction),
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
case IntentEngineInstruction.SettleClaims: {
|
|
648
|
+
assertIsInstructionWithAccounts(instruction);
|
|
649
|
+
return {
|
|
650
|
+
instructionType: IntentEngineInstruction.SettleClaims,
|
|
651
|
+
...parseSettleClaimsInstruction(instruction),
|
|
652
|
+
};
|
|
653
|
+
}
|
|
442
654
|
case IntentEngineInstruction.UpdateConfig: {
|
|
443
655
|
assertIsInstructionWithAccounts(instruction);
|
|
444
656
|
return {
|
|
@@ -453,6 +665,13 @@ export function parseIntentEngineInstruction(instruction) {
|
|
|
453
665
|
...parseUpdateEconomicsInstruction(instruction),
|
|
454
666
|
};
|
|
455
667
|
}
|
|
668
|
+
case IntentEngineInstruction.UpdateProfile: {
|
|
669
|
+
assertIsInstructionWithAccounts(instruction);
|
|
670
|
+
return {
|
|
671
|
+
instructionType: IntentEngineInstruction.UpdateProfile,
|
|
672
|
+
...parseUpdateProfileInstruction(instruction),
|
|
673
|
+
};
|
|
674
|
+
}
|
|
456
675
|
default:
|
|
457
676
|
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, {
|
|
458
677
|
instructionType: instructionType,
|
|
@@ -465,9 +684,13 @@ export function intentEngineProgram() {
|
|
|
465
684
|
return extendClient(client, {
|
|
466
685
|
intentEngine: {
|
|
467
686
|
accounts: {
|
|
687
|
+
claimBoard: addSelfFetchFunctions(client, getClaimBoardCodec()),
|
|
688
|
+
committee: addSelfFetchFunctions(client, getCommitteeCodec()),
|
|
468
689
|
config: addSelfFetchFunctions(client, getConfigCodec()),
|
|
469
690
|
intent: addSelfFetchFunctions(client, getIntentCodec()),
|
|
470
691
|
mandate: addSelfFetchFunctions(client, getMandateCodec()),
|
|
692
|
+
mintCap: addSelfFetchFunctions(client, getMintCapCodec()),
|
|
693
|
+
profile: addSelfFetchFunctions(client, getProfileCodec()),
|
|
471
694
|
userState: addSelfFetchFunctions(client, getUserStateCodec()),
|
|
472
695
|
},
|
|
473
696
|
instructions: {
|
|
@@ -476,7 +699,13 @@ export function intentEngineProgram() {
|
|
|
476
699
|
advanceNonce: (input) => addSelfPlanAndSendFunctions(client, getAdvanceNonceInstructionAsync(input)),
|
|
477
700
|
beginFill: (input) => addSelfPlanAndSendFunctions(client, getBeginFillInstructionAsync(input)),
|
|
478
701
|
cancelIntent: (input) => addSelfPlanAndSendFunctions(client, getCancelIntentInstructionAsync(input)),
|
|
702
|
+
claimJob: (input) => addSelfPlanAndSendFunctions(client, getClaimJobInstructionAsync(input)),
|
|
479
703
|
closeIntent: (input) => addSelfPlanAndSendFunctions(client, getCloseIntentInstructionAsync(input)),
|
|
704
|
+
closeProfile: (input) => addSelfPlanAndSendFunctions(client, getCloseProfileInstructionAsync(input)),
|
|
705
|
+
createCommittee: (input) => addSelfPlanAndSendFunctions(client, getCreateCommitteeInstructionAsync({
|
|
706
|
+
...input,
|
|
707
|
+
payer: input.payer ?? client.payer,
|
|
708
|
+
})),
|
|
480
709
|
createIntent: (input) => addSelfPlanAndSendFunctions(client, getCreateIntentInstructionAsync(input)),
|
|
481
710
|
createIntentByAgent: (input) => addSelfPlanAndSendFunctions(client, getCreateIntentByAgentInstructionAsync(input)),
|
|
482
711
|
createIntentSigned: (input) => addSelfPlanAndSendFunctions(client, getCreateIntentSignedInstructionAsync({
|
|
@@ -484,25 +713,41 @@ export function intentEngineProgram() {
|
|
|
484
713
|
payer: input.payer ?? client.payer,
|
|
485
714
|
})),
|
|
486
715
|
createMandate: (input) => addSelfPlanAndSendFunctions(client, getCreateMandateInstructionAsync(input)),
|
|
716
|
+
createProfile: (input) => addSelfPlanAndSendFunctions(client, getCreateProfileInstructionAsync(input)),
|
|
717
|
+
dropClaim: (input) => addSelfPlanAndSendFunctions(client, getDropClaimInstructionAsync(input)),
|
|
487
718
|
endFill: (input) => addSelfPlanAndSendFunctions(client, getEndFillInstruction(input)),
|
|
488
719
|
expireIntent: (input) => addSelfPlanAndSendFunctions(client, getExpireIntentInstructionAsync(input)),
|
|
489
720
|
fillAttested: (input) => addSelfPlanAndSendFunctions(client, getFillAttestedInstructionAsync(input)),
|
|
721
|
+
fillAttestedCommittee: (input) => addSelfPlanAndSendFunctions(client, getFillAttestedCommitteeInstructionAsync(input)),
|
|
490
722
|
fillAttestedSplit: (input) => addSelfPlanAndSendFunctions(client, getFillAttestedSplitInstructionAsync(input)),
|
|
723
|
+
fillAttestedSplitCommittee: (input) => addSelfPlanAndSendFunctions(client, getFillAttestedSplitCommitteeInstructionAsync(input)),
|
|
491
724
|
fillIntent: (input) => addSelfPlanAndSendFunctions(client, getFillIntentInstructionAsync(input)),
|
|
492
725
|
initConfig: (input) => addSelfPlanAndSendFunctions(client, getInitConfigInstructionAsync(input)),
|
|
493
726
|
initUser: (input) => addSelfPlanAndSendFunctions(client, getInitUserInstructionAsync(input)),
|
|
494
727
|
lowerPause: (input) => addSelfPlanAndSendFunctions(client, getLowerPauseInstruction(input)),
|
|
728
|
+
openClaims: (input) => addSelfPlanAndSendFunctions(client, getOpenClaimsInstructionAsync(input)),
|
|
495
729
|
proposeAdmin: (input) => addSelfPlanAndSendFunctions(client, getProposeAdminInstruction(input)),
|
|
496
730
|
raisePause: (input) => addSelfPlanAndSendFunctions(client, getRaisePauseInstruction(input)),
|
|
497
731
|
revokeMandate: (input) => addSelfPlanAndSendFunctions(client, getRevokeMandateInstruction(input)),
|
|
732
|
+
setCapsRequired: (input) => addSelfPlanAndSendFunctions(client, getSetCapsRequiredInstruction(input)),
|
|
733
|
+
setMintCap: (input) => addSelfPlanAndSendFunctions(client, getSetMintCapInstructionAsync({
|
|
734
|
+
...input,
|
|
735
|
+
payer: input.payer ?? client.payer,
|
|
736
|
+
})),
|
|
737
|
+
settleClaims: (input) => addSelfPlanAndSendFunctions(client, getSettleClaimsInstructionAsync(input)),
|
|
498
738
|
updateConfig: (input) => addSelfPlanAndSendFunctions(client, getUpdateConfigInstruction(input)),
|
|
499
739
|
updateEconomics: (input) => addSelfPlanAndSendFunctions(client, getUpdateEconomicsInstruction(input)),
|
|
740
|
+
updateProfile: (input) => addSelfPlanAndSendFunctions(client, getUpdateProfileInstructionAsync(input)),
|
|
500
741
|
},
|
|
501
742
|
pdas: {
|
|
502
743
|
userState: findUserStatePda,
|
|
503
744
|
vault: findVaultPda,
|
|
745
|
+
board: findBoardPda,
|
|
746
|
+
profile: findProfilePda,
|
|
747
|
+
committee: findCommitteePda,
|
|
504
748
|
delegate: findDelegatePda,
|
|
505
749
|
config: findConfigPda,
|
|
750
|
+
mintCap: findMintCapPda,
|
|
506
751
|
},
|
|
507
752
|
identifyAccount: identifyIntentEngineAccount,
|
|
508
753
|
identifyInstruction: identifyIntentEngineInstruction,
|