@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
@@ -1,857 +0,0 @@
1
- import * as _solana_addresses from '@solana/addresses';
2
- import { Address as Address$1 } from '@solana/addresses';
3
- import { ReadonlyUint8Array, Address, Decoder, Option, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, WritableSignerAccount, AccountSignerMeta, ReadonlyAccount, TransactionSigner, OptionOrNullable } from '@solana/kit';
4
- import { g as GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, B as BaseModule, G as GhostSpeakConfig, d as Agent } from './GovernanceModule-DQYYys-H.js';
5
- import { I as IPFSConfig } from './ipfs-types-BOt9ZNg4.js';
6
-
7
- /**
8
- * This code was AUTOGENERATED using the Codama library.
9
- * Please DO NOT EDIT THIS FILE, instead use visitors
10
- * to add features, then rerun Codama to update it.
11
- *
12
- * @see https://github.com/codama-idl/codama
13
- */
14
-
15
- declare enum ChannelType {
16
- Direct = 0,
17
- Group = 1,
18
- Public = 2,
19
- Private = 3
20
- }
21
- type ChannelTypeArgs = ChannelType;
22
-
23
- /**
24
- * This code was AUTOGENERATED using the Codama library.
25
- * Please DO NOT EDIT THIS FILE, instead use visitors
26
- * to add features, then rerun Codama to update it.
27
- *
28
- * @see https://github.com/codama-idl/codama
29
- */
30
-
31
- declare enum Deliverable {
32
- Code = 0,
33
- Document = 1,
34
- Design = 2,
35
- Analysis = 3,
36
- Other = 4
37
- }
38
- type DeliverableArgs = Deliverable;
39
-
40
- /**
41
- * This code was AUTOGENERATED using the Codama library.
42
- * Please DO NOT EDIT THIS FILE, instead use visitors
43
- * to add features, then rerun Codama to update it.
44
- *
45
- * @see https://github.com/codama-idl/codama
46
- */
47
-
48
- declare enum DisputeStatus {
49
- Filed = 0,
50
- UnderReview = 1,
51
- EvidenceSubmitted = 2,
52
- Resolved = 3,
53
- Escalated = 4,
54
- Closed = 5
55
- }
56
-
57
- /**
58
- * This code was AUTOGENERATED using the Codama library.
59
- * Please DO NOT EDIT THIS FILE, instead use visitors
60
- * to add features, then rerun Codama to update it.
61
- *
62
- * @see https://github.com/codama-idl/codama
63
- */
64
-
65
- declare enum EscrowStatus {
66
- Active = 0,
67
- Completed = 1,
68
- Disputed = 2,
69
- Resolved = 3,
70
- Cancelled = 4
71
- }
72
-
73
- /**
74
- * This code was AUTOGENERATED using the Codama library.
75
- * Please DO NOT EDIT THIS FILE, instead use visitors
76
- * to add features, then rerun Codama to update it.
77
- *
78
- * @see https://github.com/codama-idl/codama
79
- */
80
-
81
- declare enum MessageType {
82
- Text = 0,
83
- File = 1,
84
- Image = 2,
85
- Audio = 3,
86
- System = 4
87
- }
88
- type MessageTypeArgs = MessageType;
89
-
90
- /**
91
- * This code was AUTOGENERATED using the Codama library.
92
- * Please DO NOT EDIT THIS FILE, instead use visitors
93
- * to add features, then rerun Codama to update it.
94
- *
95
- * @see https://github.com/codama-idl/codama
96
- */
97
-
98
- declare enum WorkOrderStatus {
99
- Created = 0,
100
- Open = 1,
101
- Submitted = 2,
102
- InProgress = 3,
103
- Approved = 4,
104
- Completed = 5,
105
- Cancelled = 6
106
- }
107
-
108
- /**
109
- * This code was AUTOGENERATED using the Codama library.
110
- * Please DO NOT EDIT THIS FILE, instead use visitors
111
- * to add features, then rerun Codama to update it.
112
- *
113
- * @see https://github.com/codama-idl/codama
114
- */
115
-
116
- type Channel = {
117
- discriminator: ReadonlyUint8Array;
118
- creator: Address;
119
- participants: Array<Address>;
120
- channelType: ChannelType;
121
- isPrivate: boolean;
122
- messageCount: bigint;
123
- createdAt: bigint;
124
- lastActivity: bigint;
125
- isActive: boolean;
126
- bump: number;
127
- };
128
- /** Gets the decoder for {@link Channel} account data. */
129
- declare function getChannelDecoder(): Decoder<Channel>;
130
-
131
- /**
132
- * This code was AUTOGENERATED using the Codama library.
133
- * Please DO NOT EDIT THIS FILE, instead use visitors
134
- * to add features, then rerun Codama to update it.
135
- *
136
- * @see https://github.com/codama-idl/codama
137
- */
138
-
139
- type Escrow = {
140
- discriminator: ReadonlyUint8Array;
141
- client: Address;
142
- agent: Address;
143
- taskId: string;
144
- amount: bigint;
145
- status: EscrowStatus;
146
- createdAt: bigint;
147
- expiresAt: bigint;
148
- disputeReason: Option<string>;
149
- resolutionNotes: Option<string>;
150
- paymentToken: Address;
151
- transferHook: Option<Address>;
152
- isConfidential: boolean;
153
- bump: number;
154
- };
155
- /** Gets the decoder for {@link Escrow} account data. */
156
- declare function getEscrowDecoder(): Decoder<Escrow>;
157
-
158
- /**
159
- * This code was AUTOGENERATED using the Codama library.
160
- * Please DO NOT EDIT THIS FILE, instead use visitors
161
- * to add features, then rerun Codama to update it.
162
- *
163
- * @see https://github.com/codama-idl/codama
164
- */
165
-
166
- type Message = {
167
- discriminator: ReadonlyUint8Array;
168
- channel: Address;
169
- sender: Address;
170
- content: string;
171
- messageType: MessageType;
172
- timestamp: bigint;
173
- isEncrypted: boolean;
174
- bump: number;
175
- };
176
- /** Gets the decoder for {@link Message} account data. */
177
- declare function getMessageDecoder(): Decoder<Message>;
178
-
179
- /**
180
- * This code was AUTOGENERATED using the Codama library.
181
- * Please DO NOT EDIT THIS FILE, instead use visitors
182
- * to add features, then rerun Codama to update it.
183
- *
184
- * @see https://github.com/codama-idl/codama
185
- */
186
-
187
- type WorkDelivery = {
188
- discriminator: ReadonlyUint8Array;
189
- workOrder: Address;
190
- provider: Address;
191
- deliverables: Array<Deliverable>;
192
- ipfsHash: string;
193
- metadataUri: string;
194
- submittedAt: bigint;
195
- bump: number;
196
- };
197
- /** Gets the decoder for {@link WorkDelivery} account data. */
198
- declare function getWorkDeliveryDecoder(): Decoder<WorkDelivery>;
199
-
200
- /**
201
- * This code was AUTOGENERATED using the Codama library.
202
- * Please DO NOT EDIT THIS FILE, instead use visitors
203
- * to add features, then rerun Codama to update it.
204
- *
205
- * @see https://github.com/codama-idl/codama
206
- */
207
-
208
- type WorkOrder = {
209
- discriminator: ReadonlyUint8Array;
210
- client: Address;
211
- provider: Address;
212
- title: string;
213
- description: string;
214
- requirements: Array<string>;
215
- paymentAmount: bigint;
216
- paymentToken: Address;
217
- status: WorkOrderStatus;
218
- createdAt: bigint;
219
- updatedAt: bigint;
220
- deadline: bigint;
221
- deliveredAt: Option<bigint>;
222
- bump: number;
223
- };
224
- /** Gets the decoder for {@link WorkOrder} account data. */
225
- declare function getWorkOrderDecoder(): Decoder<WorkOrder>;
226
-
227
- /**
228
- * This code was AUTOGENERATED using the Codama library.
229
- * Please DO NOT EDIT THIS FILE, instead use visitors
230
- * to add features, then rerun Codama to update it.
231
- *
232
- * @see https://github.com/codama-idl/codama
233
- */
234
-
235
- type CreateWorkOrderInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountWorkOrder extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
236
- TAccountWorkOrder extends string ? WritableAccount<TAccountWorkOrder> : TAccountWorkOrder,
237
- TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient,
238
- TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
239
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
240
- ...TRemainingAccounts
241
- ]>;
242
- type CreateWorkOrderInstructionDataArgs = {
243
- orderId: number | bigint;
244
- provider: Address;
245
- title: string;
246
- description: string;
247
- requirements: Array<string>;
248
- paymentAmount: number | bigint;
249
- paymentToken: Address;
250
- deadline: number | bigint;
251
- };
252
- type CreateWorkOrderInput<TAccountWorkOrder extends string = string, TAccountClient extends string = string, TAccountClock extends string = string, TAccountSystemProgram extends string = string> = {
253
- workOrder: Address<TAccountWorkOrder>;
254
- client: TransactionSigner<TAccountClient>;
255
- clock?: Address<TAccountClock>;
256
- systemProgram?: Address<TAccountSystemProgram>;
257
- orderId: CreateWorkOrderInstructionDataArgs["orderId"];
258
- provider: CreateWorkOrderInstructionDataArgs["provider"];
259
- title: CreateWorkOrderInstructionDataArgs["title"];
260
- description: CreateWorkOrderInstructionDataArgs["description"];
261
- requirements: CreateWorkOrderInstructionDataArgs["requirements"];
262
- paymentAmount: CreateWorkOrderInstructionDataArgs["paymentAmount"];
263
- paymentToken: CreateWorkOrderInstructionDataArgs["paymentToken"];
264
- deadline: CreateWorkOrderInstructionDataArgs["deadline"];
265
- };
266
- declare function getCreateWorkOrderInstruction<TAccountWorkOrder extends string, TAccountClient extends string, TAccountClock extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: CreateWorkOrderInput<TAccountWorkOrder, TAccountClient, TAccountClock, TAccountSystemProgram>, config?: {
267
- programAddress?: TProgramAddress;
268
- }): CreateWorkOrderInstruction<TProgramAddress, TAccountWorkOrder, TAccountClient, TAccountClock, TAccountSystemProgram>;
269
-
270
- /**
271
- * This code was AUTOGENERATED using the Codama library.
272
- * Please DO NOT EDIT THIS FILE, instead use visitors
273
- * to add features, then rerun Codama to update it.
274
- *
275
- * @see https://github.com/codama-idl/codama
276
- */
277
-
278
- type RejectWorkDeliveryInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountWorkOrder extends string | AccountMeta<string> = string, TAccountWorkDelivery extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
279
- TAccountWorkOrder extends string ? WritableAccount<TAccountWorkOrder> : TAccountWorkOrder,
280
- TAccountWorkDelivery extends string ? ReadonlyAccount<TAccountWorkDelivery> : TAccountWorkDelivery,
281
- TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient,
282
- TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
283
- ...TRemainingAccounts
284
- ]>;
285
- type RejectWorkDeliveryInstructionDataArgs = {
286
- rejectionReason: string;
287
- requestedChanges: OptionOrNullable<Array<string>>;
288
- };
289
- type RejectWorkDeliveryInput<TAccountWorkOrder extends string = string, TAccountWorkDelivery extends string = string, TAccountClient extends string = string, TAccountClock extends string = string> = {
290
- workOrder: Address<TAccountWorkOrder>;
291
- workDelivery: Address<TAccountWorkDelivery>;
292
- client: TransactionSigner<TAccountClient>;
293
- clock?: Address<TAccountClock>;
294
- rejectionReason: RejectWorkDeliveryInstructionDataArgs["rejectionReason"];
295
- requestedChanges: RejectWorkDeliveryInstructionDataArgs["requestedChanges"];
296
- };
297
- declare function getRejectWorkDeliveryInstruction<TAccountWorkOrder extends string, TAccountWorkDelivery extends string, TAccountClient extends string, TAccountClock extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: RejectWorkDeliveryInput<TAccountWorkOrder, TAccountWorkDelivery, TAccountClient, TAccountClock>, config?: {
298
- programAddress?: TProgramAddress;
299
- }): RejectWorkDeliveryInstruction<TProgramAddress, TAccountWorkOrder, TAccountWorkDelivery, TAccountClient, TAccountClock>;
300
-
301
- /**
302
- * This code was AUTOGENERATED using the Codama library.
303
- * Please DO NOT EDIT THIS FILE, instead use visitors
304
- * to add features, then rerun Codama to update it.
305
- *
306
- * @see https://github.com/codama-idl/codama
307
- */
308
-
309
- type SubmitWorkDeliveryInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountWorkDelivery extends string | AccountMeta<string> = string, TAccountWorkOrder extends string | AccountMeta<string> = string, TAccountProvider extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
310
- TAccountWorkDelivery extends string ? WritableAccount<TAccountWorkDelivery> : TAccountWorkDelivery,
311
- TAccountWorkOrder extends string ? WritableAccount<TAccountWorkOrder> : TAccountWorkOrder,
312
- TAccountProvider extends string ? WritableSignerAccount<TAccountProvider> & AccountSignerMeta<TAccountProvider> : TAccountProvider,
313
- TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
314
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
315
- ...TRemainingAccounts
316
- ]>;
317
- type SubmitWorkDeliveryInstructionDataArgs = {
318
- deliverables: Array<DeliverableArgs>;
319
- ipfsHash: string;
320
- metadataUri: string;
321
- };
322
- type SubmitWorkDeliveryInput<TAccountWorkDelivery extends string = string, TAccountWorkOrder extends string = string, TAccountProvider extends string = string, TAccountClock extends string = string, TAccountSystemProgram extends string = string> = {
323
- workDelivery: Address<TAccountWorkDelivery>;
324
- workOrder: Address<TAccountWorkOrder>;
325
- provider: TransactionSigner<TAccountProvider>;
326
- clock?: Address<TAccountClock>;
327
- systemProgram?: Address<TAccountSystemProgram>;
328
- deliverables: SubmitWorkDeliveryInstructionDataArgs["deliverables"];
329
- ipfsHash: SubmitWorkDeliveryInstructionDataArgs["ipfsHash"];
330
- metadataUri: SubmitWorkDeliveryInstructionDataArgs["metadataUri"];
331
- };
332
- declare function getSubmitWorkDeliveryInstruction<TAccountWorkDelivery extends string, TAccountWorkOrder extends string, TAccountProvider extends string, TAccountClock extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: SubmitWorkDeliveryInput<TAccountWorkDelivery, TAccountWorkOrder, TAccountProvider, TAccountClock, TAccountSystemProgram>, config?: {
333
- programAddress?: TProgramAddress;
334
- }): SubmitWorkDeliveryInstruction<TProgramAddress, TAccountWorkDelivery, TAccountWorkOrder, TAccountProvider, TAccountClock, TAccountSystemProgram>;
335
-
336
- /**
337
- * This code was AUTOGENERATED using the Codama library.
338
- * Please DO NOT EDIT THIS FILE, instead use visitors
339
- * to add features, then rerun Codama to update it.
340
- *
341
- * @see https://github.com/codama-idl/codama
342
- */
343
-
344
- type VerifyWorkDeliveryInstruction<TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS, TAccountWorkOrder extends string | AccountMeta<string> = string, TAccountWorkDelivery extends string | AccountMeta<string> = string, TAccountClient extends string | AccountMeta<string> = string, TAccountClock extends string | AccountMeta<string> = "SysvarC1ock11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
345
- TAccountWorkOrder extends string ? WritableAccount<TAccountWorkOrder> : TAccountWorkOrder,
346
- TAccountWorkDelivery extends string ? ReadonlyAccount<TAccountWorkDelivery> : TAccountWorkDelivery,
347
- TAccountClient extends string ? WritableSignerAccount<TAccountClient> & AccountSignerMeta<TAccountClient> : TAccountClient,
348
- TAccountClock extends string ? ReadonlyAccount<TAccountClock> : TAccountClock,
349
- ...TRemainingAccounts
350
- ]>;
351
- type VerifyWorkDeliveryInstructionDataArgs = {
352
- verificationNotes: OptionOrNullable<string>;
353
- };
354
- type VerifyWorkDeliveryInput<TAccountWorkOrder extends string = string, TAccountWorkDelivery extends string = string, TAccountClient extends string = string, TAccountClock extends string = string> = {
355
- workOrder: Address<TAccountWorkOrder>;
356
- workDelivery: Address<TAccountWorkDelivery>;
357
- client: TransactionSigner<TAccountClient>;
358
- clock?: Address<TAccountClock>;
359
- verificationNotes: VerifyWorkDeliveryInstructionDataArgs["verificationNotes"];
360
- };
361
- declare function getVerifyWorkDeliveryInstruction<TAccountWorkOrder extends string, TAccountWorkDelivery extends string, TAccountClient extends string, TAccountClock extends string, TProgramAddress extends Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS>(input: VerifyWorkDeliveryInput<TAccountWorkOrder, TAccountWorkDelivery, TAccountClient, TAccountClock>, config?: {
362
- programAddress?: TProgramAddress;
363
- }): VerifyWorkDeliveryInstruction<TProgramAddress, TAccountWorkOrder, TAccountWorkDelivery, TAccountClient, TAccountClock>;
364
-
365
- /**
366
- * Simplified agent management using unified instruction pattern
367
- */
368
- declare class AgentModule extends BaseModule {
369
- private ipfsUtils;
370
- constructor(config: GhostSpeakConfig & {
371
- ipfsConfig?: IPFSConfig;
372
- });
373
- /**
374
- * Register a new agent
375
- */
376
- register(signer: TransactionSigner, params: {
377
- agentType: number;
378
- name: string;
379
- description: string;
380
- metadataUri: string;
381
- agentId: string;
382
- skipSimulation?: boolean;
383
- }): Promise<string>;
384
- /**
385
- * Register a compressed agent (5000x cheaper)
386
- */
387
- registerCompressed(signer: TransactionSigner, params: {
388
- agentType: number;
389
- name: string;
390
- description: string;
391
- metadataUri: string;
392
- agentId: string;
393
- merkleTree: Address$1;
394
- treeConfig?: Address$1;
395
- }): Promise<string>;
396
- /**
397
- * Update agent metadata
398
- */
399
- update(signer: TransactionSigner, params: {
400
- agentAddress: Address$1;
401
- metadataUri: string;
402
- agentType: number;
403
- agentId: string;
404
- name?: string | null;
405
- description?: string | null;
406
- }): Promise<string>;
407
- /**
408
- * Verify an agent
409
- */
410
- verify(signer: TransactionSigner, params: {
411
- agentAddress: Address$1;
412
- agentPubkey: Address$1;
413
- serviceEndpoint: string;
414
- supportedCapabilities: Array<number | bigint>;
415
- verifiedAt: number | bigint;
416
- }): Promise<string>;
417
- /**
418
- * Deactivate an agent
419
- */
420
- deactivate(signer: TransactionSigner, params: {
421
- agentAddress: Address$1;
422
- agentId: string;
423
- }): Promise<string>;
424
- /**
425
- * Activate an agent
426
- */
427
- activate(signer: TransactionSigner, params: {
428
- agentAddress: Address$1;
429
- agentId: string;
430
- }): Promise<string>;
431
- /**
432
- * Get agent account
433
- */
434
- getAgentAccount(address: Address$1): Promise<Agent | null>;
435
- /**
436
- * Get all agents
437
- */
438
- getAllAgents(): Promise<{
439
- address: Address$1;
440
- data: Agent;
441
- }[]>;
442
- /**
443
- * Get agents by type
444
- */
445
- getAgentsByType(agentType: number): Promise<{
446
- address: Address$1;
447
- data: Agent;
448
- }[]>;
449
- /**
450
- * Get user's agents
451
- */
452
- getUserAgents(authority: Address$1): Promise<{
453
- address: Address$1;
454
- data: Agent;
455
- }[]>;
456
- private deriveAgentPda;
457
- private deriveUserRegistryPda;
458
- private deriveTreeConfigPda;
459
- private get systemProgramId();
460
- private get compressionProgramId();
461
- }
462
-
463
- /**
464
- * Escrow management module with simplified API
465
- *
466
- * Supports Token2022 tokens including:
467
- * - Token2022 Native wSOL (9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP)
468
- * - USDC on Token2022
469
- * - Any other Token2022 SPL token
470
- */
471
- declare class EscrowModule extends BaseModule {
472
- /**
473
- * Create a new escrow
474
- * @param params.paymentToken - The Token2022 mint to use (defaults to Token2022 native wSOL)
475
- */
476
- create(params: {
477
- signer: TransactionSigner;
478
- amount: bigint;
479
- buyer: Address$1;
480
- seller: Address$1;
481
- description: string;
482
- paymentToken?: Address$1;
483
- expiresInDays?: number;
484
- milestones?: {
485
- amount: bigint;
486
- description: string;
487
- }[];
488
- }): Promise<string>;
489
- /**
490
- * Create an escrow with native SOL (auto-wraps to wSOL)
491
- * This is the easiest way to create an escrow - just send SOL!
492
- */
493
- createWithSol(params: {
494
- signer: TransactionSigner;
495
- amount: bigint;
496
- seller: Address$1;
497
- description: string;
498
- expiresInDays?: number;
499
- }): Promise<string>;
500
- /**
501
- * Complete an escrow - releases funds to the agent
502
- * @param taskId - The original task description used to derive the escrow PDA
503
- */
504
- complete(signer: TransactionSigner, taskId: string, paymentToken?: Address$1): Promise<string>;
505
- /**
506
- * Cancel an escrow - refunds the client
507
- */
508
- cancel(signer: TransactionSigner, taskId: string, params: {
509
- buyer: Address$1;
510
- paymentToken?: Address$1;
511
- reason?: string;
512
- }): Promise<string>;
513
- /**
514
- * Dispute an escrow
515
- */
516
- dispute(signer: TransactionSigner, taskId: string, reason: string): Promise<string>;
517
- /**
518
- * Process partial refund
519
- */
520
- processPartialRefund(signer: TransactionSigner, taskId: string, refundAmount: bigint, totalAmount: bigint, clientAddress: Address$1, agentAddress: Address$1, paymentToken?: Address$1): Promise<string>;
521
- /**
522
- * Get escrow account
523
- */
524
- getEscrowAccount(address: Address$1): Promise<Escrow | null>;
525
- /**
526
- * Get escrow by taskId
527
- */
528
- getEscrowByTaskId(taskId: string): Promise<Escrow | null>;
529
- /**
530
- * Get all escrows
531
- */
532
- getAllEscrows(): Promise<{
533
- address: Address$1;
534
- data: Escrow;
535
- }[]>;
536
- /**
537
- * Get escrows by buyer
538
- */
539
- getEscrowsByBuyer(buyer: Address$1): Promise<{
540
- address: Address$1;
541
- data: Escrow;
542
- }[]>;
543
- /**
544
- * Get escrows by seller
545
- */
546
- getEscrowsBySeller(seller: Address$1): Promise<{
547
- address: Address$1;
548
- data: Escrow;
549
- }[]>;
550
- /**
551
- * Get escrows by status
552
- */
553
- getEscrowsByStatus(status: EscrowStatus): Promise<{
554
- address: Address$1;
555
- data: Escrow;
556
- }[]>;
557
- /**
558
- * Default payment token - Token2022 native wSOL equivalent
559
- */
560
- private get defaultPaymentToken();
561
- }
562
-
563
- /**
564
- * Channel and messaging module with simplified API
565
- */
566
- declare class ChannelModule extends BaseModule {
567
- /**
568
- * Create a new channel
569
- */
570
- create(params: {
571
- signer: TransactionSigner;
572
- name: string;
573
- description: string;
574
- channelType: ChannelType;
575
- isPrivate?: boolean;
576
- maxMembers?: number;
577
- }): Promise<string>;
578
- /**
579
- * Send a message to a channel
580
- */
581
- sendMessage(params: {
582
- signer: TransactionSigner;
583
- channelAddress: Address$1;
584
- content: string;
585
- messageType?: MessageType;
586
- attachmentUri?: string;
587
- replyTo?: Address$1;
588
- }): Promise<string>;
589
- /**
590
- * Join a channel
591
- */
592
- join(signer: TransactionSigner, channelAddress: Address$1): Promise<string>;
593
- /**
594
- * Leave a channel
595
- */
596
- leave(signer: TransactionSigner, channelAddress: Address$1): Promise<string>;
597
- /**
598
- * Update channel settings
599
- */
600
- updateSettings(signer: TransactionSigner, channelAddress: Address$1, settings: {
601
- name?: string;
602
- description?: string;
603
- isPrivate?: boolean;
604
- maxMembers?: number;
605
- }): Promise<string>;
606
- /**
607
- * Add reaction to a message
608
- */
609
- addReaction(signer: TransactionSigner, messageAddress: Address$1, emoji: string): Promise<string>;
610
- /**
611
- * Get channel account
612
- */
613
- getChannelAccount(address: Address$1): Promise<Channel | null>;
614
- /**
615
- * Get message account
616
- */
617
- getMessageAccount(address: Address$1): Promise<Message | null>;
618
- /**
619
- * Get all channels
620
- */
621
- getAllChannels(): Promise<{
622
- address: Address$1;
623
- data: Channel;
624
- }[]>;
625
- /**
626
- * Get public channels
627
- */
628
- getPublicChannels(): Promise<{
629
- address: Address$1;
630
- data: Channel;
631
- }[]>;
632
- /**
633
- * Get channels by creator
634
- */
635
- getChannelsByCreator(creator: Address$1): Promise<{
636
- address: Address$1;
637
- data: Channel;
638
- }[]>;
639
- /**
640
- * Get messages in channel
641
- */
642
- getChannelMessages(channelAddress: Address$1): Promise<{
643
- address: Address$1;
644
- data: Message;
645
- }[]>;
646
- private deriveChannelPda;
647
- private deriveMessagePda;
648
- private deriveChannelFromMessage;
649
- private get systemProgramId();
650
- }
651
-
652
- interface CreateWorkOrderParams {
653
- signer: TransactionSigner;
654
- provider: Address$1;
655
- title: string;
656
- description: string;
657
- requirements: string[];
658
- paymentAmount: bigint;
659
- paymentToken?: Address$1;
660
- deadline: Date;
661
- }
662
- interface SubmitDeliveryParams {
663
- signer: TransactionSigner;
664
- workOrderAddress: Address$1;
665
- deliverables: Deliverable[];
666
- ipfsHash: string;
667
- metadataUri: string;
668
- }
669
- interface VerifyDeliveryParams {
670
- signer: TransactionSigner;
671
- workOrderAddress: Address$1;
672
- workDeliveryAddress: Address$1;
673
- verificationNotes?: string;
674
- }
675
- interface RejectDeliveryParams {
676
- signer: TransactionSigner;
677
- workOrderAddress: Address$1;
678
- workDeliveryAddress: Address$1;
679
- rejectionReason: string;
680
- requestedChanges?: string[];
681
- }
682
- /**
683
- * Work Order management module
684
- *
685
- * Provides high-level access to work order operations including:
686
- * - Creating work orders for task delegation
687
- * - Submitting work deliveries
688
- * - Verifying and approving deliveries
689
- * - Rejecting deliveries with feedback
690
- */
691
- declare class WorkOrderModule extends BaseModule {
692
- /**
693
- * Get create work order instruction
694
- */
695
- getCreateWorkOrderInstruction(params: {
696
- workOrder: Address$1;
697
- client: TransactionSigner;
698
- orderId: bigint;
699
- provider: Address$1;
700
- title: string;
701
- description: string;
702
- requirements: string[];
703
- paymentAmount: bigint;
704
- paymentToken: Address$1;
705
- deadline: bigint;
706
- }): Promise<CreateWorkOrderInstruction<Address$1<"GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9">, string, string, string, string, []>>;
707
- /**
708
- * Get submit work delivery instruction
709
- */
710
- getSubmitWorkDeliveryInstruction(params: {
711
- workOrder: Address$1;
712
- provider: TransactionSigner;
713
- deliverables: Deliverable[];
714
- ipfsHash: string;
715
- metadataUri: string;
716
- }): Promise<SubmitWorkDeliveryInstruction<Address$1<"GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9">, string, string, string, string, string, []>>;
717
- /**
718
- * Get verify work delivery instruction
719
- */
720
- getVerifyWorkDeliveryInstruction(params: {
721
- workOrder: Address$1;
722
- workDelivery: Address$1;
723
- client: TransactionSigner;
724
- verificationNotes: string | null;
725
- }): VerifyWorkDeliveryInstruction<Address$1<"GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9">, string, string, string, string, []>;
726
- /**
727
- * Get reject work delivery instruction
728
- */
729
- getRejectWorkDeliveryInstruction(params: {
730
- workOrder: Address$1;
731
- workDelivery: Address$1;
732
- client: TransactionSigner;
733
- rejectionReason: string;
734
- requestedChanges: string[] | null;
735
- }): RejectWorkDeliveryInstruction<Address$1<"GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9">, string, string, string, string, []>;
736
- /**
737
- * Create a new work order
738
- */
739
- createWorkOrder(params: CreateWorkOrderParams): Promise<string>;
740
- /**
741
- * Submit work delivery for a work order
742
- */
743
- submitDelivery(params: SubmitDeliveryParams): Promise<string>;
744
- /**
745
- * Verify and approve a work delivery
746
- */
747
- verifyDelivery(params: VerifyDeliveryParams): Promise<string>;
748
- /**
749
- * Reject a work delivery with feedback
750
- */
751
- rejectDelivery(params: RejectDeliveryParams): Promise<string>;
752
- /**
753
- * Get work order account data
754
- */
755
- getWorkOrder(address: Address$1): Promise<WorkOrder | null>;
756
- /**
757
- * Get work delivery account data
758
- */
759
- getWorkDelivery(address: Address$1): Promise<WorkDelivery | null>;
760
- /**
761
- * Get all work orders
762
- */
763
- getAllWorkOrders(): Promise<{
764
- address: Address$1;
765
- data: WorkOrder;
766
- }[]>;
767
- /**
768
- * Get work orders by client address
769
- */
770
- getWorkOrdersByClient(client: Address$1): Promise<{
771
- address: Address$1;
772
- data: WorkOrder;
773
- }[]>;
774
- /**
775
- * Get work orders by provider address
776
- */
777
- getWorkOrdersByProvider(provider: Address$1): Promise<{
778
- address: Address$1;
779
- data: WorkOrder;
780
- }[]>;
781
- /**
782
- * Get work order by address (alias)
783
- */
784
- getWorkOrderByAddress(address: Address$1): Promise<{
785
- address: Address$1;
786
- data: WorkOrder;
787
- } | null>;
788
- /**
789
- * Get work delivery for a work order
790
- */
791
- getWorkDeliveryForOrder(workOrderAddress: Address$1): Promise<{
792
- address: Address$1;
793
- data: WorkDelivery;
794
- } | null>;
795
- private deriveWorkOrderPda;
796
- private _deriveWorkDeliveryPda;
797
- private get nativeMint();
798
- }
799
-
800
- /**
801
- * GhostSpeak Protocol Constants
802
- * July 2025 Implementation
803
- */
804
- /**
805
- * Program ID for GhostSpeak Marketplace on Solana
806
- * Deployed on devnet - December 2025
807
- */
808
- declare const GHOSTSPEAK_PROGRAM_ID: _solana_addresses.Address<"GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9">;
809
- /**
810
- * Network-specific configurations
811
- */
812
- declare const NETWORK_CONFIG: {
813
- readonly devnet: {
814
- readonly programId: "GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9";
815
- readonly rpcUrl: "https://api.devnet.solana.com";
816
- };
817
- readonly testnet: {
818
- readonly programId: "GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9";
819
- readonly rpcUrl: "https://api.testnet.solana.com";
820
- };
821
- readonly mainnet: {
822
- readonly programId: "GpvFxus2eecFKcqa2bhxXeRjpstPeCEJNX216TQCcNC9";
823
- readonly rpcUrl: "https://api.mainnet-beta.solana.com";
824
- };
825
- };
826
-
827
- /**
828
- * System Program Addresses for Solana
829
- *
830
- * These are the standard system program addresses used across Solana.
831
- * Using constants instead of hardcoded values improves maintainability
832
- * and ensures consistency across the SDK.
833
- */
834
-
835
- /**
836
- * SPL Token Program
837
- * The standard SPL Token program
838
- */
839
- declare const TOKEN_PROGRAM_ADDRESS: Address$1<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
840
- /**
841
- * SPL Token 2022 Program (Token Extensions)
842
- * The new token program with extended functionality
843
- */
844
- declare const TOKEN_2022_PROGRAM_ADDRESS: Address$1<"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb">;
845
- /**
846
- * Associated Token Account Program
847
- * Manages associated token accounts
848
- */
849
- declare const ASSOCIATED_TOKEN_PROGRAM_ADDRESS: Address$1<"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL">;
850
- /**
851
- * Native SOL Mint Address (wSOL) - Token 2022 Program
852
- * The mint address for wrapped SOL on Token 2022
853
- * This is the one used by GhostSpeak escrow operations
854
- */
855
- declare const NATIVE_MINT_ADDRESS: Address$1<"9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP">;
856
-
857
- export { AgentModule as A, ChannelModule as C, DisputeStatus as D, EscrowModule as E, GHOSTSPEAK_PROGRAM_ID as G, type Message as M, NETWORK_CONFIG as N, type RejectDeliveryParams as R, type SubmitDeliveryParams as S, TOKEN_PROGRAM_ADDRESS as T, type VerifyDeliveryParams as V, WorkOrderModule as W, NATIVE_MINT_ADDRESS as a, TOKEN_2022_PROGRAM_ADDRESS as b, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as c, type Escrow as d, EscrowStatus as e, type Channel as f, ChannelType as g, MessageType as h, type WorkOrder as i, type WorkDelivery as j, WorkOrderStatus as k, Deliverable as l, type ChannelTypeArgs as m, type MessageTypeArgs as n, type CreateWorkOrderParams as o, getCreateWorkOrderInstruction as p, getSubmitWorkDeliveryInstruction as q, getVerifyWorkDeliveryInstruction as r, getRejectWorkDeliveryInstruction as s, getEscrowDecoder as t, getChannelDecoder as u, getMessageDecoder as v, getWorkOrderDecoder as w, getWorkDeliveryDecoder as x };