@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
@@ -1,592 +0,0 @@
1
- import { Address, Option, ReadonlyUint8Array } from '@solana/kit';
2
-
3
- /**
4
- * This code was AUTOGENERATED using the Codama library.
5
- * Please DO NOT EDIT THIS FILE, instead use visitors
6
- * to add features, then rerun Codama to update it.
7
- *
8
- * @see https://github.com/codama-idl/codama
9
- */
10
-
11
- /** Types of execution conditions */
12
- declare enum ConditionType {
13
- TimeDelay = 0,
14
- TokenBalance = 1,
15
- PriceThreshold = 2,
16
- VoteCount = 3,
17
- ExternalOracle = 4,
18
- CustomLogic = 5
19
- }
20
- type ConditionTypeArgs = ConditionType;
21
-
22
- /**
23
- * This code was AUTOGENERATED using the Codama library.
24
- * Please DO NOT EDIT THIS FILE, instead use visitors
25
- * to add features, then rerun Codama to update it.
26
- *
27
- * @see https://github.com/codama-idl/codama
28
- */
29
-
30
- /** Vote delegation information */
31
- type DelegationInfo = {
32
- /** Original delegator */
33
- delegator: Address;
34
- /** Delegation timestamp */
35
- delegatedAt: bigint;
36
- /** Delegation scope */
37
- scope: DelegationScope;
38
- /** Delegation expiry */
39
- expiresAt: Option<bigint>;
40
- };
41
-
42
- /**
43
- * This code was AUTOGENERATED using the Codama library.
44
- * Please DO NOT EDIT THIS FILE, instead use visitors
45
- * to add features, then rerun Codama to update it.
46
- *
47
- * @see https://github.com/codama-idl/codama
48
- */
49
-
50
- /** Scope of vote delegation */
51
- type DelegationScope = {
52
- __kind: "All";
53
- } | {
54
- __kind: "ProposalType";
55
- fields: readonly [ProposalType];
56
- } | {
57
- __kind: "SingleProposal";
58
- } | {
59
- __kind: "Limited";
60
- };
61
-
62
- /**
63
- * This code was AUTOGENERATED using the Codama library.
64
- * Please DO NOT EDIT THIS FILE, instead use visitors
65
- * to add features, then rerun Codama to update it.
66
- *
67
- * @see https://github.com/codama-idl/codama
68
- */
69
-
70
- /** Execution conditions for transactions */
71
- type ExecutionCondition = {
72
- /** Condition type */
73
- conditionType: ConditionType;
74
- /** Target value/threshold */
75
- targetValue: bigint;
76
- /** Current value */
77
- currentValue: bigint;
78
- /** Condition met */
79
- met: boolean;
80
- /** Condition description */
81
- description: string;
82
- };
83
- type ExecutionConditionArgs = {
84
- /** Condition type */
85
- conditionType: ConditionTypeArgs;
86
- /** Target value/threshold */
87
- targetValue: number | bigint;
88
- /** Current value */
89
- currentValue: number | bigint;
90
- /** Condition met */
91
- met: boolean;
92
- /** Condition description */
93
- description: string;
94
- };
95
-
96
- /**
97
- * This code was AUTOGENERATED using the Codama library.
98
- * Please DO NOT EDIT THIS FILE, instead use visitors
99
- * to add features, then rerun Codama to update it.
100
- *
101
- * @see https://github.com/codama-idl/codama
102
- */
103
-
104
- /** Execution parameters for proposals */
105
- type ExecutionParams = {
106
- /** Instructions to execute if passed */
107
- instructions: Array<ProposalInstruction>;
108
- /** Time delay before execution */
109
- executionDelay: bigint;
110
- /** Execution conditions */
111
- executionConditions: Array<ExecutionCondition>;
112
- /** Can be cancelled after approval */
113
- cancellable: boolean;
114
- /** Automatic execution enabled */
115
- autoExecute: boolean;
116
- /** Required execution authority */
117
- executionAuthority: Address;
118
- };
119
- type ExecutionParamsArgs = {
120
- /** Instructions to execute if passed */
121
- instructions: Array<ProposalInstructionArgs>;
122
- /** Time delay before execution */
123
- executionDelay: number | bigint;
124
- /** Execution conditions */
125
- executionConditions: Array<ExecutionConditionArgs>;
126
- /** Can be cancelled after approval */
127
- cancellable: boolean;
128
- /** Automatic execution enabled */
129
- autoExecute: boolean;
130
- /** Required execution authority */
131
- executionAuthority: Address;
132
- };
133
-
134
- /**
135
- * This code was AUTOGENERATED using the Codama library.
136
- * Please DO NOT EDIT THIS FILE, instead use visitors
137
- * to add features, then rerun Codama to update it.
138
- *
139
- * @see https://github.com/codama-idl/codama
140
- */
141
-
142
- /** Account specification for proposal instruction */
143
- type ProposalAccount = {
144
- /** Account public key */
145
- pubkey: Address;
146
- /** Is signer required */
147
- isSigner: boolean;
148
- /** Is writable */
149
- isWritable: boolean;
150
- /** Account description */
151
- description: string;
152
- };
153
- type ProposalAccountArgs = ProposalAccount;
154
-
155
- /**
156
- * This code was AUTOGENERATED using the Codama library.
157
- * Please DO NOT EDIT THIS FILE, instead use visitors
158
- * to add features, then rerun Codama to update it.
159
- *
160
- * @see https://github.com/codama-idl/codama
161
- */
162
-
163
- /** Individual instruction in proposal */
164
- type ProposalInstruction = {
165
- /** Target program */
166
- programId: Address;
167
- /** Accounts required */
168
- accounts: Array<ProposalAccount>;
169
- /** Instruction data */
170
- data: ReadonlyUint8Array;
171
- /** Instruction description */
172
- description: string;
173
- };
174
- type ProposalInstructionArgs = {
175
- /** Target program */
176
- programId: Address;
177
- /** Accounts required */
178
- accounts: Array<ProposalAccountArgs>;
179
- /** Instruction data */
180
- data: ReadonlyUint8Array;
181
- /** Instruction description */
182
- description: string;
183
- };
184
-
185
- /**
186
- * This code was AUTOGENERATED using the Codama library.
187
- * Please DO NOT EDIT THIS FILE, instead use visitors
188
- * to add features, then rerun Codama to update it.
189
- *
190
- * @see https://github.com/codama-idl/codama
191
- */
192
-
193
- /** Proposal metadata */
194
- type ProposalMetadata = {
195
- /** IPFS hash for detailed proposal */
196
- ipfsHash: Option<string>;
197
- /** External references */
198
- externalReferences: Array<string>;
199
- /** Proposal tags */
200
- tags: Array<string>;
201
- /** Risk assessment */
202
- riskAssessment: Option<string>;
203
- /** Impact analysis */
204
- impactAnalysis: Option<string>;
205
- /** Implementation timeline */
206
- implementationTimeline: Option<string>;
207
- };
208
-
209
- /**
210
- * This code was AUTOGENERATED using the Codama library.
211
- * Please DO NOT EDIT THIS FILE, instead use visitors
212
- * to add features, then rerun Codama to update it.
213
- *
214
- * @see https://github.com/codama-idl/codama
215
- */
216
-
217
- /** Proposal execution status */
218
- declare enum ProposalStatus {
219
- Draft = 0,
220
- Active = 1,
221
- Passed = 2,
222
- Failed = 3,
223
- Executed = 4,
224
- Cancelled = 5,
225
- Expired = 6,
226
- Queued = 7
227
- }
228
-
229
- /**
230
- * This code was AUTOGENERATED using the Codama library.
231
- * Please DO NOT EDIT THIS FILE, instead use visitors
232
- * to add features, then rerun Codama to update it.
233
- *
234
- * @see https://github.com/codama-idl/codama
235
- */
236
-
237
- /** Types of governance proposals */
238
- declare enum ProposalType {
239
- ParameterUpdate = 0,
240
- ProtocolUpgrade = 1,
241
- TreasuryOperation = 2,
242
- FeeUpdate = 3,
243
- SecurityUpdate = 4,
244
- GovernanceUpdate = 5,
245
- EmergencyAction = 6,
246
- Custom = 7
247
- }
248
- type ProposalTypeArgs = ProposalType;
249
-
250
- /**
251
- * This code was AUTOGENERATED using the Codama library.
252
- * Please DO NOT EDIT THIS FILE, instead use visitors
253
- * to add features, then rerun Codama to update it.
254
- *
255
- * @see https://github.com/codama-idl/codama
256
- */
257
-
258
- /** Methods for calculating quorum */
259
- declare enum QuorumMethod {
260
- Absolute = 0,
261
- Relative = 1,
262
- Weighted = 2,
263
- Dynamic = 3
264
- }
265
-
266
- /**
267
- * This code was AUTOGENERATED using the Codama library.
268
- * Please DO NOT EDIT THIS FILE, instead use visitors
269
- * to add features, then rerun Codama to update it.
270
- *
271
- * @see https://github.com/codama-idl/codama
272
- */
273
-
274
- /** Quorum requirements for proposals */
275
- type QuorumRequirements = {
276
- /** Minimum participation rate (0-100) */
277
- minimumParticipation: number;
278
- /** Approval threshold (0-100) */
279
- approvalThreshold: number;
280
- /** Super majority required */
281
- superMajorityRequired: boolean;
282
- /** Minimum total voting power */
283
- minimumVotingPower: bigint;
284
- /** Quorum calculation method */
285
- quorumMethod: QuorumMethod;
286
- };
287
-
288
- /**
289
- * This code was AUTOGENERATED using the Codama library.
290
- * Please DO NOT EDIT THIS FILE, instead use visitors
291
- * to add features, then rerun Codama to update it.
292
- *
293
- * @see https://github.com/codama-idl/codama
294
- */
295
-
296
- /** Individual vote record */
297
- type Vote = {
298
- /** Voter public key */
299
- voter: Address;
300
- /** Vote choice */
301
- choice: VoteChoice;
302
- /** Voting power used */
303
- votingPower: bigint;
304
- /** Vote timestamp */
305
- votedAt: bigint;
306
- /** Vote reasoning (optional) */
307
- reasoning: Option<string>;
308
- /** Delegation info (if delegated vote) */
309
- delegationInfo: Option<DelegationInfo>;
310
- };
311
-
312
- /**
313
- * This code was AUTOGENERATED using the Codama library.
314
- * Please DO NOT EDIT THIS FILE, instead use visitors
315
- * to add features, then rerun Codama to update it.
316
- *
317
- * @see https://github.com/codama-idl/codama
318
- */
319
-
320
- /** Vote choices */
321
- declare enum VoteChoice {
322
- For = 0,
323
- Against = 1,
324
- Abstain = 2
325
- }
326
-
327
- /**
328
- * This code was AUTOGENERATED using the Codama library.
329
- * Please DO NOT EDIT THIS FILE, instead use visitors
330
- * to add features, then rerun Codama to update it.
331
- *
332
- * @see https://github.com/codama-idl/codama
333
- */
334
-
335
- /** Voting results for proposal */
336
- type VotingResults = {
337
- /** Total votes for */
338
- votesFor: bigint;
339
- /** Total votes against */
340
- votesAgainst: bigint;
341
- /** Total votes abstain */
342
- votesAbstain: bigint;
343
- /** Total voting power */
344
- totalVotingPower: bigint;
345
- /** Participation rate */
346
- participationRate: number;
347
- /** Individual votes */
348
- individualVotes: Array<Vote>;
349
- /** Weighted voting enabled */
350
- weightedVoting: boolean;
351
- /** Quorum reached */
352
- quorumReached: boolean;
353
- /** Approval threshold met */
354
- approvalThresholdMet: boolean;
355
- };
356
-
357
- /**
358
- * This code was AUTOGENERATED using the Codama library.
359
- * Please DO NOT EDIT THIS FILE, instead use visitors
360
- * to add features, then rerun Codama to update it.
361
- *
362
- * @see https://github.com/codama-idl/codama
363
- */
364
-
365
- type GovernanceProposal = {
366
- discriminator: ReadonlyUint8Array;
367
- /** Proposal ID */
368
- proposalId: bigint;
369
- /** Proposer */
370
- proposer: Address;
371
- /** Proposal title */
372
- title: string;
373
- /** Proposal description */
374
- description: string;
375
- /** Proposal type */
376
- proposalType: ProposalType;
377
- /** Creation timestamp */
378
- createdAt: bigint;
379
- /** Voting start timestamp */
380
- votingStartsAt: bigint;
381
- /** Voting end timestamp */
382
- votingEndsAt: bigint;
383
- /** Execution timestamp (if approved) */
384
- executionTimestamp: Option<bigint>;
385
- /** Proposal status */
386
- status: ProposalStatus;
387
- /** Voting results */
388
- votingResults: VotingResults;
389
- /** Execution parameters */
390
- executionParams: ExecutionParams;
391
- /** Quorum requirements */
392
- quorumRequirements: QuorumRequirements;
393
- /** Proposal metadata */
394
- metadata: ProposalMetadata;
395
- /** Reserved space */
396
- reserved: ReadonlyUint8Array;
397
- };
398
-
399
- /**
400
- * IPFS configuration and types for GhostSpeak SDK
401
- */
402
- /**
403
- * IPFS provider configuration
404
- */
405
- interface IPFSProviderConfig {
406
- /** Provider name */
407
- name: 'pinata' | 'infura' | 'ipfs-http-client' | 'web3-storage' | 'custom' | 'test';
408
- /** API endpoint URL */
409
- endpoint?: string;
410
- /** API key for authentication */
411
- apiKey?: string;
412
- /** API secret for authentication */
413
- apiSecret?: string;
414
- /** JWT token for authentication */
415
- jwt?: string;
416
- /** Custom headers */
417
- headers?: Record<string, string>;
418
- /** Request timeout in milliseconds */
419
- timeout?: number;
420
- }
421
- /**
422
- * IPFS client configuration
423
- */
424
- interface IPFSConfig {
425
- /** Primary provider */
426
- provider: IPFSProviderConfig;
427
- /** Fallback providers */
428
- fallbackProviders?: IPFSProviderConfig[];
429
- /** Default IPFS gateway for retrieving content */
430
- gateway?: string;
431
- /** Additional gateways for redundancy */
432
- gateways?: string[];
433
- /** Whether to automatically pin uploaded content */
434
- autoPinning?: boolean;
435
- /** Content size threshold for IPFS (bytes) - content above this will use IPFS */
436
- sizeThreshold?: number;
437
- /** Maximum retry attempts for failed operations */
438
- maxRetries?: number;
439
- /** Retry delay in milliseconds */
440
- retryDelay?: number;
441
- /** Enable caching of IPFS content */
442
- enableCache?: boolean;
443
- /** Cache TTL in milliseconds */
444
- cacheTTL?: number;
445
- }
446
- /**
447
- * IPFS upload options
448
- */
449
- interface IPFSUploadOptions {
450
- /** Pin the content after upload */
451
- pin?: boolean;
452
- /** Custom filename for the content */
453
- filename?: string;
454
- /** Metadata to associate with the upload */
455
- metadata?: Record<string, unknown>;
456
- /** Content type/MIME type */
457
- contentType?: string;
458
- /** Whether to wrap in directory */
459
- wrapWithDirectory?: boolean;
460
- /** Progress callback for large uploads */
461
- onProgress?: (uploaded: number, total: number) => void;
462
- }
463
- /**
464
- * IPFS upload result
465
- */
466
- interface IPFSUploadResult {
467
- /** IPFS hash/CID of the uploaded content */
468
- hash: string;
469
- /** Full IPFS URI (ipfs://<hash>) */
470
- uri: string;
471
- /** Size of uploaded content in bytes */
472
- size: number;
473
- /** Upload timestamp */
474
- timestamp: number;
475
- /** Whether content was pinned */
476
- pinned: boolean;
477
- /** Gateway URLs for accessing the content */
478
- gateways: string[];
479
- }
480
- /**
481
- * IPFS retrieval options
482
- */
483
- interface IPFSRetrievalOptions {
484
- /** Preferred gateway to use */
485
- gateway?: string;
486
- /** Timeout for retrieval in milliseconds */
487
- timeout?: number;
488
- /** Whether to cache retrieved content */
489
- cache?: boolean;
490
- /** Content type to expect */
491
- expectedType?: string;
492
- }
493
- /**
494
- * IPFS retrieval result
495
- */
496
- interface IPFSRetrievalResult {
497
- /** Retrieved content */
498
- content: string | Uint8Array;
499
- /** Content type */
500
- contentType?: string;
501
- /** Content size in bytes */
502
- size: number;
503
- /** IPFS hash */
504
- hash: string;
505
- /** Gateway used for retrieval */
506
- gateway: string;
507
- /** Whether content was served from cache */
508
- fromCache: boolean;
509
- }
510
- /**
511
- * IPFS pin operation result
512
- */
513
- interface IPFSPinResult {
514
- /** IPFS hash that was pinned */
515
- hash: string;
516
- /** Whether pin was successful */
517
- success: boolean;
518
- /** Pin status */
519
- status: 'pinned' | 'pinning' | 'failed';
520
- /** Error message if failed */
521
- error?: string;
522
- }
523
- /**
524
- * IPFS content metadata for large content storage
525
- */
526
- interface IPFSContentMetadata {
527
- /** Type of content stored */
528
- type: 'agent-metadata' | 'channel-message' | 'file-attachment' | 'custom';
529
- /** Original content size before IPFS storage */
530
- originalSize: number;
531
- /** IPFS hash of the content */
532
- ipfsHash: string;
533
- /** Content encoding used */
534
- encoding?: 'utf8' | 'base64' | 'binary';
535
- /** Compression algorithm used */
536
- compression?: 'gzip' | 'brotli' | 'none';
537
- /** Content MIME type */
538
- mimeType?: string;
539
- /** Upload timestamp */
540
- uploadedAt: number;
541
- /** Whether content is pinned */
542
- pinned: boolean;
543
- /** Checksum for integrity verification */
544
- checksum?: string;
545
- /** Additional metadata */
546
- metadata?: Record<string, unknown>;
547
- }
548
- /**
549
- * Error types for IPFS operations
550
- */
551
- type IPFSError = 'UPLOAD_FAILED' | 'RETRIEVAL_FAILED' | 'PIN_FAILED' | 'UNPIN_FAILED' | 'PROVIDER_ERROR' | 'NETWORK_ERROR' | 'TIMEOUT_ERROR' | 'INVALID_HASH' | 'INVALID_CONFIG' | 'CONTENT_TOO_LARGE' | 'QUOTA_EXCEEDED' | 'AUTHENTICATION_FAILED';
552
- /**
553
- * IPFS operation result with error handling
554
- */
555
- interface IPFSOperationResult<T> {
556
- /** Whether operation was successful */
557
- success: boolean;
558
- /** Result data if successful */
559
- data?: T;
560
- /** Error type if failed */
561
- error?: IPFSError;
562
- /** Human-readable error message */
563
- message?: string;
564
- /** Operation duration in milliseconds */
565
- duration?: number;
566
- /** Provider used for the operation */
567
- provider?: string;
568
- }
569
- /**
570
- * Utility type for content that can be stored on IPFS or inline
571
- */
572
- interface FlexibleContent {
573
- /** Content stored inline (for small content) */
574
- inline?: string;
575
- /** IPFS reference (for large content) */
576
- ipfs?: IPFSContentMetadata;
577
- }
578
- /**
579
- * Helper type for converting content to IPFS when size threshold is exceeded
580
- */
581
- interface ContentStorageResult {
582
- /** Final content URI (either data: or ipfs:) */
583
- uri: string;
584
- /** Whether content was stored on IPFS */
585
- useIpfs: boolean;
586
- /** IPFS metadata if stored on IPFS */
587
- ipfsMetadata?: IPFSContentMetadata;
588
- /** Content size in bytes */
589
- size: number;
590
- }
591
-
592
- export { type ContentStorageResult as C, type ExecutionParamsArgs as E, type FlexibleContent as F, type GovernanceProposal as G, type IPFSConfig as I, type ProposalTypeArgs as P, type QuorumRequirements as Q, VoteChoice as V, type IPFSUploadOptions as a, type IPFSContentMetadata as b, type IPFSOperationResult as c, type IPFSError as d, ProposalStatus as e, type IPFSProviderConfig as f, type IPFSUploadResult as g, type IPFSRetrievalOptions as h, type IPFSRetrievalResult as i, type IPFSPinResult as j, type ExecutionCondition as k, ConditionType as l, type VotingResults as m };
@@ -1,58 +0,0 @@
1
- import { Option } from '@solana/kit';
2
-
3
- /**
4
- * This code was AUTOGENERATED using the Codama library.
5
- * Please DO NOT EDIT THIS FILE, instead use visitors
6
- * to add features, then rerun Codama to update it.
7
- *
8
- * @see https://github.com/codama-idl/codama
9
- */
10
-
11
- /** Types of transactions that can be executed */
12
- declare enum TransactionType {
13
- Transfer = 0,
14
- Withdrawal = 1,
15
- EscrowRelease = 2,
16
- ProposalCreation = 3,
17
- VoteExecution = 4,
18
- ParameterUpdate = 5,
19
- SignerAddition = 6,
20
- SignerRemoval = 7,
21
- ThresholdUpdate = 8,
22
- ConfigUpdate = 9,
23
- EmergencyFreeze = 10,
24
- EmergencyUnfreeze = 11,
25
- SecurityPolicyUpdate = 12,
26
- ProtocolUpgrade = 13,
27
- FeatureToggle = 14,
28
- RiskParameterUpdate = 15,
29
- CustomInstruction = 16
30
- }
31
- type TransactionTypeArgs = TransactionType;
32
-
33
- /**
34
- * This code was AUTOGENERATED by scripts/generate-missing-types.ts
35
- */
36
-
37
- type MultisigConfig = {
38
- max_signers: number;
39
- default_timeout: bigint;
40
- allow_emergency_override: boolean;
41
- emergency_threshold: Option<number>;
42
- auto_execute: boolean;
43
- signer_change_threshold: number;
44
- allowed_transaction_types: Array<TransactionType>;
45
- daily_limits: Array<readonly [string, bigint]>;
46
- };
47
- type MultisigConfigArgs = {
48
- max_signers: number;
49
- default_timeout: number | bigint;
50
- allow_emergency_override: boolean;
51
- emergency_threshold: Option<number>;
52
- auto_execute: boolean;
53
- signer_change_threshold: number;
54
- allowed_transaction_types: Array<TransactionTypeArgs>;
55
- daily_limits: Array<readonly [string, number | bigint]>;
56
- };
57
-
58
- export { type MultisigConfigArgs as M, TransactionType as T, type MultisigConfig as a };