@ghostspeak/sdk 2.0.6 → 2.0.7

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