@dfns/sdk 0.1.3-rc.1 → 0.1.3-rc.3

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.
@@ -9711,6 +9711,9 @@ export declare enum IdentityIssuer {
9711
9711
  Dfns = "Dfns",
9712
9712
  Auth0 = "Auth0"
9713
9713
  }
9714
+ /**
9715
+ * @deprecated legacy network names
9716
+ */
9714
9717
  export declare enum BlockchainNetwork {
9715
9718
  ADA = "ADA",
9716
9719
  ALGO = "ALGO",
@@ -57529,7 +57529,9 @@ var IdentityIssuer;
57529
57529
  // FIXME: Missing documentation for Auth0
57530
57530
  IdentityIssuer["Auth0"] = "Auth0";
57531
57531
  })(IdentityIssuer || (exports.IdentityIssuer = IdentityIssuer = {}));
57532
- // FIXME: Missing documentation for BlockchainNetwork
57532
+ /**
57533
+ * @deprecated legacy network names
57534
+ */
57533
57535
  var BlockchainNetwork;
57534
57536
  (function (BlockchainNetwork) {
57535
57537
  //Cardano native currency
@@ -164,18 +164,6 @@ export type WalletFilter = {
164
164
  kind: PolicyObjectFilterKind.Wallet;
165
165
  walletIds?: EntityId[];
166
166
  };
167
- export type PolicyFilter = {
168
- kind: PolicyObjectFilterKind.Policy;
169
- policyIds?: EntityId[];
170
- };
171
- export type PolicyControlFilter = {
172
- kind: PolicyObjectFilterKind.PolicyControl;
173
- policyControlIds?: EntityId[];
174
- };
175
- export type PolicyRuleFilter = {
176
- kind: PolicyObjectFilterKind.PolicyRule;
177
- policyRuleIds?: EntityId[];
178
- };
179
167
  export type CreatePolicyInput = {
180
168
  activityKind: PolicyActivityKind;
181
169
  description: string;
@@ -221,17 +209,12 @@ export type UpdatePolicyControlConfiguration = UpdateRequestApprovalPcConf | Upd
221
209
  export type CreatePolicyControlConfiguration = CreateRequestApprovalPcConf | CreateNotifyAndAuditPcConf;
222
210
  export type PolicyRuleConfiguration = AmountLimitPrConf | TransferLimitPrConf | OutgoingVelocityPrConf | EmptyConfiguration;
223
211
  export type PolicyControlConfiguration = NotifyAndAuditPcConf | RequestApprovalPcConf;
224
- export type PolicyObjectFilter = AssetAccountFilter | PublicKeyFilter | WalletFilter | PolicyFilter | PolicyControlFilter | PolicyRuleFilter;
212
+ export type PolicyObjectFilter = AssetAccountFilter | PublicKeyFilter | WalletFilter;
225
213
  export declare enum PolicyActivityKind {
226
214
  CreatingSignature = "CreatingSignature",
227
215
  TransactionInitiation = "TransactionInitiation",
228
216
  PaymentInitiation = "PaymentInitiation",
229
- WalletsTransferAsset = "WalletsTransferAsset",
230
- WalletsBroadcastTransaction = "WalletsBroadcastTransaction",
231
- WalletsGenerateSignature = "WalletsGenerateSignature",
232
- PoliciesArchive = "PoliciesArchive",
233
- PolicyRulesArchive = "PolicyRulesArchive",
234
- PolicyControlsArchive = "PolicyControlsArchive"
217
+ WalletsTransferAsset = "WalletsTransferAsset"
235
218
  }
236
219
  export declare enum PolicyStatus {
237
220
  Enabled = "Enabled",
@@ -268,8 +251,5 @@ export declare enum PolicyRuleStatus {
268
251
  export declare enum PolicyObjectFilterKind {
269
252
  AssetAccount = "AssetAccount",
270
253
  PublicKey = "PublicKey",
271
- Wallet = "Wallet",
272
- Policy = "Policy",
273
- PolicyControl = "PolicyControl",
274
- PolicyRule = "PolicyRule"
254
+ Wallet = "Wallet"
275
255
  }
@@ -12,16 +12,6 @@ var PolicyActivityKind;
12
12
  PolicyActivityKind["PaymentInitiation"] = "PaymentInitiation";
13
13
  // FIXME: Missing documentation for WalletsTransferAsset
14
14
  PolicyActivityKind["WalletsTransferAsset"] = "WalletsTransferAsset";
15
- // FIXME: Missing documentation for WalletsBroadcastTransaction
16
- PolicyActivityKind["WalletsBroadcastTransaction"] = "WalletsBroadcastTransaction";
17
- // FIXME: Missing documentation for WalletsGenerateSignature
18
- PolicyActivityKind["WalletsGenerateSignature"] = "WalletsGenerateSignature";
19
- // FIXME: Missing documentation for PoliciesArchive
20
- PolicyActivityKind["PoliciesArchive"] = "PoliciesArchive";
21
- // FIXME: Missing documentation for PolicyRulesArchive
22
- PolicyActivityKind["PolicyRulesArchive"] = "PolicyRulesArchive";
23
- // FIXME: Missing documentation for PolicyControlsArchive
24
- PolicyActivityKind["PolicyControlsArchive"] = "PolicyControlsArchive";
25
15
  })(PolicyActivityKind || (exports.PolicyActivityKind = PolicyActivityKind = {}));
26
16
  // FIXME: Missing documentation for PolicyStatus
27
17
  var PolicyStatus;
@@ -90,10 +80,4 @@ var PolicyObjectFilterKind;
90
80
  PolicyObjectFilterKind["PublicKey"] = "PublicKey";
91
81
  // FIXME: Missing documentation for Wallet
92
82
  PolicyObjectFilterKind["Wallet"] = "Wallet";
93
- // FIXME: Missing documentation for Policy
94
- PolicyObjectFilterKind["Policy"] = "Policy";
95
- // FIXME: Missing documentation for PolicyControl
96
- PolicyObjectFilterKind["PolicyControl"] = "PolicyControl";
97
- // FIXME: Missing documentation for PolicyRule
98
- PolicyObjectFilterKind["PolicyRule"] = "PolicyRule";
99
83
  })(PolicyObjectFilterKind || (exports.PolicyObjectFilterKind = PolicyObjectFilterKind = {}));
@@ -1,12 +1,21 @@
1
1
  import { EntityId } from '../Foundations';
2
+ /**
3
+ * @deprecated import equivalent type from '@dfns/sdk/types/signers' instead
4
+ */
2
5
  export type Cluster = {
3
6
  clusterId: EntityId;
4
7
  signers: Signer[];
5
8
  };
9
+ /**
10
+ * @deprecated import equivalent type from '@dfns/sdk/types/signers' instead
11
+ */
6
12
  export type Signer = {
7
13
  signerId: string;
8
14
  encryptionKey: string;
9
15
  };
16
+ /**
17
+ * @deprecated import equivalent type from '@dfns/sdk/types/signers' instead
18
+ */
10
19
  export type ClusterList = {
11
20
  clusters: Cluster[];
12
21
  };
@@ -1,25 +1,40 @@
1
1
  import { Amount, BlockchainAddress, EntityId, IntegerPositiveStrict, IsoDatetime, Tag } from '../Foundations';
2
+ /**
3
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
4
+ */
2
5
  export type TransferNativeAsset = {
3
6
  kind: TransferKind.Native;
4
7
  to: BlockchainAddress;
5
8
  amount: Amount;
6
9
  };
10
+ /**
11
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
12
+ */
7
13
  export type TransferErc20Asset = {
8
14
  kind: TransferKind.Erc20;
9
15
  contract: BlockchainAddress;
10
16
  to: BlockchainAddress;
11
17
  amount: Amount;
12
18
  };
19
+ /**
20
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
21
+ */
13
22
  export type TransferErc721Asset = {
14
23
  kind: TransferKind.Erc721;
15
24
  contract: BlockchainAddress;
16
25
  to: BlockchainAddress;
17
26
  tokenId: string;
18
27
  };
28
+ /**
29
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
30
+ */
19
31
  export type BroadcastTransaction = {
20
32
  kind: TransactionKind.Transaction;
21
33
  transaction: string;
22
34
  };
35
+ /**
36
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
37
+ */
23
38
  export type BroadcastEvmTransaction = {
24
39
  kind: TransactionKind.Evm;
25
40
  to?: BlockchainAddress;
@@ -27,6 +42,9 @@ export type BroadcastEvmTransaction = {
27
42
  data?: string;
28
43
  nonce?: number;
29
44
  };
45
+ /**
46
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
47
+ */
30
48
  export type BroadcastEip1559Transaction = {
31
49
  kind: TransactionKind.Eip1559;
32
50
  to?: BlockchainAddress;
@@ -37,6 +55,9 @@ export type BroadcastEip1559Transaction = {
37
55
  maxPriorityFeePerGas?: Amount;
38
56
  maxFeePerGas?: Amount;
39
57
  };
58
+ /**
59
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
60
+ */
40
61
  export type BroadcastEvmLegacyTransaction = {
41
62
  kind: TransactionKind.EvmLegacy;
42
63
  to?: BlockchainAddress;
@@ -46,22 +67,37 @@ export type BroadcastEvmLegacyTransaction = {
46
67
  gasLimit?: Amount;
47
68
  gasPrice?: Amount;
48
69
  };
70
+ /**
71
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
72
+ */
49
73
  export type BroadcastPsbt = {
50
74
  kind: TransactionKind.Psbt;
51
75
  psbt: string;
52
76
  };
77
+ /**
78
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
79
+ */
53
80
  export type SignHash = {
54
81
  kind: SignatureKind.Hash;
55
82
  hash: string;
56
83
  };
84
+ /**
85
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
86
+ */
57
87
  export type SignMessage = {
58
88
  kind: SignatureKind.Message;
59
89
  message: string;
60
90
  };
91
+ /**
92
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
93
+ */
61
94
  export type SignTransaction = {
62
95
  kind: SignatureKind.Transaction;
63
96
  transaction: string;
64
97
  };
98
+ /**
99
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
100
+ */
65
101
  export type Eip712Domain = {
66
102
  name?: string;
67
103
  version?: string;
@@ -69,16 +105,25 @@ export type Eip712Domain = {
69
105
  verifyingContract?: BlockchainAddress;
70
106
  salt?: string;
71
107
  };
108
+ /**
109
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
110
+ */
72
111
  export type SignEip712TypedData = {
73
112
  kind: SignatureKind.Eip712;
74
113
  types: Record<string, unknown>;
75
114
  domain: Eip712Domain;
76
115
  message: Record<string, unknown>;
77
116
  };
117
+ /**
118
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
119
+ */
78
120
  export type SignPsbt = {
79
121
  kind: SignatureKind.Psbt;
80
122
  psbt: string;
81
123
  };
124
+ /**
125
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
126
+ */
82
127
  export type EncryptedKeyShare = {
83
128
  /**
84
129
  * Base64-encoded ID of the signer where the encrypted key share comes from.
@@ -89,6 +134,9 @@ export type EncryptedKeyShare = {
89
134
  */
90
135
  encryptedKeyShare: string;
91
136
  };
137
+ /**
138
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
139
+ */
92
140
  export type SupportedExportScheme = {
93
141
  /**
94
142
  * Base64-encoded ID of the signer where the encrypted key share comes from.
@@ -99,24 +147,36 @@ export type SupportedExportScheme = {
99
147
  */
100
148
  protocol: KeyProtocol;
101
149
  };
150
+ /**
151
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
152
+ */
102
153
  export type TransferTrc10Asset = {
103
154
  kind: TransferKind.Trc10;
104
155
  tokenId: string;
105
156
  to: BlockchainAddress;
106
157
  amount: Amount;
107
158
  };
159
+ /**
160
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
161
+ */
108
162
  export type TransferTrc20Asset = {
109
163
  kind: TransferKind.Trc20;
110
164
  contract: BlockchainAddress;
111
165
  to: BlockchainAddress;
112
166
  amount: Amount;
113
167
  };
168
+ /**
169
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
170
+ */
114
171
  export type TransferTrc721Asset = {
115
172
  kind: TransferKind.Trc721;
116
173
  contract: BlockchainAddress;
117
174
  to: BlockchainAddress;
118
175
  tokenId: string;
119
176
  };
177
+ /**
178
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
179
+ */
120
180
  export type Wallet = {
121
181
  id: EntityId;
122
182
  network: BlockchainNetwork;
@@ -140,16 +200,25 @@ export type Wallet = {
140
200
  */
141
201
  exported?: boolean;
142
202
  };
203
+ /**
204
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
205
+ */
143
206
  export type SigningKey = {
144
207
  scheme: KeyScheme;
145
208
  curve: KeyCurve;
146
209
  publicKey: string;
147
210
  };
211
+ /**
212
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
213
+ */
148
214
  export type WalletAssets = {
149
215
  walletId: EntityId;
150
216
  network: BlockchainNetwork;
151
217
  assets: WalletAsset[];
152
218
  };
219
+ /**
220
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
221
+ */
153
222
  export type WalletAsset = {
154
223
  kind: BalanceKind;
155
224
  contract?: string;
@@ -158,11 +227,17 @@ export type WalletAsset = {
158
227
  verified?: boolean;
159
228
  balance: Amount;
160
229
  };
230
+ /**
231
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
232
+ */
161
233
  export type WalletNfts = {
162
234
  walletId: EntityId;
163
235
  network: BlockchainNetwork;
164
236
  nfts: WalletNft[];
165
237
  };
238
+ /**
239
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
240
+ */
166
241
  export type WalletNft = {
167
242
  kind: BalanceKind;
168
243
  contract?: string;
@@ -171,10 +246,16 @@ export type WalletNft = {
171
246
  tokenIds: string[];
172
247
  count: number;
173
248
  };
249
+ /**
250
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
251
+ */
174
252
  export type PaginatedWalletList = {
175
253
  items: Wallet[];
176
254
  nextPageToken?: string;
177
255
  };
256
+ /**
257
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
258
+ */
178
259
  export type NativeTransferEvent = {
179
260
  kind: EventKind.NativeTransfer;
180
261
  walletId: EntityId;
@@ -192,6 +273,9 @@ export type NativeTransferEvent = {
192
273
  to: BlockchainAddress;
193
274
  value: Amount;
194
275
  };
276
+ /**
277
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
278
+ */
195
279
  export type Erc20TransferEvent = {
196
280
  kind: EventKind.Erc20Transfer;
197
281
  walletId: EntityId;
@@ -210,6 +294,9 @@ export type Erc20TransferEvent = {
210
294
  to: BlockchainAddress;
211
295
  value: Amount;
212
296
  };
297
+ /**
298
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
299
+ */
213
300
  export type Erc721TransferEvent = {
214
301
  kind: EventKind.Erc721Transfer;
215
302
  walletId: EntityId;
@@ -227,12 +314,18 @@ export type Erc721TransferEvent = {
227
314
  to: BlockchainAddress;
228
315
  tokenId: string;
229
316
  };
317
+ /**
318
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
319
+ */
230
320
  export type PaginatedEventHistory = {
231
321
  walletId: EntityId;
232
322
  network: BlockchainNetwork;
233
323
  items: BlockchainEvent[];
234
324
  nextPageToken?: string;
235
325
  };
326
+ /**
327
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
328
+ */
236
329
  export type TransferRequest = {
237
330
  id: EntityId;
238
331
  walletId: EntityId;
@@ -249,11 +342,17 @@ export type TransferRequest = {
249
342
  reason?: string;
250
343
  metadata: TransferRequestMetadata;
251
344
  };
345
+ /**
346
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
347
+ */
252
348
  export type PaginatedTransferList = {
253
349
  walletId: EntityId;
254
350
  items: TransferRequest[];
255
351
  nextPageToken?: string;
256
352
  };
353
+ /**
354
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
355
+ */
257
356
  export type TransactionRequest = {
258
357
  id: EntityId;
259
358
  walletId: EntityId;
@@ -269,17 +368,26 @@ export type TransactionRequest = {
269
368
  dateConfirmed?: IsoDatetime;
270
369
  reason?: string;
271
370
  };
371
+ /**
372
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
373
+ */
272
374
  export type PaginatedTransactionList = {
273
375
  walletId: EntityId;
274
376
  items: TransactionRequest[];
275
377
  nextPageToken?: string;
276
378
  };
379
+ /**
380
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
381
+ */
277
382
  export type Signature = {
278
383
  r: string;
279
384
  s: string;
280
385
  recid?: number;
281
386
  encoded?: string;
282
387
  };
388
+ /**
389
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
390
+ */
283
391
  export type SignatureRequest = {
284
392
  id: EntityId;
285
393
  walletId: EntityId;
@@ -298,24 +406,39 @@ export type SignatureRequest = {
298
406
  dateConfirmed?: IsoDatetime;
299
407
  reason?: string;
300
408
  };
409
+ /**
410
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
411
+ */
301
412
  export type PaginatedSignatureList = {
302
413
  walletId: EntityId;
303
414
  items: SignatureRequest[];
304
415
  nextPageToken?: string;
305
416
  };
417
+ /**
418
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
419
+ */
306
420
  export type RequesterIdentity = {
307
421
  userId: EntityId;
308
422
  tokenId?: EntityId;
309
423
  appId?: EntityId;
310
424
  };
425
+ /**
426
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
427
+ */
311
428
  export type TransferRequestMetadata = {
312
429
  asset: AssetMetadata;
313
430
  };
431
+ /**
432
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
433
+ */
314
434
  export type AssetMetadata = {
315
435
  symbol?: string;
316
436
  decimals?: number;
317
437
  verified?: boolean;
318
438
  };
439
+ /**
440
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
441
+ */
319
442
  export type ExportedSigningKey = {
320
443
  publicKey: string;
321
444
  /**
@@ -329,10 +452,16 @@ export type ExportedSigningKey = {
329
452
  */
330
453
  encryptedKeyShares: EncryptedKeyShare[];
331
454
  };
455
+ /**
456
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
457
+ */
332
458
  export type DelegateWalletResult = {
333
459
  walletId: EntityId;
334
460
  status: string;
335
461
  };
462
+ /**
463
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
464
+ */
336
465
  export type CreateWalletBody = {
337
466
  network: BlockchainNetwork;
338
467
  /**
@@ -343,6 +472,9 @@ export type CreateWalletBody = {
343
472
  tags?: Tag[];
344
473
  name?: string;
345
474
  };
475
+ /**
476
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
477
+ */
346
478
  export type ImportWalletBody = {
347
479
  network: BlockchainNetwork;
348
480
  externalId?: string;
@@ -353,6 +485,9 @@ export type ImportWalletBody = {
353
485
  curve: KeyCurve;
354
486
  encryptedKeyShares: EncryptedKeyShare[];
355
487
  };
488
+ /**
489
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
490
+ */
356
491
  export type ExportWalletBody = {
357
492
  /**
358
493
  * Encryption public key that will be used by signers to encrypt the exported wallet key shares. The purpose of encrypting key shares is to have them extra-safe and not usable in any place in the system until they are safely returned back to the client issuing the export command.
@@ -363,16 +498,34 @@ export type ExportWalletBody = {
363
498
  */
364
499
  supportedSchemes: SupportedExportScheme[];
365
500
  };
501
+ /**
502
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
503
+ */
366
504
  export type DelegateWalletBody = {
367
505
  /**
368
506
  * Encryption public key that will be used by signers to encrypt the exported wallet key shares. The purpose of encrypting key shares is to have them extra-safe and not usable in any place in the system until they are safely returned back to the client issuing the export command.
369
507
  */
370
508
  userId: EntityId;
371
509
  };
510
+ /**
511
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
512
+ */
372
513
  export type TransferAssetBody = TransferNativeAsset | TransferErc20Asset | TransferErc721Asset | TransferTrc10Asset | TransferTrc20Asset | TransferTrc721Asset;
514
+ /**
515
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
516
+ */
373
517
  export type BroadcastTransactionBody = BroadcastTransaction | BroadcastEvmTransaction | BroadcastEip1559Transaction | BroadcastEvmLegacyTransaction | BroadcastPsbt;
518
+ /**
519
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
520
+ */
374
521
  export type GenerateSignatureBody = SignHash | SignMessage | SignTransaction | SignEip712TypedData | SignPsbt;
522
+ /**
523
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
524
+ */
375
525
  export type BlockchainEvent = NativeTransferEvent | Erc20TransferEvent | Erc721TransferEvent;
526
+ /**
527
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
528
+ */
376
529
  export declare enum TransferKind {
377
530
  Native = "Native",
378
531
  Erc20 = "Erc20",
@@ -381,6 +534,9 @@ export declare enum TransferKind {
381
534
  Trc20 = "Trc20",
382
535
  Trc721 = "Trc721"
383
536
  }
537
+ /**
538
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
539
+ */
384
540
  export declare enum TransactionKind {
385
541
  Transaction = "Transaction",
386
542
  Evm = "Evm",
@@ -388,6 +544,9 @@ export declare enum TransactionKind {
388
544
  EvmLegacy = "EvmLegacy",
389
545
  Psbt = "Psbt"
390
546
  }
547
+ /**
548
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
549
+ */
391
550
  export declare enum SignatureKind {
392
551
  Hash = "Hash",
393
552
  Message = "Message",
@@ -395,37 +554,61 @@ export declare enum SignatureKind {
395
554
  Eip712 = "Eip712",
396
555
  Psbt = "Psbt"
397
556
  }
557
+ /**
558
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
559
+ */
398
560
  export declare enum WalletStatus {
399
561
  Active = "Active",
400
562
  Archived = "Archived"
401
563
  }
564
+ /**
565
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
566
+ */
402
567
  export declare enum KeyScheme {
403
568
  ECDSA = "ECDSA",
404
569
  EdDSA = "EdDSA"
405
570
  }
571
+ /**
572
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
573
+ */
406
574
  export declare enum KeyCurve {
407
575
  ed25519 = "ed25519",
408
576
  secp256k1 = "secp256k1",
409
577
  stark = "stark"
410
578
  }
579
+ /**
580
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
581
+ */
411
582
  export declare enum KeyProtocol {
412
583
  CGGMP21 = "CGGMP21",
413
584
  BINANCE_EDDSA = "BINANCE_EDDSA"
414
585
  }
586
+ /**
587
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
588
+ */
415
589
  export declare enum BalanceKind {
416
590
  Native = "Native",
417
591
  Erc20 = "Erc20",
418
592
  Erc721 = "Erc721"
419
593
  }
594
+ /**
595
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
596
+ */
420
597
  export declare enum EventKind {
421
598
  NativeTransfer = "NativeTransfer",
422
599
  Erc20Transfer = "Erc20Transfer",
423
600
  Erc721Transfer = "Erc721Transfer"
424
601
  }
602
+ /**
603
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
604
+ */
425
605
  export declare enum TransferDirection {
426
606
  In = "In",
427
607
  Out = "Out"
428
608
  }
609
+ /**
610
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
611
+ */
429
612
  export declare enum TransferStatus {
430
613
  Pending = "Pending",
431
614
  Executing = "Executing",
@@ -434,6 +617,9 @@ export declare enum TransferStatus {
434
617
  Failed = "Failed",
435
618
  Rejected = "Rejected"
436
619
  }
620
+ /**
621
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
622
+ */
437
623
  export declare enum TransactionStatus {
438
624
  Pending = "Pending",
439
625
  Executing = "Executing",
@@ -442,6 +628,9 @@ export declare enum TransactionStatus {
442
628
  Failed = "Failed",
443
629
  Rejected = "Rejected"
444
630
  }
631
+ /**
632
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
633
+ */
445
634
  export declare enum SignatureStatus {
446
635
  Pending = "Pending",
447
636
  Executing = "Executing",
@@ -450,6 +639,9 @@ export declare enum SignatureStatus {
450
639
  Failed = "Failed",
451
640
  Rejected = "Rejected"
452
641
  }
642
+ /**
643
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
644
+ */
453
645
  export declare enum BlockchainNetwork {
454
646
  ArbitrumOne = "ArbitrumOne",
455
647
  ArbitrumGoerli = "ArbitrumGoerli",
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BlockchainNetwork = exports.SignatureStatus = exports.TransactionStatus = exports.TransferStatus = exports.TransferDirection = exports.EventKind = exports.BalanceKind = exports.KeyProtocol = exports.KeyCurve = exports.KeyScheme = exports.WalletStatus = exports.SignatureKind = exports.TransactionKind = exports.TransferKind = void 0;
4
- // FIXME: Missing documentation for TransferKind
4
+ /**
5
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
6
+ */
5
7
  var TransferKind;
6
8
  (function (TransferKind) {
7
9
  // FIXME: Missing documentation for Native
@@ -17,7 +19,9 @@ var TransferKind;
17
19
  // FIXME: Missing documentation for Trc721
18
20
  TransferKind["Trc721"] = "Trc721";
19
21
  })(TransferKind || (exports.TransferKind = TransferKind = {}));
20
- // FIXME: Missing documentation for TransactionKind
22
+ /**
23
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
24
+ */
21
25
  var TransactionKind;
22
26
  (function (TransactionKind) {
23
27
  // FIXME: Missing documentation for Transaction
@@ -31,7 +35,9 @@ var TransactionKind;
31
35
  // FIXME: Missing documentation for Psbt
32
36
  TransactionKind["Psbt"] = "Psbt";
33
37
  })(TransactionKind || (exports.TransactionKind = TransactionKind = {}));
34
- // FIXME: Missing documentation for SignatureKind
38
+ /**
39
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
40
+ */
35
41
  var SignatureKind;
36
42
  (function (SignatureKind) {
37
43
  // FIXME: Missing documentation for Hash
@@ -45,7 +51,9 @@ var SignatureKind;
45
51
  // FIXME: Missing documentation for Psbt
46
52
  SignatureKind["Psbt"] = "Psbt";
47
53
  })(SignatureKind || (exports.SignatureKind = SignatureKind = {}));
48
- // FIXME: Missing documentation for WalletStatus
54
+ /**
55
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
56
+ */
49
57
  var WalletStatus;
50
58
  (function (WalletStatus) {
51
59
  // FIXME: Missing documentation for Active
@@ -53,7 +61,9 @@ var WalletStatus;
53
61
  // FIXME: Missing documentation for Archived
54
62
  WalletStatus["Archived"] = "Archived";
55
63
  })(WalletStatus || (exports.WalletStatus = WalletStatus = {}));
56
- // FIXME: Missing documentation for KeyScheme
64
+ /**
65
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
66
+ */
57
67
  var KeyScheme;
58
68
  (function (KeyScheme) {
59
69
  // FIXME: Missing documentation for ECDSA
@@ -61,7 +71,9 @@ var KeyScheme;
61
71
  // FIXME: Missing documentation for EdDSA
62
72
  KeyScheme["EdDSA"] = "EdDSA";
63
73
  })(KeyScheme || (exports.KeyScheme = KeyScheme = {}));
64
- // FIXME: Missing documentation for KeyCurve
74
+ /**
75
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
76
+ */
65
77
  var KeyCurve;
66
78
  (function (KeyCurve) {
67
79
  // FIXME: Missing documentation for ed25519
@@ -71,7 +83,9 @@ var KeyCurve;
71
83
  // FIXME: Missing documentation for stark
72
84
  KeyCurve["stark"] = "stark";
73
85
  })(KeyCurve || (exports.KeyCurve = KeyCurve = {}));
74
- // FIXME: Missing documentation for KeyProtocol
86
+ /**
87
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
88
+ */
75
89
  var KeyProtocol;
76
90
  (function (KeyProtocol) {
77
91
  // FIXME: Missing documentation for CGGMP21
@@ -79,7 +93,9 @@ var KeyProtocol;
79
93
  // FIXME: Missing documentation for BINANCE_EDDSA
80
94
  KeyProtocol["BINANCE_EDDSA"] = "BINANCE_EDDSA";
81
95
  })(KeyProtocol || (exports.KeyProtocol = KeyProtocol = {}));
82
- // FIXME: Missing documentation for BalanceKind
96
+ /**
97
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
98
+ */
83
99
  var BalanceKind;
84
100
  (function (BalanceKind) {
85
101
  // FIXME: Missing documentation for Native
@@ -89,7 +105,9 @@ var BalanceKind;
89
105
  // FIXME: Missing documentation for Erc721
90
106
  BalanceKind["Erc721"] = "Erc721";
91
107
  })(BalanceKind || (exports.BalanceKind = BalanceKind = {}));
92
- // FIXME: Missing documentation for EventKind
108
+ /**
109
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
110
+ */
93
111
  var EventKind;
94
112
  (function (EventKind) {
95
113
  // FIXME: Missing documentation for NativeTransfer
@@ -99,7 +117,9 @@ var EventKind;
99
117
  // FIXME: Missing documentation for Erc721Transfer
100
118
  EventKind["Erc721Transfer"] = "Erc721Transfer";
101
119
  })(EventKind || (exports.EventKind = EventKind = {}));
102
- // FIXME: Missing documentation for TransferDirection
120
+ /**
121
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
122
+ */
103
123
  var TransferDirection;
104
124
  (function (TransferDirection) {
105
125
  // FIXME: Missing documentation for In
@@ -107,7 +127,9 @@ var TransferDirection;
107
127
  // FIXME: Missing documentation for Out
108
128
  TransferDirection["Out"] = "Out";
109
129
  })(TransferDirection || (exports.TransferDirection = TransferDirection = {}));
110
- // FIXME: Missing documentation for TransferStatus
130
+ /**
131
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
132
+ */
111
133
  var TransferStatus;
112
134
  (function (TransferStatus) {
113
135
  // FIXME: Missing documentation for Pending
@@ -123,7 +145,9 @@ var TransferStatus;
123
145
  // FIXME: Missing documentation for Rejected
124
146
  TransferStatus["Rejected"] = "Rejected";
125
147
  })(TransferStatus || (exports.TransferStatus = TransferStatus = {}));
126
- // FIXME: Missing documentation for TransactionStatus
148
+ /**
149
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
150
+ */
127
151
  var TransactionStatus;
128
152
  (function (TransactionStatus) {
129
153
  // FIXME: Missing documentation for Pending
@@ -139,7 +163,9 @@ var TransactionStatus;
139
163
  // FIXME: Missing documentation for Rejected
140
164
  TransactionStatus["Rejected"] = "Rejected";
141
165
  })(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
142
- // FIXME: Missing documentation for SignatureStatus
166
+ /**
167
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
168
+ */
143
169
  var SignatureStatus;
144
170
  (function (SignatureStatus) {
145
171
  // FIXME: Missing documentation for Pending
@@ -155,7 +181,9 @@ var SignatureStatus;
155
181
  // FIXME: Missing documentation for Rejected
156
182
  SignatureStatus["Rejected"] = "Rejected";
157
183
  })(SignatureStatus || (exports.SignatureStatus = SignatureStatus = {}));
158
- // FIXME: Missing documentation for BlockchainNetwork
184
+ /**
185
+ * @deprecated import equivalent type from '@dfns/sdk/types/wallets' instead
186
+ */
159
187
  var BlockchainNetwork;
160
188
  (function (BlockchainNetwork) {
161
189
  // FIXME: Missing documentation for ArbitrumOne
package/package.json CHANGED
@@ -1,18 +1,11 @@
1
1
  {
2
2
  "name": "@dfns/sdk",
3
- "version": "0.1.3-rc.1",
3
+ "version": "0.1.3-rc.3",
4
4
  "dependencies": {
5
5
  "buffer": "6.0.3",
6
6
  "cross-fetch": "3.1.6",
7
7
  "uuid": "9.0.0"
8
8
  },
9
- "exports": {
10
- "./package.json": "./package.json",
11
- ".": "./index.js",
12
- "./types/signers": "./types/signers.js",
13
- "./types/wallets": "./types/wallets.js",
14
- "./types/webhooks": "./types/webhooks.js"
15
- },
16
9
  "main": "./index.js",
17
10
  "type": "commonjs"
18
11
  }
package/utils/fetch.js CHANGED
@@ -32,8 +32,12 @@ const errorHandler = (fetch) => {
32
32
  }
33
33
  else {
34
34
  const body = await response.json();
35
- const errorMessage = body?.error?.message || body?.message || JSON.stringify(body);
36
- throw new dfnsError_1.DfnsError(response.status, errorMessage, body.error);
35
+ const message = body?.error?.message ?? body?.message;
36
+ throw new dfnsError_1.DfnsError(response.status, message, {
37
+ url: response.url,
38
+ headers: response.headers,
39
+ body: response.body,
40
+ });
37
41
  }
38
42
  };
39
43
  };
@@ -0,0 +1,4 @@
1
+ export * from './base64';
2
+ export * from './fetch';
3
+ export * from './nonce';
4
+ export * from './url';
package/utils/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./base64"), exports);
18
+ __exportStar(require("./fetch"), exports);
19
+ __exportStar(require("./nonce"), exports);
20
+ __exportStar(require("./url"), exports);