@ghostspeak/sdk 2.0.6 → 2.0.8

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.
Files changed (118) hide show
  1. package/README.md +295 -30
  2. package/dist/GhostSpeakClient-bnXwUPHI.d.ts +1011 -0
  3. package/dist/StakingModule-DunDShLq.d.ts +2446 -0
  4. package/dist/{agent-M74TCRON.js → agent-S42FIMR7.js} +4 -4
  5. package/dist/{agent-M74TCRON.js.map → agent-S42FIMR7.js.map} +1 -1
  6. package/dist/batch-operations-45CQFEID.js +4 -0
  7. package/dist/batch-operations-45CQFEID.js.map +1 -0
  8. package/dist/browser-CI5_6Gzk.d.ts +234 -0
  9. package/dist/browser.d.ts +6 -576
  10. package/dist/browser.js +15 -842
  11. package/dist/browser.js.map +1 -1
  12. package/dist/chunk-46QWY3MG.js +156 -0
  13. package/dist/chunk-46QWY3MG.js.map +1 -0
  14. package/dist/{chunk-F3DZMBUA.js → chunk-5QBSC4T4.js} +327 -493
  15. package/dist/chunk-5QBSC4T4.js.map +1 -0
  16. package/dist/chunk-5QZVFUXB.js +4176 -0
  17. package/dist/chunk-5QZVFUXB.js.map +1 -0
  18. package/dist/chunk-6XCCMJ6M.js +1865 -0
  19. package/dist/chunk-6XCCMJ6M.js.map +1 -0
  20. package/dist/chunk-A7ALCVUI.js +98 -0
  21. package/dist/chunk-A7ALCVUI.js.map +1 -0
  22. package/dist/chunk-AWMGX3OX.js +814 -0
  23. package/dist/chunk-AWMGX3OX.js.map +1 -0
  24. package/dist/chunk-BF3IQ35I.js +284 -0
  25. package/dist/chunk-BF3IQ35I.js.map +1 -0
  26. package/dist/chunk-BQDGRTVP.js +168 -0
  27. package/dist/chunk-BQDGRTVP.js.map +1 -0
  28. package/dist/chunk-IQM5RASO.js +8502 -0
  29. package/dist/chunk-IQM5RASO.js.map +1 -0
  30. package/dist/chunk-JYXSOXCP.js +3850 -0
  31. package/dist/chunk-JYXSOXCP.js.map +1 -0
  32. package/dist/chunk-OXA7MECJ.js +7787 -0
  33. package/dist/chunk-OXA7MECJ.js.map +1 -0
  34. package/dist/chunk-QLRWUHN2.js +231 -0
  35. package/dist/chunk-QLRWUHN2.js.map +1 -0
  36. package/dist/chunk-SKMJJ3Q6.js +125 -0
  37. package/dist/chunk-SKMJJ3Q6.js.map +1 -0
  38. package/dist/chunk-TTB4OS2D.js +69 -0
  39. package/dist/chunk-TTB4OS2D.js.map +1 -0
  40. package/dist/chunk-UP2VWCW5.js +33 -0
  41. package/dist/{chunk-NSBPE2FW.js.map → chunk-UP2VWCW5.js.map} +1 -1
  42. package/dist/{chunk-UJUGGLMT.js → chunk-VQZQCHUT.js} +5 -5
  43. package/dist/{chunk-UJUGGLMT.js.map → chunk-VQZQCHUT.js.map} +1 -1
  44. package/dist/client.d.ts +4 -4
  45. package/dist/client.js +11 -10
  46. package/dist/createAgentAuthorization-KGZNXZBT.js +5 -0
  47. package/dist/createAgentAuthorization-KGZNXZBT.js.map +1 -0
  48. package/dist/credentials.js +1 -1
  49. package/dist/crypto.js +2 -2
  50. package/dist/errors.js +1 -1
  51. package/dist/feature-flags-B1g0DCPe.d.ts +1181 -0
  52. package/dist/generated-QJREJQ2C.js +9 -0
  53. package/dist/{generated-VNLHMR6Y.js.map → generated-QJREJQ2C.js.map} +1 -1
  54. package/dist/{ghostspeak_wasm-SB2RPJ3D.js → ghostspeak_wasm-F227HOSM.js} +3 -3
  55. package/dist/{ghostspeak_wasm-SB2RPJ3D.js.map → ghostspeak_wasm-F227HOSM.js.map} +1 -1
  56. package/dist/index.d.ts +1179 -1498
  57. package/dist/index.js +356 -3578
  58. package/dist/index.js.map +1 -1
  59. package/dist/metafile-esm.json +1 -1
  60. package/dist/minimal/core-minimal.d.ts +2446 -1245
  61. package/dist/minimal/core-minimal.js +9 -9
  62. package/dist/minimal/core-minimal.js.map +1 -1
  63. package/dist/nacl-fast-W5BJ3KZ2.js +2229 -0
  64. package/dist/nacl-fast-W5BJ3KZ2.js.map +1 -0
  65. package/dist/pda-4KP7CURF.js +4 -0
  66. package/dist/pda-4KP7CURF.js.map +1 -0
  67. package/dist/pda-Ce7VYg4T.d.ts +25 -0
  68. package/dist/reputation-types-Yebf0Rm_.d.ts +1071 -0
  69. package/dist/revokeAuthorization-2ZRO6GUZ.js +5 -0
  70. package/dist/revokeAuthorization-2ZRO6GUZ.js.map +1 -0
  71. package/dist/signature-verification-DGxR4aYQ.d.ts +448 -0
  72. package/dist/types.js +1 -1
  73. package/dist/updateReputationWithAuth-PCEUOCFV.js +5 -0
  74. package/dist/updateReputationWithAuth-PCEUOCFV.js.map +1 -0
  75. package/dist/utils.d.ts +69 -203
  76. package/dist/utils.js +15 -153
  77. package/dist/utils.js.map +1 -1
  78. package/package.json +27 -34
  79. package/dist/.tsbuildinfo +0 -1
  80. package/dist/GhostSpeakClient-D_66Uzsf.d.ts +0 -707
  81. package/dist/GovernanceModule-DQYYys-H.d.ts +0 -1766
  82. package/dist/chunk-APCKGD23.js +0 -1328
  83. package/dist/chunk-APCKGD23.js.map +0 -1
  84. package/dist/chunk-ASQXX4IT.js +0 -572
  85. package/dist/chunk-ASQXX4IT.js.map +0 -1
  86. package/dist/chunk-COGZFWOT.js +0 -19657
  87. package/dist/chunk-COGZFWOT.js.map +0 -1
  88. package/dist/chunk-F3DZMBUA.js.map +0 -1
  89. package/dist/chunk-GMHIUK2R.js +0 -7526
  90. package/dist/chunk-GMHIUK2R.js.map +0 -1
  91. package/dist/chunk-IAWBZYPE.js +0 -356
  92. package/dist/chunk-IAWBZYPE.js.map +0 -1
  93. package/dist/chunk-NSBPE2FW.js +0 -15
  94. package/dist/chunk-OWYHJG6H.js +0 -13311
  95. package/dist/chunk-OWYHJG6H.js.map +0 -1
  96. package/dist/chunk-RDDPOFR5.js +0 -3
  97. package/dist/chunk-RDDPOFR5.js.map +0 -1
  98. package/dist/chunk-RERCHKZP.js +0 -35
  99. package/dist/chunk-RERCHKZP.js.map +0 -1
  100. package/dist/chunk-TVVGXYCI.js +0 -2887
  101. package/dist/chunk-TVVGXYCI.js.map +0 -1
  102. package/dist/chunk-ZGP5552B.js +0 -377
  103. package/dist/chunk-ZGP5552B.js.map +0 -1
  104. package/dist/chunk-ZWOYNHVK.js +0 -196
  105. package/dist/chunk-ZWOYNHVK.js.map +0 -1
  106. package/dist/dist/.tsbuildinfo +0 -1
  107. package/dist/elgamal-VZLWB3XK.js +0 -5
  108. package/dist/elgamal-VZLWB3XK.js.map +0 -1
  109. package/dist/feature-flags-V722ZuXO.d.ts +0 -3512
  110. package/dist/generated-VNLHMR6Y.js +0 -5
  111. package/dist/ipfs-types-BOt9ZNg4.d.ts +0 -592
  112. package/dist/multisigConfig-BzEhy6jy.d.ts +0 -58
  113. package/dist/pda-B_nS8SbD.d.ts +0 -114
  114. package/dist/pda-S4BFJVGE.js +0 -4
  115. package/dist/pda-S4BFJVGE.js.map +0 -1
  116. package/dist/system-addresses-BFNLEbFx.d.ts +0 -857
  117. package/dist/token-2022-rpc-RALH4RK7.js +0 -593
  118. package/dist/token-2022-rpc-RALH4RK7.js.map +0 -1
@@ -0,0 +1,814 @@
1
+ import { containsBytes, fixEncoderSize, getBytesEncoder, AccountRole, upgradeRoleToSigner, isTransactionSigner as isTransactionSigner$1 } from '@solana/kit';
2
+
3
+ // src/generated/programs/ghostspeakMarketplace.ts
4
+ var GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS = "4wHjA2a5YC4twZb4NQpwZpixo5FgxxzuJUrCG7UnF9pB";
5
+ var GhostspeakMarketplaceAccount = /* @__PURE__ */ ((GhostspeakMarketplaceAccount2) => {
6
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["Agent"] = 0] = "Agent";
7
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["AgentReputationAuth"] = 1] = "AgentReputationAuth";
8
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["AgentTreeConfig"] = 2] = "AgentTreeConfig";
9
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["AgentVerification"] = 3] = "AgentVerification";
10
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["AuditTrail"] = 4] = "AuditTrail";
11
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["AuthorizationUsageRecord"] = 5] = "AuthorizationUsageRecord";
12
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["ComplianceReport"] = 6] = "ComplianceReport";
13
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["Credential"] = 7] = "Credential";
14
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["CredentialTemplate"] = 8] = "CredentialTemplate";
15
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["CredentialType"] = 9] = "CredentialType";
16
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["DidDocument"] = 10] = "DidDocument";
17
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["ExternalIdMapping"] = 11] = "ExternalIdMapping";
18
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["GhostProtectEscrow"] = 12] = "GhostProtectEscrow";
19
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["GovernanceProposal"] = 13] = "GovernanceProposal";
20
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["Multisig"] = 14] = "Multisig";
21
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["ProtocolConfig"] = 15] = "ProtocolConfig";
22
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["RbacConfig"] = 16] = "RbacConfig";
23
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["ReentrancyGuard"] = 17] = "ReentrancyGuard";
24
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["ReputationMetrics"] = 18] = "ReputationMetrics";
25
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["StakingAccount"] = 19] = "StakingAccount";
26
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["StakingConfig"] = 20] = "StakingConfig";
27
+ GhostspeakMarketplaceAccount2[GhostspeakMarketplaceAccount2["UserRegistry"] = 21] = "UserRegistry";
28
+ return GhostspeakMarketplaceAccount2;
29
+ })(GhostspeakMarketplaceAccount || {});
30
+ function identifyGhostspeakMarketplaceAccount(account) {
31
+ const data = "data" in account ? account.data : account;
32
+ if (containsBytes(
33
+ data,
34
+ fixEncoderSize(getBytesEncoder(), 8).encode(
35
+ new Uint8Array([47, 166, 112, 147, 155, 197, 86, 7])
36
+ ),
37
+ 0
38
+ )) {
39
+ return 0 /* Agent */;
40
+ }
41
+ if (containsBytes(
42
+ data,
43
+ fixEncoderSize(getBytesEncoder(), 8).encode(
44
+ new Uint8Array([30, 249, 165, 44, 155, 194, 188, 175])
45
+ ),
46
+ 0
47
+ )) {
48
+ return 1 /* AgentReputationAuth */;
49
+ }
50
+ if (containsBytes(
51
+ data,
52
+ fixEncoderSize(getBytesEncoder(), 8).encode(
53
+ new Uint8Array([145, 145, 156, 0, 197, 232, 130, 245])
54
+ ),
55
+ 0
56
+ )) {
57
+ return 2 /* AgentTreeConfig */;
58
+ }
59
+ if (containsBytes(
60
+ data,
61
+ fixEncoderSize(getBytesEncoder(), 8).encode(
62
+ new Uint8Array([128, 155, 95, 241, 66, 207, 166, 59])
63
+ ),
64
+ 0
65
+ )) {
66
+ return 3 /* AgentVerification */;
67
+ }
68
+ if (containsBytes(
69
+ data,
70
+ fixEncoderSize(getBytesEncoder(), 8).encode(
71
+ new Uint8Array([171, 223, 253, 181, 134, 88, 66, 26])
72
+ ),
73
+ 0
74
+ )) {
75
+ return 4 /* AuditTrail */;
76
+ }
77
+ if (containsBytes(
78
+ data,
79
+ fixEncoderSize(getBytesEncoder(), 8).encode(
80
+ new Uint8Array([109, 102, 102, 17, 210, 84, 85, 210])
81
+ ),
82
+ 0
83
+ )) {
84
+ return 5 /* AuthorizationUsageRecord */;
85
+ }
86
+ if (containsBytes(
87
+ data,
88
+ fixEncoderSize(getBytesEncoder(), 8).encode(
89
+ new Uint8Array([75, 146, 78, 26, 130, 240, 228, 35])
90
+ ),
91
+ 0
92
+ )) {
93
+ return 6 /* ComplianceReport */;
94
+ }
95
+ if (containsBytes(
96
+ data,
97
+ fixEncoderSize(getBytesEncoder(), 8).encode(
98
+ new Uint8Array([145, 44, 68, 220, 67, 46, 100, 135])
99
+ ),
100
+ 0
101
+ )) {
102
+ return 7 /* Credential */;
103
+ }
104
+ if (containsBytes(
105
+ data,
106
+ fixEncoderSize(getBytesEncoder(), 8).encode(
107
+ new Uint8Array([229, 129, 99, 91, 179, 207, 66, 75])
108
+ ),
109
+ 0
110
+ )) {
111
+ return 8 /* CredentialTemplate */;
112
+ }
113
+ if (containsBytes(
114
+ data,
115
+ fixEncoderSize(getBytesEncoder(), 8).encode(
116
+ new Uint8Array([132, 171, 20, 181, 39, 219, 217, 112])
117
+ ),
118
+ 0
119
+ )) {
120
+ return 9 /* CredentialType */;
121
+ }
122
+ if (containsBytes(
123
+ data,
124
+ fixEncoderSize(getBytesEncoder(), 8).encode(
125
+ new Uint8Array([109, 220, 168, 224, 33, 173, 192, 166])
126
+ ),
127
+ 0
128
+ )) {
129
+ return 10 /* DidDocument */;
130
+ }
131
+ if (containsBytes(
132
+ data,
133
+ fixEncoderSize(getBytesEncoder(), 8).encode(
134
+ new Uint8Array([180, 218, 64, 128, 181, 84, 116, 180])
135
+ ),
136
+ 0
137
+ )) {
138
+ return 11 /* ExternalIdMapping */;
139
+ }
140
+ if (containsBytes(
141
+ data,
142
+ fixEncoderSize(getBytesEncoder(), 8).encode(
143
+ new Uint8Array([38, 0, 98, 160, 102, 4, 51, 160])
144
+ ),
145
+ 0
146
+ )) {
147
+ return 12 /* GhostProtectEscrow */;
148
+ }
149
+ if (containsBytes(
150
+ data,
151
+ fixEncoderSize(getBytesEncoder(), 8).encode(
152
+ new Uint8Array([53, 107, 240, 190, 43, 73, 65, 143])
153
+ ),
154
+ 0
155
+ )) {
156
+ return 13 /* GovernanceProposal */;
157
+ }
158
+ if (containsBytes(
159
+ data,
160
+ fixEncoderSize(getBytesEncoder(), 8).encode(
161
+ new Uint8Array([224, 116, 121, 186, 68, 161, 79, 236])
162
+ ),
163
+ 0
164
+ )) {
165
+ return 14 /* Multisig */;
166
+ }
167
+ if (containsBytes(
168
+ data,
169
+ fixEncoderSize(getBytesEncoder(), 8).encode(
170
+ new Uint8Array([207, 91, 250, 28, 152, 179, 215, 209])
171
+ ),
172
+ 0
173
+ )) {
174
+ return 15 /* ProtocolConfig */;
175
+ }
176
+ if (containsBytes(
177
+ data,
178
+ fixEncoderSize(getBytesEncoder(), 8).encode(
179
+ new Uint8Array([177, 94, 184, 202, 221, 112, 110, 38])
180
+ ),
181
+ 0
182
+ )) {
183
+ return 16 /* RbacConfig */;
184
+ }
185
+ if (containsBytes(
186
+ data,
187
+ fixEncoderSize(getBytesEncoder(), 8).encode(
188
+ new Uint8Array([207, 227, 141, 11, 194, 21, 193, 32])
189
+ ),
190
+ 0
191
+ )) {
192
+ return 17 /* ReentrancyGuard */;
193
+ }
194
+ if (containsBytes(
195
+ data,
196
+ fixEncoderSize(getBytesEncoder(), 8).encode(
197
+ new Uint8Array([8, 160, 71, 30, 66, 150, 108, 33])
198
+ ),
199
+ 0
200
+ )) {
201
+ return 18 /* ReputationMetrics */;
202
+ }
203
+ if (containsBytes(
204
+ data,
205
+ fixEncoderSize(getBytesEncoder(), 8).encode(
206
+ new Uint8Array([52, 178, 251, 157, 180, 186, 98, 234])
207
+ ),
208
+ 0
209
+ )) {
210
+ return 19 /* StakingAccount */;
211
+ }
212
+ if (containsBytes(
213
+ data,
214
+ fixEncoderSize(getBytesEncoder(), 8).encode(
215
+ new Uint8Array([45, 134, 252, 82, 37, 57, 84, 25])
216
+ ),
217
+ 0
218
+ )) {
219
+ return 20 /* StakingConfig */;
220
+ }
221
+ if (containsBytes(
222
+ data,
223
+ fixEncoderSize(getBytesEncoder(), 8).encode(
224
+ new Uint8Array([37, 84, 98, 14, 130, 63, 210, 138])
225
+ ),
226
+ 0
227
+ )) {
228
+ return 21 /* UserRegistry */;
229
+ }
230
+ throw new Error(
231
+ "The provided account could not be identified as a ghostspeakMarketplace account."
232
+ );
233
+ }
234
+ var GhostspeakMarketplaceInstruction = /* @__PURE__ */ ((GhostspeakMarketplaceInstruction2) => {
235
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ActivateAgent"] = 0] = "ActivateAgent";
236
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ApproveDelivery"] = 1] = "ApproveDelivery";
237
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ArbitrateDispute"] = 2] = "ArbitrateDispute";
238
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["AutoCreateGhost"] = 3] = "AutoCreateGhost";
239
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ClaimGhost"] = 4] = "ClaimGhost";
240
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateAgentAuthorization"] = 5] = "CreateAgentAuthorization";
241
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateCredentialTemplate"] = 6] = "CreateCredentialTemplate";
242
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateCredentialType"] = 7] = "CreateCredentialType";
243
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateDidDocument"] = 8] = "CreateDidDocument";
244
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateEscrow"] = 9] = "CreateEscrow";
245
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["CreateMultisig"] = 10] = "CreateMultisig";
246
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["DeactivateAgent"] = 11] = "DeactivateAgent";
247
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["DeactivateCredentialTemplate"] = 12] = "DeactivateCredentialTemplate";
248
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["DeactivateCredentialType"] = 13] = "DeactivateCredentialType";
249
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["DeactivateDidDocument"] = 14] = "DeactivateDidDocument";
250
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["EnableProtocolFees"] = 15] = "EnableProtocolFees";
251
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["FileDispute"] = 16] = "FileDispute";
252
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["GenerateComplianceReport"] = 17] = "GenerateComplianceReport";
253
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitReentrancyGuard"] = 18] = "InitReentrancyGuard";
254
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeAuditTrail"] = 19] = "InitializeAuditTrail";
255
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeGovernanceProposal"] = 20] = "InitializeGovernanceProposal";
256
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeProtocolConfig"] = 21] = "InitializeProtocolConfig";
257
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeRbacConfig"] = 22] = "InitializeRbacConfig";
258
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeReputationMetrics"] = 23] = "InitializeReputationMetrics";
259
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["InitializeStakingConfig"] = 24] = "InitializeStakingConfig";
260
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["IssueCredential"] = 25] = "IssueCredential";
261
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["LinkExternalId"] = 26] = "LinkExternalId";
262
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ManageAgentStatus"] = 27] = "ManageAgentStatus";
263
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RecordPayaiPayment"] = 28] = "RecordPayaiPayment";
264
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RegisterAgent"] = 29] = "RegisterAgent";
265
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RegisterAgentCompressed"] = 30] = "RegisterAgentCompressed";
266
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RegisterGhostMetadata"] = 31] = "RegisterGhostMetadata";
267
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ResetReentrancyGuard"] = 32] = "ResetReentrancyGuard";
268
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["ResolveDidDocument"] = 33] = "ResolveDidDocument";
269
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RevokeAuthorization"] = 34] = "RevokeAuthorization";
270
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["RevokeCredential"] = 35] = "RevokeCredential";
271
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["SlashStake"] = 36] = "SlashStake";
272
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["StakeGhost"] = 37] = "StakeGhost";
273
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["SubmitDelivery"] = 38] = "SubmitDelivery";
274
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["SubmitServiceRating"] = 39] = "SubmitServiceRating";
275
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UnstakeGhost"] = 40] = "UnstakeGhost";
276
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateAgent"] = 41] = "UpdateAgent";
277
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateAgentReputation"] = 42] = "UpdateAgentReputation";
278
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateAgentService"] = 43] = "UpdateAgentService";
279
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateCrosschainStatus"] = 44] = "UpdateCrosschainStatus";
280
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateDidDocument"] = 45] = "UpdateDidDocument";
281
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateGhostScore"] = 46] = "UpdateGhostScore";
282
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateProtocolConfig"] = 47] = "UpdateProtocolConfig";
283
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateReputationTags"] = 48] = "UpdateReputationTags";
284
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateReputationWithAuth"] = 49] = "UpdateReputationWithAuth";
285
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["UpdateSourceReputation"] = 50] = "UpdateSourceReputation";
286
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["VerifyAgent"] = 51] = "VerifyAgent";
287
+ GhostspeakMarketplaceInstruction2[GhostspeakMarketplaceInstruction2["VerifyAuthorization"] = 52] = "VerifyAuthorization";
288
+ return GhostspeakMarketplaceInstruction2;
289
+ })(GhostspeakMarketplaceInstruction || {});
290
+ function identifyGhostspeakMarketplaceInstruction(instruction) {
291
+ const data = "data" in instruction ? instruction.data : instruction;
292
+ if (containsBytes(
293
+ data,
294
+ fixEncoderSize(getBytesEncoder(), 8).encode(
295
+ new Uint8Array([252, 139, 87, 21, 195, 152, 29, 217])
296
+ ),
297
+ 0
298
+ )) {
299
+ return 0 /* ActivateAgent */;
300
+ }
301
+ if (containsBytes(
302
+ data,
303
+ fixEncoderSize(getBytesEncoder(), 8).encode(
304
+ new Uint8Array([28, 233, 51, 115, 33, 220, 41, 28])
305
+ ),
306
+ 0
307
+ )) {
308
+ return 1 /* ApproveDelivery */;
309
+ }
310
+ if (containsBytes(
311
+ data,
312
+ fixEncoderSize(getBytesEncoder(), 8).encode(
313
+ new Uint8Array([225, 89, 166, 101, 215, 40, 191, 4])
314
+ ),
315
+ 0
316
+ )) {
317
+ return 2 /* ArbitrateDispute */;
318
+ }
319
+ if (containsBytes(
320
+ data,
321
+ fixEncoderSize(getBytesEncoder(), 8).encode(
322
+ new Uint8Array([50, 170, 232, 73, 238, 200, 180, 16])
323
+ ),
324
+ 0
325
+ )) {
326
+ return 3 /* AutoCreateGhost */;
327
+ }
328
+ if (containsBytes(
329
+ data,
330
+ fixEncoderSize(getBytesEncoder(), 8).encode(
331
+ new Uint8Array([149, 107, 35, 233, 252, 101, 148, 225])
332
+ ),
333
+ 0
334
+ )) {
335
+ return 4 /* ClaimGhost */;
336
+ }
337
+ if (containsBytes(
338
+ data,
339
+ fixEncoderSize(getBytesEncoder(), 8).encode(
340
+ new Uint8Array([48, 219, 232, 202, 151, 97, 230, 20])
341
+ ),
342
+ 0
343
+ )) {
344
+ return 5 /* CreateAgentAuthorization */;
345
+ }
346
+ if (containsBytes(
347
+ data,
348
+ fixEncoderSize(getBytesEncoder(), 8).encode(
349
+ new Uint8Array([183, 109, 12, 128, 134, 8, 139, 144])
350
+ ),
351
+ 0
352
+ )) {
353
+ return 6 /* CreateCredentialTemplate */;
354
+ }
355
+ if (containsBytes(
356
+ data,
357
+ fixEncoderSize(getBytesEncoder(), 8).encode(
358
+ new Uint8Array([211, 208, 67, 175, 20, 248, 8, 227])
359
+ ),
360
+ 0
361
+ )) {
362
+ return 7 /* CreateCredentialType */;
363
+ }
364
+ if (containsBytes(
365
+ data,
366
+ fixEncoderSize(getBytesEncoder(), 8).encode(
367
+ new Uint8Array([253, 40, 200, 239, 69, 147, 82, 182])
368
+ ),
369
+ 0
370
+ )) {
371
+ return 8 /* CreateDidDocument */;
372
+ }
373
+ if (containsBytes(
374
+ data,
375
+ fixEncoderSize(getBytesEncoder(), 8).encode(
376
+ new Uint8Array([253, 215, 165, 116, 36, 108, 68, 80])
377
+ ),
378
+ 0
379
+ )) {
380
+ return 9 /* CreateEscrow */;
381
+ }
382
+ if (containsBytes(
383
+ data,
384
+ fixEncoderSize(getBytesEncoder(), 8).encode(
385
+ new Uint8Array([148, 146, 240, 10, 226, 215, 167, 174])
386
+ ),
387
+ 0
388
+ )) {
389
+ return 10 /* CreateMultisig */;
390
+ }
391
+ if (containsBytes(
392
+ data,
393
+ fixEncoderSize(getBytesEncoder(), 8).encode(
394
+ new Uint8Array([205, 171, 239, 225, 82, 126, 96, 166])
395
+ ),
396
+ 0
397
+ )) {
398
+ return 11 /* DeactivateAgent */;
399
+ }
400
+ if (containsBytes(
401
+ data,
402
+ fixEncoderSize(getBytesEncoder(), 8).encode(
403
+ new Uint8Array([177, 8, 195, 104, 56, 34, 84, 162])
404
+ ),
405
+ 0
406
+ )) {
407
+ return 12 /* DeactivateCredentialTemplate */;
408
+ }
409
+ if (containsBytes(
410
+ data,
411
+ fixEncoderSize(getBytesEncoder(), 8).encode(
412
+ new Uint8Array([110, 174, 221, 244, 36, 206, 60, 237])
413
+ ),
414
+ 0
415
+ )) {
416
+ return 13 /* DeactivateCredentialType */;
417
+ }
418
+ if (containsBytes(
419
+ data,
420
+ fixEncoderSize(getBytesEncoder(), 8).encode(
421
+ new Uint8Array([77, 13, 56, 161, 67, 155, 206, 119])
422
+ ),
423
+ 0
424
+ )) {
425
+ return 14 /* DeactivateDidDocument */;
426
+ }
427
+ if (containsBytes(
428
+ data,
429
+ fixEncoderSize(getBytesEncoder(), 8).encode(
430
+ new Uint8Array([9, 115, 79, 19, 158, 209, 221, 38])
431
+ ),
432
+ 0
433
+ )) {
434
+ return 15 /* EnableProtocolFees */;
435
+ }
436
+ if (containsBytes(
437
+ data,
438
+ fixEncoderSize(getBytesEncoder(), 8).encode(
439
+ new Uint8Array([210, 63, 221, 114, 212, 97, 195, 156])
440
+ ),
441
+ 0
442
+ )) {
443
+ return 16 /* FileDispute */;
444
+ }
445
+ if (containsBytes(
446
+ data,
447
+ fixEncoderSize(getBytesEncoder(), 8).encode(
448
+ new Uint8Array([213, 97, 79, 234, 22, 228, 14, 32])
449
+ ),
450
+ 0
451
+ )) {
452
+ return 17 /* GenerateComplianceReport */;
453
+ }
454
+ if (containsBytes(
455
+ data,
456
+ fixEncoderSize(getBytesEncoder(), 8).encode(
457
+ new Uint8Array([156, 109, 115, 85, 12, 60, 245, 99])
458
+ ),
459
+ 0
460
+ )) {
461
+ return 18 /* InitReentrancyGuard */;
462
+ }
463
+ if (containsBytes(
464
+ data,
465
+ fixEncoderSize(getBytesEncoder(), 8).encode(
466
+ new Uint8Array([145, 182, 236, 249, 212, 17, 175, 161])
467
+ ),
468
+ 0
469
+ )) {
470
+ return 19 /* InitializeAuditTrail */;
471
+ }
472
+ if (containsBytes(
473
+ data,
474
+ fixEncoderSize(getBytesEncoder(), 8).encode(
475
+ new Uint8Array([137, 84, 234, 206, 17, 58, 54, 215])
476
+ ),
477
+ 0
478
+ )) {
479
+ return 20 /* InitializeGovernanceProposal */;
480
+ }
481
+ if (containsBytes(
482
+ data,
483
+ fixEncoderSize(getBytesEncoder(), 8).encode(
484
+ new Uint8Array([28, 50, 43, 233, 244, 98, 123, 118])
485
+ ),
486
+ 0
487
+ )) {
488
+ return 21 /* InitializeProtocolConfig */;
489
+ }
490
+ if (containsBytes(
491
+ data,
492
+ fixEncoderSize(getBytesEncoder(), 8).encode(
493
+ new Uint8Array([215, 68, 129, 228, 237, 165, 0, 240])
494
+ ),
495
+ 0
496
+ )) {
497
+ return 22 /* InitializeRbacConfig */;
498
+ }
499
+ if (containsBytes(
500
+ data,
501
+ fixEncoderSize(getBytesEncoder(), 8).encode(
502
+ new Uint8Array([228, 11, 207, 44, 52, 188, 169, 237])
503
+ ),
504
+ 0
505
+ )) {
506
+ return 23 /* InitializeReputationMetrics */;
507
+ }
508
+ if (containsBytes(
509
+ data,
510
+ fixEncoderSize(getBytesEncoder(), 8).encode(
511
+ new Uint8Array([78, 164, 6, 115, 206, 48, 168, 105])
512
+ ),
513
+ 0
514
+ )) {
515
+ return 24 /* InitializeStakingConfig */;
516
+ }
517
+ if (containsBytes(
518
+ data,
519
+ fixEncoderSize(getBytesEncoder(), 8).encode(
520
+ new Uint8Array([255, 193, 171, 224, 68, 171, 194, 87])
521
+ ),
522
+ 0
523
+ )) {
524
+ return 25 /* IssueCredential */;
525
+ }
526
+ if (containsBytes(
527
+ data,
528
+ fixEncoderSize(getBytesEncoder(), 8).encode(
529
+ new Uint8Array([156, 102, 141, 155, 175, 13, 29, 86])
530
+ ),
531
+ 0
532
+ )) {
533
+ return 26 /* LinkExternalId */;
534
+ }
535
+ if (containsBytes(
536
+ data,
537
+ fixEncoderSize(getBytesEncoder(), 8).encode(
538
+ new Uint8Array([164, 219, 91, 38, 45, 31, 33, 47])
539
+ ),
540
+ 0
541
+ )) {
542
+ return 27 /* ManageAgentStatus */;
543
+ }
544
+ if (containsBytes(
545
+ data,
546
+ fixEncoderSize(getBytesEncoder(), 8).encode(
547
+ new Uint8Array([165, 202, 159, 139, 65, 65, 36, 163])
548
+ ),
549
+ 0
550
+ )) {
551
+ return 28 /* RecordPayaiPayment */;
552
+ }
553
+ if (containsBytes(
554
+ data,
555
+ fixEncoderSize(getBytesEncoder(), 8).encode(
556
+ new Uint8Array([135, 157, 66, 195, 2, 113, 175, 30])
557
+ ),
558
+ 0
559
+ )) {
560
+ return 29 /* RegisterAgent */;
561
+ }
562
+ if (containsBytes(
563
+ data,
564
+ fixEncoderSize(getBytesEncoder(), 8).encode(
565
+ new Uint8Array([15, 6, 94, 55, 65, 80, 123, 248])
566
+ ),
567
+ 0
568
+ )) {
569
+ return 30 /* RegisterAgentCompressed */;
570
+ }
571
+ if (containsBytes(
572
+ data,
573
+ fixEncoderSize(getBytesEncoder(), 8).encode(
574
+ new Uint8Array([34, 233, 111, 236, 212, 22, 26, 254])
575
+ ),
576
+ 0
577
+ )) {
578
+ return 31 /* RegisterGhostMetadata */;
579
+ }
580
+ if (containsBytes(
581
+ data,
582
+ fixEncoderSize(getBytesEncoder(), 8).encode(
583
+ new Uint8Array([93, 74, 168, 125, 46, 153, 9, 255])
584
+ ),
585
+ 0
586
+ )) {
587
+ return 32 /* ResetReentrancyGuard */;
588
+ }
589
+ if (containsBytes(
590
+ data,
591
+ fixEncoderSize(getBytesEncoder(), 8).encode(
592
+ new Uint8Array([168, 180, 218, 211, 184, 19, 102, 12])
593
+ ),
594
+ 0
595
+ )) {
596
+ return 33 /* ResolveDidDocument */;
597
+ }
598
+ if (containsBytes(
599
+ data,
600
+ fixEncoderSize(getBytesEncoder(), 8).encode(
601
+ new Uint8Array([222, 179, 207, 59, 191, 78, 24, 248])
602
+ ),
603
+ 0
604
+ )) {
605
+ return 34 /* RevokeAuthorization */;
606
+ }
607
+ if (containsBytes(
608
+ data,
609
+ fixEncoderSize(getBytesEncoder(), 8).encode(
610
+ new Uint8Array([38, 123, 95, 95, 223, 158, 169, 87])
611
+ ),
612
+ 0
613
+ )) {
614
+ return 35 /* RevokeCredential */;
615
+ }
616
+ if (containsBytes(
617
+ data,
618
+ fixEncoderSize(getBytesEncoder(), 8).encode(
619
+ new Uint8Array([190, 242, 137, 27, 41, 18, 233, 37])
620
+ ),
621
+ 0
622
+ )) {
623
+ return 36 /* SlashStake */;
624
+ }
625
+ if (containsBytes(
626
+ data,
627
+ fixEncoderSize(getBytesEncoder(), 8).encode(
628
+ new Uint8Array([5, 196, 24, 54, 196, 56, 173, 191])
629
+ ),
630
+ 0
631
+ )) {
632
+ return 37 /* StakeGhost */;
633
+ }
634
+ if (containsBytes(
635
+ data,
636
+ fixEncoderSize(getBytesEncoder(), 8).encode(
637
+ new Uint8Array([217, 177, 33, 54, 136, 185, 123, 96])
638
+ ),
639
+ 0
640
+ )) {
641
+ return 38 /* SubmitDelivery */;
642
+ }
643
+ if (containsBytes(
644
+ data,
645
+ fixEncoderSize(getBytesEncoder(), 8).encode(
646
+ new Uint8Array([23, 160, 228, 88, 168, 145, 129, 19])
647
+ ),
648
+ 0
649
+ )) {
650
+ return 39 /* SubmitServiceRating */;
651
+ }
652
+ if (containsBytes(
653
+ data,
654
+ fixEncoderSize(getBytesEncoder(), 8).encode(
655
+ new Uint8Array([252, 101, 172, 252, 1, 4, 12, 116])
656
+ ),
657
+ 0
658
+ )) {
659
+ return 40 /* UnstakeGhost */;
660
+ }
661
+ if (containsBytes(
662
+ data,
663
+ fixEncoderSize(getBytesEncoder(), 8).encode(
664
+ new Uint8Array([85, 2, 178, 9, 119, 139, 102, 164])
665
+ ),
666
+ 0
667
+ )) {
668
+ return 41 /* UpdateAgent */;
669
+ }
670
+ if (containsBytes(
671
+ data,
672
+ fixEncoderSize(getBytesEncoder(), 8).encode(
673
+ new Uint8Array([80, 227, 92, 245, 231, 37, 99, 180])
674
+ ),
675
+ 0
676
+ )) {
677
+ return 42 /* UpdateAgentReputation */;
678
+ }
679
+ if (containsBytes(
680
+ data,
681
+ fixEncoderSize(getBytesEncoder(), 8).encode(
682
+ new Uint8Array([87, 146, 181, 198, 252, 68, 243, 102])
683
+ ),
684
+ 0
685
+ )) {
686
+ return 43 /* UpdateAgentService */;
687
+ }
688
+ if (containsBytes(
689
+ data,
690
+ fixEncoderSize(getBytesEncoder(), 8).encode(
691
+ new Uint8Array([22, 167, 59, 238, 22, 231, 239, 146])
692
+ ),
693
+ 0
694
+ )) {
695
+ return 44 /* UpdateCrosschainStatus */;
696
+ }
697
+ if (containsBytes(
698
+ data,
699
+ fixEncoderSize(getBytesEncoder(), 8).encode(
700
+ new Uint8Array([64, 216, 17, 91, 205, 94, 45, 57])
701
+ ),
702
+ 0
703
+ )) {
704
+ return 45 /* UpdateDidDocument */;
705
+ }
706
+ if (containsBytes(
707
+ data,
708
+ fixEncoderSize(getBytesEncoder(), 8).encode(
709
+ new Uint8Array([213, 152, 5, 80, 163, 224, 151, 120])
710
+ ),
711
+ 0
712
+ )) {
713
+ return 46 /* UpdateGhostScore */;
714
+ }
715
+ if (containsBytes(
716
+ data,
717
+ fixEncoderSize(getBytesEncoder(), 8).encode(
718
+ new Uint8Array([197, 97, 123, 54, 221, 168, 11, 135])
719
+ ),
720
+ 0
721
+ )) {
722
+ return 47 /* UpdateProtocolConfig */;
723
+ }
724
+ if (containsBytes(
725
+ data,
726
+ fixEncoderSize(getBytesEncoder(), 8).encode(
727
+ new Uint8Array([206, 96, 254, 186, 129, 180, 103, 198])
728
+ ),
729
+ 0
730
+ )) {
731
+ return 48 /* UpdateReputationTags */;
732
+ }
733
+ if (containsBytes(
734
+ data,
735
+ fixEncoderSize(getBytesEncoder(), 8).encode(
736
+ new Uint8Array([61, 236, 225, 167, 134, 43, 53, 93])
737
+ ),
738
+ 0
739
+ )) {
740
+ return 49 /* UpdateReputationWithAuth */;
741
+ }
742
+ if (containsBytes(
743
+ data,
744
+ fixEncoderSize(getBytesEncoder(), 8).encode(
745
+ new Uint8Array([161, 240, 255, 69, 130, 227, 71, 123])
746
+ ),
747
+ 0
748
+ )) {
749
+ return 50 /* UpdateSourceReputation */;
750
+ }
751
+ if (containsBytes(
752
+ data,
753
+ fixEncoderSize(getBytesEncoder(), 8).encode(
754
+ new Uint8Array([206, 212, 108, 12, 105, 61, 100, 66])
755
+ ),
756
+ 0
757
+ )) {
758
+ return 51 /* VerifyAgent */;
759
+ }
760
+ if (containsBytes(
761
+ data,
762
+ fixEncoderSize(getBytesEncoder(), 8).encode(
763
+ new Uint8Array([43, 9, 131, 59, 74, 118, 113, 170])
764
+ ),
765
+ 0
766
+ )) {
767
+ return 52 /* VerifyAuthorization */;
768
+ }
769
+ throw new Error(
770
+ "The provided instruction could not be identified as a ghostspeakMarketplace instruction."
771
+ );
772
+ }
773
+ function expectSome(value) {
774
+ if (value === null || value === void 0) {
775
+ throw new Error("Expected a value but received null or undefined.");
776
+ }
777
+ return value;
778
+ }
779
+ function expectAddress(value) {
780
+ if (!value) {
781
+ throw new Error("Expected a Address.");
782
+ }
783
+ if (typeof value === "object" && "address" in value) {
784
+ return value.address;
785
+ }
786
+ if (Array.isArray(value)) {
787
+ return value[0];
788
+ }
789
+ return value;
790
+ }
791
+ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
792
+ return (account) => {
793
+ if (!account.value) {
794
+ if (optionalAccountStrategy === "omitted") return;
795
+ return Object.freeze({
796
+ address: programAddress,
797
+ role: AccountRole.READONLY
798
+ });
799
+ }
800
+ const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
801
+ return Object.freeze({
802
+ address: expectAddress(account.value),
803
+ role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
804
+ ...isTransactionSigner(account.value) ? { signer: account.value } : {}
805
+ });
806
+ };
807
+ }
808
+ function isTransactionSigner(value) {
809
+ return !!value && typeof value === "object" && "address" in value && isTransactionSigner$1(value);
810
+ }
811
+
812
+ export { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, GhostspeakMarketplaceAccount, GhostspeakMarketplaceInstruction, expectAddress, expectSome, getAccountMetaFactory, identifyGhostspeakMarketplaceAccount, identifyGhostspeakMarketplaceInstruction };
813
+ //# sourceMappingURL=chunk-AWMGX3OX.js.map
814
+ //# sourceMappingURL=chunk-AWMGX3OX.js.map