@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.
- package/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/GhostSpeakClient-CyeZ6Tyb.d.ts +2061 -0
- package/dist/client.d.ts +4 -3
- package/dist/crypto.d.ts +2 -2
- package/dist/{feature-flags-CEaxXgQQ.d.ts → feature-flags-3POmoO_Z.d.ts} +833 -1190
- package/dist/index.d.ts +206 -4543
- package/dist/ipfs-types-KJcvy9Qk.d.ts +553 -0
- package/dist/minimal/core-minimal.d.ts +2037 -82
- package/dist/utils.d.ts +4 -4
- package/package.json +5 -29
- package/dist/EscrowInstructions-4P3H6ETO.js +0 -2
- package/dist/EscrowInstructions-4P3H6ETO.js.map +0 -1
- package/dist/GhostSpeakClient-4SROinEf.d.ts +0 -503
- package/dist/accounts-IUZMPYVE.js +0 -2
- package/dist/accounts-IUZMPYVE.js.map +0 -1
- package/dist/agent-GZ2OES75.js +0 -2
- package/dist/agent-GZ2OES75.js.map +0 -1
- package/dist/auctionMarketplace-W4YM7HKU.js +0 -2
- package/dist/auctionMarketplace-W4YM7HKU.js.map +0 -1
- package/dist/chunk-2KOOI5BX.js +0 -2
- package/dist/chunk-2KOOI5BX.js.map +0 -1
- package/dist/chunk-32GWTXRJ.js +0 -3
- package/dist/chunk-32GWTXRJ.js.map +0 -1
- package/dist/chunk-B4WUFVLE.js +0 -2
- package/dist/chunk-B4WUFVLE.js.map +0 -1
- package/dist/chunk-C2OTQ5YS.js +0 -2
- package/dist/chunk-C2OTQ5YS.js.map +0 -1
- package/dist/chunk-CTC4ZJ26.js +0 -5
- package/dist/chunk-CTC4ZJ26.js.map +0 -1
- package/dist/chunk-DF7LLAMH.js +0 -2
- package/dist/chunk-DF7LLAMH.js.map +0 -1
- package/dist/chunk-DJ356OUX.js +0 -2
- package/dist/chunk-DJ356OUX.js.map +0 -1
- package/dist/chunk-DK5YDBXR.js +0 -2
- package/dist/chunk-DK5YDBXR.js.map +0 -1
- package/dist/chunk-DOTF5ECA.js +0 -4
- package/dist/chunk-DOTF5ECA.js.map +0 -1
- package/dist/chunk-FKEUXXZS.js +0 -30
- package/dist/chunk-FKEUXXZS.js.map +0 -1
- package/dist/chunk-GSHXEKBW.js +0 -2
- package/dist/chunk-GSHXEKBW.js.map +0 -1
- package/dist/chunk-IZDAEOLH.js +0 -2
- package/dist/chunk-IZDAEOLH.js.map +0 -1
- package/dist/chunk-JY554RGE.js +0 -3
- package/dist/chunk-JY554RGE.js.map +0 -1
- package/dist/chunk-KK3HV2RD.js +0 -3
- package/dist/chunk-KK3HV2RD.js.map +0 -1
- package/dist/chunk-PPOCDM6G.js +0 -2
- package/dist/chunk-PPOCDM6G.js.map +0 -1
- package/dist/chunk-PUI35LBF.js +0 -2
- package/dist/chunk-PUI35LBF.js.map +0 -1
- package/dist/chunk-Q34J6YDA.js +0 -11
- package/dist/chunk-Q34J6YDA.js.map +0 -1
- package/dist/chunk-QATBFZMM.js +0 -3
- package/dist/chunk-QATBFZMM.js.map +0 -1
- package/dist/chunk-QTKN3VZV.js +0 -2
- package/dist/chunk-QTKN3VZV.js.map +0 -1
- package/dist/chunk-RFBYMTTN.js +0 -2
- package/dist/chunk-RFBYMTTN.js.map +0 -1
- package/dist/chunk-RJJPOLCK.js +0 -22
- package/dist/chunk-RJJPOLCK.js.map +0 -1
- package/dist/chunk-RTWJTEND.js +0 -2
- package/dist/chunk-RTWJTEND.js.map +0 -1
- package/dist/chunk-SR3ZJCME.js +0 -2
- package/dist/chunk-SR3ZJCME.js.map +0 -1
- package/dist/chunk-TAWXH7KX.js +0 -2
- package/dist/chunk-TAWXH7KX.js.map +0 -1
- package/dist/client.js +0 -2
- package/dist/client.js.map +0 -1
- package/dist/confidential-transfer-manager-CGS3T5DG.js +0 -2
- package/dist/confidential-transfer-manager-CGS3T5DG.js.map +0 -1
- package/dist/crypto.js +0 -2
- package/dist/crypto.js.map +0 -1
- package/dist/elgamal-3ABOJSHC.js +0 -2
- package/dist/elgamal-3ABOJSHC.js.map +0 -1
- package/dist/enhanced-client-errors-W22U3LNH.js +0 -2
- package/dist/enhanced-client-errors-W22U3LNH.js.map +0 -1
- package/dist/errors.js +0 -2
- package/dist/errors.js.map +0 -1
- package/dist/generated-U3L4KUE4.js +0 -2
- package/dist/generated-U3L4KUE4.js.map +0 -1
- package/dist/ghostspeak_wasm-3KPNJTSS.js +0 -2
- package/dist/ghostspeak_wasm-3KPNJTSS.js.map +0 -1
- package/dist/index.js +0 -97
- package/dist/index.js.map +0 -1
- package/dist/ipfs-types-BlxtJ3q2.d.ts +0 -194
- package/dist/metafile-esm.json +0 -1
- package/dist/minimal/core-minimal.js +0 -12
- package/dist/minimal/core-minimal.js.map +0 -1
- package/dist/pda-2GUWRQ5G.js +0 -2
- package/dist/pda-2GUWRQ5G.js.map +0 -1
- package/dist/registerAgentCompressed-L6ACXD2Z.js +0 -2
- package/dist/registerAgentCompressed-L6ACXD2Z.js.map +0 -1
- package/dist/token-2022-rpc-SRHRFN5Y.js +0 -2
- package/dist/token-2022-rpc-SRHRFN5Y.js.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.js +0 -2
- package/dist/utils.js.map +0 -1
- package/dist/zk-proof-builder-GXZ42QZA.js +0 -2
- package/dist/zk-proof-builder-GXZ42QZA.js.map +0 -1
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IPFS configuration and types for GhostSpeak SDK
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* IPFS provider configuration
|
|
6
|
-
*/
|
|
7
|
-
interface IPFSProviderConfig {
|
|
8
|
-
/** Provider name */
|
|
9
|
-
name: 'pinata' | 'infura' | 'ipfs-http-client' | 'web3-storage' | 'custom' | 'test';
|
|
10
|
-
/** API endpoint URL */
|
|
11
|
-
endpoint?: string;
|
|
12
|
-
/** API key for authentication */
|
|
13
|
-
apiKey?: string;
|
|
14
|
-
/** API secret for authentication */
|
|
15
|
-
apiSecret?: string;
|
|
16
|
-
/** JWT token for authentication */
|
|
17
|
-
jwt?: string;
|
|
18
|
-
/** Custom headers */
|
|
19
|
-
headers?: Record<string, string>;
|
|
20
|
-
/** Request timeout in milliseconds */
|
|
21
|
-
timeout?: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* IPFS client configuration
|
|
25
|
-
*/
|
|
26
|
-
interface IPFSConfig {
|
|
27
|
-
/** Primary provider */
|
|
28
|
-
provider: IPFSProviderConfig;
|
|
29
|
-
/** Fallback providers */
|
|
30
|
-
fallbackProviders?: IPFSProviderConfig[];
|
|
31
|
-
/** Default IPFS gateway for retrieving content */
|
|
32
|
-
gateway?: string;
|
|
33
|
-
/** Additional gateways for redundancy */
|
|
34
|
-
gateways?: string[];
|
|
35
|
-
/** Whether to automatically pin uploaded content */
|
|
36
|
-
autoPinning?: boolean;
|
|
37
|
-
/** Content size threshold for IPFS (bytes) - content above this will use IPFS */
|
|
38
|
-
sizeThreshold?: number;
|
|
39
|
-
/** Maximum retry attempts for failed operations */
|
|
40
|
-
maxRetries?: number;
|
|
41
|
-
/** Retry delay in milliseconds */
|
|
42
|
-
retryDelay?: number;
|
|
43
|
-
/** Enable caching of IPFS content */
|
|
44
|
-
enableCache?: boolean;
|
|
45
|
-
/** Cache TTL in milliseconds */
|
|
46
|
-
cacheTTL?: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* IPFS upload options
|
|
50
|
-
*/
|
|
51
|
-
interface IPFSUploadOptions {
|
|
52
|
-
/** Pin the content after upload */
|
|
53
|
-
pin?: boolean;
|
|
54
|
-
/** Custom filename for the content */
|
|
55
|
-
filename?: string;
|
|
56
|
-
/** Metadata to associate with the upload */
|
|
57
|
-
metadata?: Record<string, unknown>;
|
|
58
|
-
/** Content type/MIME type */
|
|
59
|
-
contentType?: string;
|
|
60
|
-
/** Whether to wrap in directory */
|
|
61
|
-
wrapWithDirectory?: boolean;
|
|
62
|
-
/** Progress callback for large uploads */
|
|
63
|
-
onProgress?: (uploaded: number, total: number) => void;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* IPFS upload result
|
|
67
|
-
*/
|
|
68
|
-
interface IPFSUploadResult {
|
|
69
|
-
/** IPFS hash/CID of the uploaded content */
|
|
70
|
-
hash: string;
|
|
71
|
-
/** Full IPFS URI (ipfs://<hash>) */
|
|
72
|
-
uri: string;
|
|
73
|
-
/** Size of uploaded content in bytes */
|
|
74
|
-
size: number;
|
|
75
|
-
/** Upload timestamp */
|
|
76
|
-
timestamp: number;
|
|
77
|
-
/** Whether content was pinned */
|
|
78
|
-
pinned: boolean;
|
|
79
|
-
/** Gateway URLs for accessing the content */
|
|
80
|
-
gateways: string[];
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* IPFS retrieval options
|
|
84
|
-
*/
|
|
85
|
-
interface IPFSRetrievalOptions {
|
|
86
|
-
/** Preferred gateway to use */
|
|
87
|
-
gateway?: string;
|
|
88
|
-
/** Timeout for retrieval in milliseconds */
|
|
89
|
-
timeout?: number;
|
|
90
|
-
/** Whether to cache retrieved content */
|
|
91
|
-
cache?: boolean;
|
|
92
|
-
/** Content type to expect */
|
|
93
|
-
expectedType?: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* IPFS retrieval result
|
|
97
|
-
*/
|
|
98
|
-
interface IPFSRetrievalResult {
|
|
99
|
-
/** Retrieved content */
|
|
100
|
-
content: string | Uint8Array;
|
|
101
|
-
/** Content type */
|
|
102
|
-
contentType?: string;
|
|
103
|
-
/** Content size in bytes */
|
|
104
|
-
size: number;
|
|
105
|
-
/** IPFS hash */
|
|
106
|
-
hash: string;
|
|
107
|
-
/** Gateway used for retrieval */
|
|
108
|
-
gateway: string;
|
|
109
|
-
/** Whether content was served from cache */
|
|
110
|
-
fromCache: boolean;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* IPFS pin operation result
|
|
114
|
-
*/
|
|
115
|
-
interface IPFSPinResult {
|
|
116
|
-
/** IPFS hash that was pinned */
|
|
117
|
-
hash: string;
|
|
118
|
-
/** Whether pin was successful */
|
|
119
|
-
success: boolean;
|
|
120
|
-
/** Pin status */
|
|
121
|
-
status: 'pinned' | 'pinning' | 'failed';
|
|
122
|
-
/** Error message if failed */
|
|
123
|
-
error?: string;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* IPFS content metadata for large content storage
|
|
127
|
-
*/
|
|
128
|
-
interface IPFSContentMetadata {
|
|
129
|
-
/** Type of content stored */
|
|
130
|
-
type: 'agent-metadata' | 'channel-message' | 'file-attachment' | 'custom';
|
|
131
|
-
/** Original content size before IPFS storage */
|
|
132
|
-
originalSize: number;
|
|
133
|
-
/** IPFS hash of the content */
|
|
134
|
-
ipfsHash: string;
|
|
135
|
-
/** Content encoding used */
|
|
136
|
-
encoding?: 'utf8' | 'base64' | 'binary';
|
|
137
|
-
/** Compression algorithm used */
|
|
138
|
-
compression?: 'gzip' | 'brotli' | 'none';
|
|
139
|
-
/** Content MIME type */
|
|
140
|
-
mimeType?: string;
|
|
141
|
-
/** Upload timestamp */
|
|
142
|
-
uploadedAt: number;
|
|
143
|
-
/** Whether content is pinned */
|
|
144
|
-
pinned: boolean;
|
|
145
|
-
/** Checksum for integrity verification */
|
|
146
|
-
checksum?: string;
|
|
147
|
-
/** Additional metadata */
|
|
148
|
-
metadata?: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Error types for IPFS operations
|
|
152
|
-
*/
|
|
153
|
-
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';
|
|
154
|
-
/**
|
|
155
|
-
* IPFS operation result with error handling
|
|
156
|
-
*/
|
|
157
|
-
interface IPFSOperationResult<T> {
|
|
158
|
-
/** Whether operation was successful */
|
|
159
|
-
success: boolean;
|
|
160
|
-
/** Result data if successful */
|
|
161
|
-
data?: T;
|
|
162
|
-
/** Error type if failed */
|
|
163
|
-
error?: IPFSError;
|
|
164
|
-
/** Human-readable error message */
|
|
165
|
-
message?: string;
|
|
166
|
-
/** Operation duration in milliseconds */
|
|
167
|
-
duration?: number;
|
|
168
|
-
/** Provider used for the operation */
|
|
169
|
-
provider?: string;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Utility type for content that can be stored on IPFS or inline
|
|
173
|
-
*/
|
|
174
|
-
interface FlexibleContent {
|
|
175
|
-
/** Content stored inline (for small content) */
|
|
176
|
-
inline?: string;
|
|
177
|
-
/** IPFS reference (for large content) */
|
|
178
|
-
ipfs?: IPFSContentMetadata;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Helper type for converting content to IPFS when size threshold is exceeded
|
|
182
|
-
*/
|
|
183
|
-
interface ContentStorageResult {
|
|
184
|
-
/** Final content URI (either data: or ipfs:) */
|
|
185
|
-
uri: string;
|
|
186
|
-
/** Whether content was stored on IPFS */
|
|
187
|
-
useIpfs: boolean;
|
|
188
|
-
/** IPFS metadata if stored on IPFS */
|
|
189
|
-
ipfsMetadata?: IPFSContentMetadata;
|
|
190
|
-
/** Content size in bytes */
|
|
191
|
-
size: number;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export type { ContentStorageResult as C, FlexibleContent as F, IPFSConfig as I, IPFSUploadOptions as a, IPFSContentMetadata as b, IPFSOperationResult as c, IPFSError as d, IPFSProviderConfig as e, IPFSUploadResult as f, IPFSRetrievalOptions as g, IPFSRetrievalResult as h, IPFSPinResult as i };
|