@ghostspeak/sdk 2.0.0 → 2.0.1

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