@dfns/sdk 0.7.14-rc.0 → 0.7.14

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.
@@ -1,10 +1,17 @@
1
1
  export type CreateSwapBody = {
2
+ /** Quote to use for this swap. */
2
3
  quoteId: string;
4
+ /** An optional reference for this Swap. */
3
5
  reference?: string | undefined;
6
+ /** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
4
7
  provider: "UniswapX" | "UniswapClassic";
8
+ /** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
5
9
  walletId: string;
10
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
6
11
  targetWalletId?: string | undefined;
12
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. Used for attesting that the swap is being created with the same parameters as the quote. */
7
13
  slippageBps: number;
14
+ /** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
8
15
  sourceAsset: {
9
16
  kind: "Native";
10
17
  amount: string;
@@ -13,6 +20,7 @@ export type CreateSwapBody = {
13
20
  contract: string;
14
21
  amount: string;
15
22
  };
23
+ /** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
16
24
  targetAsset: {
17
25
  kind: "Native";
18
26
  amount: string;
@@ -23,13 +31,21 @@ export type CreateSwapBody = {
23
31
  };
24
32
  };
25
33
  export type CreateSwapResponse = {
34
+ /** Swap id. */
26
35
  id: string;
36
+ /** Id of the quote this swap is based on. */
27
37
  quoteId: string;
38
+ /** Optional user-defined reference for this Swap. */
28
39
  reference: string | null;
40
+ /** Id of the Dfns wallet spending the sourceAsset. */
29
41
  walletId: string;
42
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
30
43
  targetWalletId: string;
44
+ /** Swap status. */
31
45
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
46
+ /** Swap provider. */
32
47
  provider: "UniswapX" | "UniswapClassic";
48
+ /** The source asset for this swap transaction. */
33
49
  quotedSourceAsset: ({
34
50
  kind: "Native";
35
51
  amount: string;
@@ -46,6 +62,7 @@ export type CreateSwapResponse = {
46
62
  tid?: string | undefined;
47
63
  };
48
64
  };
65
+ /** The target asset for this swap transaction. */
49
66
  quotedTargetAsset: ({
50
67
  kind: "Native";
51
68
  amount: string;
@@ -62,15 +79,25 @@ export type CreateSwapResponse = {
62
79
  tid?: string | undefined;
63
80
  };
64
81
  };
82
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
65
83
  slippageBps: number;
84
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
66
85
  dateCreated: string;
86
+ /** The full request used for initiating this swap. */
67
87
  requestBody: {
88
+ /** Quote to use for this swap. */
68
89
  quoteId: string;
90
+ /** An optional reference for this Swap. */
69
91
  reference?: string | undefined;
92
+ /** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
70
93
  provider: "UniswapX" | "UniswapClassic";
94
+ /** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
71
95
  walletId: string;
96
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
72
97
  targetWalletId?: string | undefined;
98
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. Used for attesting that the swap is being created with the same parameters as the quote. */
73
99
  slippageBps: number;
100
+ /** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
74
101
  sourceAsset: {
75
102
  kind: "Native";
76
103
  amount: string;
@@ -79,6 +106,7 @@ export type CreateSwapResponse = {
79
106
  contract: string;
80
107
  amount: string;
81
108
  };
109
+ /** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
82
110
  targetAsset: {
83
111
  kind: "Native";
84
112
  amount: string;
@@ -89,7 +117,9 @@ export type CreateSwapResponse = {
89
117
  };
90
118
  } | {};
91
119
  requester: {
120
+ /** User (could be a service account) who requested the quote. */
92
121
  userId: string;
122
+ /** Service Account token or Personal Access token used when requesting the quote. */
93
123
  tokenId?: string | undefined;
94
124
  };
95
125
  };
@@ -97,9 +127,13 @@ export type CreateSwapRequest = {
97
127
  body: CreateSwapBody;
98
128
  };
99
129
  export type CreateSwapQuoteBody = {
130
+ /** Swap provider. */
100
131
  provider: "UniswapX" | "UniswapClassic";
132
+ /** Id of the Dfns wallet spending the sourceAsset. */
101
133
  walletId: string;
134
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
102
135
  targetWalletId?: string | undefined;
136
+ /** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
103
137
  sourceAsset: {
104
138
  kind: "Native";
105
139
  amount: string;
@@ -108,20 +142,26 @@ export type CreateSwapQuoteBody = {
108
142
  contract: string;
109
143
  amount: string;
110
144
  };
145
+ /** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
111
146
  targetAsset: {
112
147
  kind: "Native";
113
148
  } | {
114
149
  kind: "Erc20";
115
150
  contract: string;
116
151
  };
152
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
117
153
  slippageBps: number;
118
154
  };
119
155
  export type CreateSwapQuoteResponse = {
156
+ /** ID of the Swap Quote. */
120
157
  id: string;
158
+ /** Id of the Dfns wallet spending the sourceAsset. */
121
159
  walletId: string;
122
160
  /** If not provided, the walletId is used as the target wallet. If provided, this field is currently required to be the same as walletId */
123
161
  targetWalletId?: string | undefined;
162
+ /** Swap provider. */
124
163
  provider: "UniswapX" | "UniswapClassic";
164
+ /** The source asset that will be spent on the swap transaction. */
125
165
  sourceAsset: ({
126
166
  kind: "Native";
127
167
  amount: string;
@@ -138,6 +178,7 @@ export type CreateSwapQuoteResponse = {
138
178
  tid?: string | undefined;
139
179
  };
140
180
  };
181
+ /** The target asset that will be received with the swap transaction. */
141
182
  targetAsset: ({
142
183
  kind: "Native";
143
184
  amount: string;
@@ -154,12 +195,19 @@ export type CreateSwapQuoteResponse = {
154
195
  tid?: string | undefined;
155
196
  };
156
197
  };
198
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
157
199
  slippageBps: number;
200
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the quote was created. */
158
201
  dateCreated: string;
202
+ /** The full request used for obtaining this quote. */
159
203
  requestBody: {
204
+ /** Swap provider. */
160
205
  provider: "UniswapX" | "UniswapClassic";
206
+ /** Id of the Dfns wallet spending the sourceAsset. */
161
207
  walletId: string;
208
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
162
209
  targetWalletId?: string | undefined;
210
+ /** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
163
211
  sourceAsset: {
164
212
  kind: "Native";
165
213
  amount: string;
@@ -168,16 +216,20 @@ export type CreateSwapQuoteResponse = {
168
216
  contract: string;
169
217
  amount: string;
170
218
  };
219
+ /** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
171
220
  targetAsset: {
172
221
  kind: "Native";
173
222
  } | {
174
223
  kind: "Erc20";
175
224
  contract: string;
176
225
  };
226
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
177
227
  slippageBps: number;
178
228
  } | {};
179
229
  requester: {
230
+ /** User (could be a service account) who requested the quote. */
180
231
  userId: string;
232
+ /** Service Account token or Personal Access token used when requesting the quote. */
181
233
  tokenId?: string | undefined;
182
234
  };
183
235
  };
@@ -185,16 +237,25 @@ export type CreateSwapQuoteRequest = {
185
237
  body: CreateSwapQuoteBody;
186
238
  };
187
239
  export type GetSwapParams = {
240
+ /** Id of the swap for which we want to get details. */
188
241
  swapId: string;
189
242
  };
190
243
  export type GetSwapResponse = {
244
+ /** Swap id. */
191
245
  id: string;
246
+ /** Id of the quote this swap is based on. */
192
247
  quoteId: string;
248
+ /** Optional user-defined reference for this Swap. */
193
249
  reference: string | null;
250
+ /** Id of the Dfns wallet spending the sourceAsset. */
194
251
  walletId: string;
252
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
195
253
  targetWalletId: string;
254
+ /** Swap status. */
196
255
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
256
+ /** Swap provider. */
197
257
  provider: "UniswapX" | "UniswapClassic";
258
+ /** The source asset for this swap transaction. */
198
259
  quotedSourceAsset: ({
199
260
  kind: "Native";
200
261
  amount: string;
@@ -211,6 +272,7 @@ export type GetSwapResponse = {
211
272
  tid?: string | undefined;
212
273
  };
213
274
  };
275
+ /** The target asset for this swap transaction. */
214
276
  quotedTargetAsset: ({
215
277
  kind: "Native";
216
278
  amount: string;
@@ -227,15 +289,25 @@ export type GetSwapResponse = {
227
289
  tid?: string | undefined;
228
290
  };
229
291
  };
292
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
230
293
  slippageBps: number;
294
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
231
295
  dateCreated: string;
296
+ /** The full request used for initiating this swap. */
232
297
  requestBody: {
298
+ /** Quote to use for this swap. */
233
299
  quoteId: string;
300
+ /** An optional reference for this Swap. */
234
301
  reference?: string | undefined;
302
+ /** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
235
303
  provider: "UniswapX" | "UniswapClassic";
304
+ /** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
236
305
  walletId: string;
306
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
237
307
  targetWalletId?: string | undefined;
308
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. Used for attesting that the swap is being created with the same parameters as the quote. */
238
309
  slippageBps: number;
310
+ /** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
239
311
  sourceAsset: {
240
312
  kind: "Native";
241
313
  amount: string;
@@ -244,6 +316,7 @@ export type GetSwapResponse = {
244
316
  contract: string;
245
317
  amount: string;
246
318
  };
319
+ /** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
247
320
  targetAsset: {
248
321
  kind: "Native";
249
322
  amount: string;
@@ -254,20 +327,27 @@ export type GetSwapResponse = {
254
327
  };
255
328
  } | {};
256
329
  requester: {
330
+ /** User (could be a service account) who requested the quote. */
257
331
  userId: string;
332
+ /** Service Account token or Personal Access token used when requesting the quote. */
258
333
  tokenId?: string | undefined;
259
334
  };
260
335
  };
261
336
  export type GetSwapRequest = GetSwapParams;
262
337
  export type GetSwapQuoteParams = {
338
+ /** The ID of the Swap Quote. */
263
339
  quoteId: string;
264
340
  };
265
341
  export type GetSwapQuoteResponse = {
342
+ /** ID of the Swap Quote. */
266
343
  id: string;
344
+ /** Id of the Dfns wallet spending the sourceAsset. */
267
345
  walletId: string;
268
346
  /** If not provided, the walletId is used as the target wallet. If provided, this field is currently required to be the same as walletId */
269
347
  targetWalletId?: string | undefined;
348
+ /** Swap provider. */
270
349
  provider: "UniswapX" | "UniswapClassic";
350
+ /** The source asset that will be spent on the swap transaction. */
271
351
  sourceAsset: ({
272
352
  kind: "Native";
273
353
  amount: string;
@@ -284,6 +364,7 @@ export type GetSwapQuoteResponse = {
284
364
  tid?: string | undefined;
285
365
  };
286
366
  };
367
+ /** The target asset that will be received with the swap transaction. */
287
368
  targetAsset: ({
288
369
  kind: "Native";
289
370
  amount: string;
@@ -300,12 +381,19 @@ export type GetSwapQuoteResponse = {
300
381
  tid?: string | undefined;
301
382
  };
302
383
  };
384
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
303
385
  slippageBps: number;
386
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the quote was created. */
304
387
  dateCreated: string;
388
+ /** The full request used for obtaining this quote. */
305
389
  requestBody: {
390
+ /** Swap provider. */
306
391
  provider: "UniswapX" | "UniswapClassic";
392
+ /** Id of the Dfns wallet spending the sourceAsset. */
307
393
  walletId: string;
394
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
308
395
  targetWalletId?: string | undefined;
396
+ /** The source asset that will be spent on the Swap transaction, following the same stucture as the [transfer API](https://docs.dfns.co/api-reference/wallets/transfer-asset). */
309
397
  sourceAsset: {
310
398
  kind: "Native";
311
399
  amount: string;
@@ -314,33 +402,48 @@ export type GetSwapQuoteResponse = {
314
402
  contract: string;
315
403
  amount: string;
316
404
  };
405
+ /** The target asset that will be received with the Swap transaction, follows the same structure as sourceAsset, but doesn't include the amount. */
317
406
  targetAsset: {
318
407
  kind: "Native";
319
408
  } | {
320
409
  kind: "Erc20";
321
410
  contract: string;
322
411
  };
412
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you're willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
323
413
  slippageBps: number;
324
414
  } | {};
325
415
  requester: {
416
+ /** User (could be a service account) who requested the quote. */
326
417
  userId: string;
418
+ /** Service Account token or Personal Access token used when requesting the quote. */
327
419
  tokenId?: string | undefined;
328
420
  };
329
421
  };
330
422
  export type GetSwapQuoteRequest = GetSwapQuoteParams;
331
423
  export type ListSwapsQuery = {
424
+ /** Maximum number of items to return. */
332
425
  limit?: number | undefined;
426
+ /** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
333
427
  paginationToken?: string | undefined;
334
428
  };
335
429
  export type ListSwapsResponse = {
430
+ /** Current page items. */
336
431
  items: {
432
+ /** Swap id. */
337
433
  id: string;
434
+ /** Id of the quote this swap is based on. */
338
435
  quoteId: string;
436
+ /** Optional user-defined reference for this Swap. */
339
437
  reference: string | null;
438
+ /** Id of the Dfns wallet spending the sourceAsset. */
340
439
  walletId: string;
440
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. */
341
441
  targetWalletId: string;
442
+ /** Swap status. */
342
443
  status: "PendingPolicyApproval" | "InProgress" | "Completed" | "Failed" | "Rejected";
444
+ /** Swap provider. */
343
445
  provider: "UniswapX" | "UniswapClassic";
446
+ /** The source asset for this swap transaction. */
344
447
  quotedSourceAsset: ({
345
448
  kind: "Native";
346
449
  amount: string;
@@ -357,6 +460,7 @@ export type ListSwapsResponse = {
357
460
  tid?: string | undefined;
358
461
  };
359
462
  };
463
+ /** The target asset for this swap transaction. */
360
464
  quotedTargetAsset: ({
361
465
  kind: "Native";
362
466
  amount: string;
@@ -373,15 +477,25 @@ export type ListSwapsResponse = {
373
477
  tid?: string | undefined;
374
478
  };
375
479
  };
480
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. */
376
481
  slippageBps: number;
482
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date (must be UTC). When the swap was initiated. */
377
483
  dateCreated: string;
484
+ /** The full request used for initiating this swap. */
378
485
  requestBody: {
486
+ /** Quote to use for this swap. */
379
487
  quoteId: string;
488
+ /** An optional reference for this Swap. */
380
489
  reference?: string | undefined;
490
+ /** Provided for this swap. Used for attesting that the swap is being created with the same parameters as the quote. */
381
491
  provider: "UniswapX" | "UniswapClassic";
492
+ /** Id of the Dfns wallet spending the sourceAsset. Used for attesting that the swap is being created with the same parameters as the quote. */
382
493
  walletId: string;
494
+ /** Id of the Dfns wallet receiving the target asset. Currently this value must be the same as the `walletId`. Used for attesting that the swap is being created with the same parameters as the quote. */
383
495
  targetWalletId?: string | undefined;
496
+ /** The slippage tolerance for this trade in [basis point](https://en.wikipedia.org/wiki/Basis_point) (BPS). Slippage tolerance defines the maximum price difference you are willing to accept during a trade from the estimated quote, ensuring you still receive at least a minimum number of tokens if the price shifts. One basis point equals one-hundredth of a percentage point, or 0.01%. Used for attesting that the swap is being created with the same parameters as the quote. */
384
497
  slippageBps: number;
498
+ /** The source asset that will be spent on the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
385
499
  sourceAsset: {
386
500
  kind: "Native";
387
501
  amount: string;
@@ -390,6 +504,7 @@ export type ListSwapsResponse = {
390
504
  contract: string;
391
505
  amount: string;
392
506
  };
507
+ /** The target asset that will be received with the Swap transaction. Used for attesting that the swap is being created with the same parameters as the quote. */
393
508
  targetAsset: {
394
509
  kind: "Native";
395
510
  amount: string;
@@ -400,10 +515,13 @@ export type ListSwapsResponse = {
400
515
  };
401
516
  } | {};
402
517
  requester: {
518
+ /** User (could be a service account) who requested the quote. */
403
519
  userId: string;
520
+ /** Service Account token or Personal Access token used when requesting the quote. */
404
521
  tokenId?: string | undefined;
405
522
  };
406
523
  }[];
524
+ /** token to use as `paginationToken` to request the next page. */
407
525
  nextPageToken?: string | undefined;
408
526
  };
409
527
  export type ListSwapsRequest = {
@@ -1,10 +1,15 @@
1
1
  export type AcceptOfferParams = {
2
+ /** Wallet id. */
2
3
  walletId: string;
4
+ /** Offer id. */
3
5
  offerId: string;
4
6
  };
5
7
  export type AcceptOfferResponse = {
8
+ /** Offer id. */
6
9
  id: string;
10
+ /** Organization id. */
7
11
  orgId: string;
12
+ /** Wallet id. */
8
13
  walletId: string;
9
14
  network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
10
15
  kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
@@ -193,6 +198,8 @@ export type CreateWalletBody = {
193
198
  scheme?: ("DH" | "ECDSA" | "EdDSA" | "Schnorr") | undefined;
194
199
  /** Use this to specify the new key curve for networks that support multiple key formats. */
195
200
  curve?: ("ed25519" | "secp256k1" | "stark") | undefined;
201
+ /** Use this to specify the key store the key material is saved to. */
202
+ storeId?: string | undefined;
196
203
  } | undefined;
197
204
  /** ID of the end user to delegate this wallet to. The wallet will only be usable by the end user. More info [here](https://docs.dfns.co/advanced/delegated-signing). */
198
205
  delegateTo?: string | undefined;
@@ -214,6 +221,7 @@ export type CreateWalletResponse = {
214
221
  address?: string | undefined;
215
222
  /** Details about the key underlying the wallet. */
216
223
  signingKey: {
224
+ /** Key id. */
217
225
  id: string;
218
226
  /** Key scheme. */
219
227
  scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
@@ -227,6 +235,8 @@ export type CreateWalletResponse = {
227
235
  status: "Active" | "Archived";
228
236
  /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
229
237
  dateCreated: string;
238
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
239
+ dateDeleted?: string | undefined;
230
240
  /** Wallet nickname. */
231
241
  name?: string | undefined;
232
242
  /** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
@@ -647,12 +657,17 @@ export type GenerateSignatureRequest = GenerateSignatureParams & {
647
657
  body: GenerateSignatureBody;
648
658
  };
649
659
  export type GetOfferParams = {
660
+ /** Wallet id. */
650
661
  walletId: string;
662
+ /** Offer id. */
651
663
  offerId: string;
652
664
  };
653
665
  export type GetOfferResponse = {
666
+ /** Offer id. */
654
667
  id: string;
668
+ /** Organization id. */
655
669
  orgId: string;
670
+ /** Wallet id. */
656
671
  walletId: string;
657
672
  network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
658
673
  kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
@@ -1422,6 +1437,7 @@ export type GetWalletResponse = {
1422
1437
  address?: string | undefined;
1423
1438
  /** Details about the key underlying the wallet. */
1424
1439
  signingKey: {
1440
+ /** Key id. */
1425
1441
  id: string;
1426
1442
  /** Key scheme. */
1427
1443
  scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
@@ -1435,6 +1451,8 @@ export type GetWalletResponse = {
1435
1451
  status: "Active" | "Archived";
1436
1452
  /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
1437
1453
  dateCreated: string;
1454
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
1455
+ dateDeleted?: string | undefined;
1438
1456
  /** Wallet nickname. */
1439
1457
  name?: string | undefined;
1440
1458
  /** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
@@ -2186,6 +2204,7 @@ export type ImportWalletResponse = {
2186
2204
  address?: string | undefined;
2187
2205
  /** Details about the key underlying the wallet. */
2188
2206
  signingKey: {
2207
+ /** Key id. */
2189
2208
  id: string;
2190
2209
  /** Key scheme. */
2191
2210
  scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
@@ -2199,6 +2218,8 @@ export type ImportWalletResponse = {
2199
2218
  status: "Active" | "Archived";
2200
2219
  /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
2201
2220
  dateCreated: string;
2221
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
2222
+ dateDeleted?: string | undefined;
2202
2223
  /** Wallet nickname. */
2203
2224
  name?: string | undefined;
2204
2225
  /** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
@@ -2214,16 +2235,23 @@ export type ImportWalletRequest = {
2214
2235
  body: ImportWalletBody;
2215
2236
  };
2216
2237
  export type ListOffersParams = {
2238
+ /** Wallet id. */
2217
2239
  walletId: string;
2218
2240
  };
2219
2241
  export type ListOffersQuery = {
2242
+ /** Maximum number of items to return. */
2220
2243
  limit?: number | undefined;
2244
+ /** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
2221
2245
  paginationToken?: string | undefined;
2222
2246
  };
2223
2247
  export type ListOffersResponse = {
2248
+ /** Current page items. */
2224
2249
  items: {
2250
+ /** Offer id. */
2225
2251
  id: string;
2252
+ /** Organization id. */
2226
2253
  orgId: string;
2254
+ /** Wallet id. */
2227
2255
  walletId: string;
2228
2256
  network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
2229
2257
  kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
@@ -2245,6 +2273,7 @@ export type ListOffersResponse = {
2245
2273
  timestamp: string;
2246
2274
  expiresAt?: string | undefined;
2247
2275
  }[];
2276
+ /** token to use as `paginationToken` to request the next page. */
2248
2277
  nextPageToken?: string | undefined;
2249
2278
  };
2250
2279
  export type ListOffersRequest = ListOffersParams & {
@@ -3061,6 +3090,7 @@ export type ListWalletsResponse = {
3061
3090
  address?: string | undefined;
3062
3091
  /** Details about the key underlying the wallet. */
3063
3092
  signingKey: {
3093
+ /** Key id. */
3064
3094
  id: string;
3065
3095
  /** Key scheme. */
3066
3096
  scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
@@ -3074,6 +3104,8 @@ export type ListWalletsResponse = {
3074
3104
  status: "Active" | "Archived";
3075
3105
  /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
3076
3106
  dateCreated: string;
3107
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
3108
+ dateDeleted?: string | undefined;
3077
3109
  /** Wallet nickname. */
3078
3110
  name?: string | undefined;
3079
3111
  /** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
@@ -3091,12 +3123,17 @@ export type ListWalletsRequest = {
3091
3123
  query?: ListWalletsQuery;
3092
3124
  };
3093
3125
  export type RejectOfferParams = {
3126
+ /** Wallet id. */
3094
3127
  walletId: string;
3128
+ /** Offer id. */
3095
3129
  offerId: string;
3096
3130
  };
3097
3131
  export type RejectOfferResponse = {
3132
+ /** Offer id. */
3098
3133
  id: string;
3134
+ /** Organization id. */
3099
3135
  orgId: string;
3136
+ /** Wallet id. */
3100
3137
  walletId: string;
3101
3138
  network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
3102
3139
  kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
@@ -4017,6 +4054,7 @@ export type UpdateWalletResponse = {
4017
4054
  address?: string | undefined;
4018
4055
  /** Details about the key underlying the wallet. */
4019
4056
  signingKey: {
4057
+ /** Key id. */
4020
4058
  id: string;
4021
4059
  /** Key scheme. */
4022
4060
  scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
@@ -4030,6 +4068,8 @@ export type UpdateWalletResponse = {
4030
4068
  status: "Active" | "Archived";
4031
4069
  /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
4032
4070
  dateCreated: string;
4071
+ /** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
4072
+ dateDeleted?: string | undefined;
4033
4073
  /** Wallet nickname. */
4034
4074
  name?: string | undefined;
4035
4075
  /** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfns/sdk",
3
- "version": "0.7.14-rc.0",
3
+ "version": "0.7.14",
4
4
  "dependencies": {
5
5
  "buffer": "^6.0.3",
6
6
  "cross-fetch": "^3.1.6"