@metamask-previews/keyring-api 23.2.0-c42f34c → 23.2.0-e5bc458

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 (46) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/api/account.d.cts +2 -2
  3. package/dist/api/account.d.mts +2 -2
  4. package/dist/api/asset.d.cts +2 -2
  5. package/dist/api/asset.d.mts +2 -2
  6. package/dist/api/request.d.cts +3 -3
  7. package/dist/api/request.d.mts +3 -3
  8. package/dist/api/response.d.cts +1 -1
  9. package/dist/api/response.d.mts +1 -1
  10. package/dist/api/transaction.cjs +19 -3
  11. package/dist/api/transaction.cjs.map +1 -1
  12. package/dist/api/transaction.d.cts +109 -77
  13. package/dist/api/transaction.d.cts.map +1 -1
  14. package/dist/api/transaction.d.mts +109 -77
  15. package/dist/api/transaction.d.mts.map +1 -1
  16. package/dist/api/transaction.mjs +19 -3
  17. package/dist/api/transaction.mjs.map +1 -1
  18. package/dist/btc/types.d.cts +8 -8
  19. package/dist/btc/types.d.mts +8 -8
  20. package/dist/eth/erc4337/types.d.cts +3 -3
  21. package/dist/eth/erc4337/types.d.mts +3 -3
  22. package/dist/eth/rpc/params.d.cts +29 -29
  23. package/dist/eth/rpc/params.d.mts +29 -29
  24. package/dist/eth/types.d.cts +4 -4
  25. package/dist/eth/types.d.mts +4 -4
  26. package/dist/events.d.cts +59 -56
  27. package/dist/events.d.cts.map +1 -1
  28. package/dist/events.d.mts +59 -56
  29. package/dist/events.d.mts.map +1 -1
  30. package/dist/rpc.d.cts +137 -131
  31. package/dist/rpc.d.cts.map +1 -1
  32. package/dist/rpc.d.mts +137 -131
  33. package/dist/rpc.d.mts.map +1 -1
  34. package/dist/sol/types.d.cts +2 -2
  35. package/dist/sol/types.d.mts +2 -2
  36. package/dist/trx/types.d.cts +2 -2
  37. package/dist/trx/types.d.mts +2 -2
  38. package/dist/v2/api/create-account/bip44.d.cts +1 -1
  39. package/dist/v2/api/create-account/bip44.d.mts +1 -1
  40. package/dist/v2/api/create-account/index.d.cts +1 -1
  41. package/dist/v2/api/create-account/index.d.mts +1 -1
  42. package/dist/v2/api/keyring-rpc.d.cts +28 -28
  43. package/dist/v2/api/keyring-rpc.d.mts +28 -28
  44. package/dist/xlm/types.d.cts +2 -2
  45. package/dist/xlm/types.d.mts +2 -2
  46. package/package.json +1 -1
@@ -88,6 +88,10 @@ export declare enum TransactionType {
88
88
  * Represents a token approval transaction.
89
89
  */
90
90
  TokenApprove = "token:approve",
91
+ /**
92
+ * Represents a token disapproval transaction.
93
+ */
94
+ TokenDisapprove = "token:disapprove",
91
95
  /**
92
96
  * The transaction type is unknown. It's not possible to determine the
93
97
  * transaction type based on the information available.
@@ -129,10 +133,18 @@ export declare enum SecurityAlertResponse {
129
133
  * securityAlertResponse: 'Warning',
130
134
  * }
131
135
  * ```
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * {
140
+ * typeLabel: 'Some label',
141
+ * }
142
+ * ```
132
143
  */
133
144
  export declare const TransactionDetailsStruct: import("@metamask/superstruct").Struct<{
134
145
  origin?: string;
135
146
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
147
+ typeLabel?: string;
136
148
  }, {
137
149
  /**
138
150
  * Origin of the original transaction request.
@@ -150,6 +162,10 @@ export declare const TransactionDetailsStruct: import("@metamask/superstruct").S
150
162
  Warning: "Warning";
151
163
  Malicious: "Malicious";
152
164
  }>;
165
+ /**
166
+ * Optional label for UI display purposes.
167
+ */
168
+ typeLabel: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
153
169
  }>;
154
170
  /**
155
171
  * This struct represents a transaction event.
@@ -230,17 +246,13 @@ export declare const TransactionEventStruct: import("@metamask/superstruct").Str
230
246
  * ```
231
247
  */
232
248
  export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
233
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
249
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove";
234
250
  id: string;
235
- account: string;
236
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
237
- timestamp: number | null;
238
- chain: `${string}:${string}`;
239
251
  from: {
240
252
  address: string;
241
253
  asset: {
242
- type: `${string}:${string}/${string}:${string}`;
243
254
  unit: string;
255
+ type: `${string}:${string}/${string}:${string}`;
244
256
  amount: string;
245
257
  fungible: true;
246
258
  } | {
@@ -248,11 +260,19 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
248
260
  fungible: false;
249
261
  } | null;
250
262
  }[];
263
+ events: {
264
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
265
+ timestamp: number | null;
266
+ }[];
267
+ chain: `${string}:${string}`;
268
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
269
+ account: string;
270
+ timestamp: number | null;
251
271
  to: {
252
272
  address: string;
253
273
  asset: {
254
- type: `${string}:${string}/${string}:${string}`;
255
274
  unit: string;
275
+ type: `${string}:${string}/${string}:${string}`;
256
276
  amount: string;
257
277
  fungible: true;
258
278
  } | {
@@ -263,8 +283,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
263
283
  fees: {
264
284
  type: "base" | "priority";
265
285
  asset: {
266
- type: `${string}:${string}/${string}:${string}`;
267
286
  unit: string;
287
+ type: `${string}:${string}/${string}:${string}`;
268
288
  amount: string;
269
289
  fungible: true;
270
290
  } | {
@@ -272,13 +292,10 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
272
292
  fungible: false;
273
293
  };
274
294
  }[];
275
- events: {
276
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
277
- timestamp: number | null;
278
- }[];
279
295
  details?: {
280
296
  origin?: string;
281
297
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
298
+ typeLabel?: string;
282
299
  };
283
300
  }, {
284
301
  /**
@@ -312,7 +329,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
312
329
  * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
313
330
  * details on the UI.
314
331
  */
315
- type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown", {
332
+ type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove", {
333
+ unknown: "unknown";
316
334
  send: "send";
317
335
  receive: "receive";
318
336
  swap: "swap";
@@ -321,7 +339,7 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
321
339
  "stake:deposit": "stake:deposit";
322
340
  "stake:withdraw": "stake:withdraw";
323
341
  "token:approve": "token:approve";
324
- unknown: "unknown";
342
+ "token:disapprove": "token:disapprove";
325
343
  }>;
326
344
  /**
327
345
  * Transaction sender addresses and amounts.
@@ -329,8 +347,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
329
347
  from: import("@metamask/superstruct").Struct<{
330
348
  address: string;
331
349
  asset: {
332
- type: `${string}:${string}/${string}:${string}`;
333
350
  unit: string;
351
+ type: `${string}:${string}/${string}:${string}`;
334
352
  amount: string;
335
353
  fungible: true;
336
354
  } | {
@@ -340,8 +358,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
340
358
  }[], import("@metamask/superstruct").Struct<{
341
359
  address: string;
342
360
  asset: {
343
- type: `${string}:${string}/${string}:${string}`;
344
361
  unit: string;
362
+ type: `${string}:${string}/${string}:${string}`;
345
363
  amount: string;
346
364
  fungible: true;
347
365
  } | {
@@ -357,8 +375,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
357
375
  * Asset being transferred.
358
376
  */
359
377
  asset: import("@metamask/superstruct").Struct<{
360
- type: `${string}:${string}/${string}:${string}`;
361
378
  unit: string;
379
+ type: `${string}:${string}/${string}:${string}`;
362
380
  amount: string;
363
381
  fungible: true;
364
382
  } | {
@@ -372,8 +390,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
372
390
  to: import("@metamask/superstruct").Struct<{
373
391
  address: string;
374
392
  asset: {
375
- type: `${string}:${string}/${string}:${string}`;
376
393
  unit: string;
394
+ type: `${string}:${string}/${string}:${string}`;
377
395
  amount: string;
378
396
  fungible: true;
379
397
  } | {
@@ -383,8 +401,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
383
401
  }[], import("@metamask/superstruct").Struct<{
384
402
  address: string;
385
403
  asset: {
386
- type: `${string}:${string}/${string}:${string}`;
387
404
  unit: string;
405
+ type: `${string}:${string}/${string}:${string}`;
388
406
  amount: string;
389
407
  fungible: true;
390
408
  } | {
@@ -400,8 +418,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
400
418
  * Asset being transferred.
401
419
  */
402
420
  asset: import("@metamask/superstruct").Struct<{
403
- type: `${string}:${string}/${string}:${string}`;
404
421
  unit: string;
422
+ type: `${string}:${string}/${string}:${string}`;
405
423
  amount: string;
406
424
  fungible: true;
407
425
  } | {
@@ -415,8 +433,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
415
433
  fees: import("@metamask/superstruct").Struct<{
416
434
  type: "base" | "priority";
417
435
  asset: {
418
- type: `${string}:${string}/${string}:${string}`;
419
436
  unit: string;
437
+ type: `${string}:${string}/${string}:${string}`;
420
438
  amount: string;
421
439
  fungible: true;
422
440
  } | {
@@ -426,8 +444,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
426
444
  }[], import("@metamask/superstruct").Struct<{
427
445
  type: "base" | "priority";
428
446
  asset: {
429
- type: `${string}:${string}/${string}:${string}`;
430
447
  unit: string;
448
+ type: `${string}:${string}/${string}:${string}`;
431
449
  amount: string;
432
450
  fungible: true;
433
451
  } | {
@@ -446,8 +464,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
446
464
  * Asset used to pay for the fee.
447
465
  */
448
466
  asset: import("@metamask/superstruct").Struct<{
449
- type: `${string}:${string}/${string}:${string}`;
450
467
  unit: string;
468
+ type: `${string}:${string}/${string}:${string}`;
451
469
  amount: string;
452
470
  fungible: true;
453
471
  } | {
@@ -485,13 +503,14 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
485
503
  /**
486
504
  * Additional transaction details {@see TransactionDetailsStruct}.
487
505
  *
488
- * Contains contextual information about the transaction such as its origin and
489
- * security assessment. This field is optional and may not be present for all
490
- * transactions.
506
+ * Contains contextual information about the transaction such as its origin,
507
+ * security assessment, and optional `typeLabel`. This field is optional and
508
+ * may not be present for all transactions.
491
509
  */
492
510
  details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
493
511
  origin?: string;
494
512
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
513
+ typeLabel?: string;
495
514
  }, {
496
515
  /**
497
516
  * Origin of the original transaction request.
@@ -509,6 +528,10 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
509
528
  Warning: "Warning";
510
529
  Malicious: "Malicious";
511
530
  }>;
531
+ /**
532
+ * Optional label for UI display purposes.
533
+ */
534
+ typeLabel: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
512
535
  }>;
513
536
  }>;
514
537
  /**
@@ -551,19 +574,14 @@ export type Transaction = Infer<typeof TransactionStruct>;
551
574
  * ```
552
575
  */
553
576
  export declare const TransactionsPageStruct: import("@metamask/superstruct").Struct<{
554
- next: string | null;
555
577
  data: {
556
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
578
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove";
557
579
  id: string;
558
- account: string;
559
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
560
- timestamp: number | null;
561
- chain: `${string}:${string}`;
562
580
  from: {
563
581
  address: string;
564
582
  asset: {
565
- type: `${string}:${string}/${string}:${string}`;
566
583
  unit: string;
584
+ type: `${string}:${string}/${string}:${string}`;
567
585
  amount: string;
568
586
  fungible: true;
569
587
  } | {
@@ -571,11 +589,19 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
571
589
  fungible: false;
572
590
  } | null;
573
591
  }[];
592
+ events: {
593
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
594
+ timestamp: number | null;
595
+ }[];
596
+ chain: `${string}:${string}`;
597
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
598
+ account: string;
599
+ timestamp: number | null;
574
600
  to: {
575
601
  address: string;
576
602
  asset: {
577
- type: `${string}:${string}/${string}:${string}`;
578
603
  unit: string;
604
+ type: `${string}:${string}/${string}:${string}`;
579
605
  amount: string;
580
606
  fungible: true;
581
607
  } | {
@@ -586,8 +612,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
586
612
  fees: {
587
613
  type: "base" | "priority";
588
614
  asset: {
589
- type: `${string}:${string}/${string}:${string}`;
590
615
  unit: string;
616
+ type: `${string}:${string}/${string}:${string}`;
591
617
  amount: string;
592
618
  fungible: true;
593
619
  } | {
@@ -595,31 +621,25 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
595
621
  fungible: false;
596
622
  };
597
623
  }[];
598
- events: {
599
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
600
- timestamp: number | null;
601
- }[];
602
624
  details?: {
603
625
  origin?: string;
604
626
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
627
+ typeLabel?: string;
605
628
  };
606
629
  }[];
630
+ next: string | null;
607
631
  }, {
608
632
  /**
609
633
  * List of transactions.
610
634
  */
611
635
  data: import("@metamask/superstruct").Struct<{
612
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
636
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove";
613
637
  id: string;
614
- account: string;
615
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
616
- timestamp: number | null;
617
- chain: `${string}:${string}`;
618
638
  from: {
619
639
  address: string;
620
640
  asset: {
621
- type: `${string}:${string}/${string}:${string}`;
622
641
  unit: string;
642
+ type: `${string}:${string}/${string}:${string}`;
623
643
  amount: string;
624
644
  fungible: true;
625
645
  } | {
@@ -627,11 +647,19 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
627
647
  fungible: false;
628
648
  } | null;
629
649
  }[];
650
+ events: {
651
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
652
+ timestamp: number | null;
653
+ }[];
654
+ chain: `${string}:${string}`;
655
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
656
+ account: string;
657
+ timestamp: number | null;
630
658
  to: {
631
659
  address: string;
632
660
  asset: {
633
- type: `${string}:${string}/${string}:${string}`;
634
661
  unit: string;
662
+ type: `${string}:${string}/${string}:${string}`;
635
663
  amount: string;
636
664
  fungible: true;
637
665
  } | {
@@ -642,8 +670,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
642
670
  fees: {
643
671
  type: "base" | "priority";
644
672
  asset: {
645
- type: `${string}:${string}/${string}:${string}`;
646
673
  unit: string;
674
+ type: `${string}:${string}/${string}:${string}`;
647
675
  amount: string;
648
676
  fungible: true;
649
677
  } | {
@@ -651,26 +679,19 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
651
679
  fungible: false;
652
680
  };
653
681
  }[];
654
- events: {
655
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
656
- timestamp: number | null;
657
- }[];
658
682
  details?: {
659
683
  origin?: string;
660
684
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
685
+ typeLabel?: string;
661
686
  };
662
687
  }[], import("@metamask/superstruct").Struct<{
663
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
688
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove";
664
689
  id: string;
665
- account: string;
666
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
667
- timestamp: number | null;
668
- chain: `${string}:${string}`;
669
690
  from: {
670
691
  address: string;
671
692
  asset: {
672
- type: `${string}:${string}/${string}:${string}`;
673
693
  unit: string;
694
+ type: `${string}:${string}/${string}:${string}`;
674
695
  amount: string;
675
696
  fungible: true;
676
697
  } | {
@@ -678,11 +699,19 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
678
699
  fungible: false;
679
700
  } | null;
680
701
  }[];
702
+ events: {
703
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
704
+ timestamp: number | null;
705
+ }[];
706
+ chain: `${string}:${string}`;
707
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
708
+ account: string;
709
+ timestamp: number | null;
681
710
  to: {
682
711
  address: string;
683
712
  asset: {
684
- type: `${string}:${string}/${string}:${string}`;
685
713
  unit: string;
714
+ type: `${string}:${string}/${string}:${string}`;
686
715
  amount: string;
687
716
  fungible: true;
688
717
  } | {
@@ -693,8 +722,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
693
722
  fees: {
694
723
  type: "base" | "priority";
695
724
  asset: {
696
- type: `${string}:${string}/${string}:${string}`;
697
725
  unit: string;
726
+ type: `${string}:${string}/${string}:${string}`;
698
727
  amount: string;
699
728
  fungible: true;
700
729
  } | {
@@ -702,13 +731,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
702
731
  fungible: false;
703
732
  };
704
733
  }[];
705
- events: {
706
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
707
- timestamp: number | null;
708
- }[];
709
734
  details?: {
710
735
  origin?: string;
711
736
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
737
+ typeLabel?: string;
712
738
  };
713
739
  }, {
714
740
  /**
@@ -742,7 +768,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
742
768
  * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
743
769
  * details on the UI.
744
770
  */
745
- type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown", {
771
+ type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "token:disapprove", {
772
+ unknown: "unknown";
746
773
  send: "send";
747
774
  receive: "receive";
748
775
  swap: "swap";
@@ -751,7 +778,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
751
778
  "stake:deposit": "stake:deposit";
752
779
  "stake:withdraw": "stake:withdraw";
753
780
  "token:approve": "token:approve";
754
- unknown: "unknown";
781
+ "token:disapprove": "token:disapprove";
755
782
  }>;
756
783
  /**
757
784
  * Transaction sender addresses and amounts.
@@ -759,8 +786,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
759
786
  from: import("@metamask/superstruct").Struct<{
760
787
  address: string;
761
788
  asset: {
762
- type: `${string}:${string}/${string}:${string}`;
763
789
  unit: string;
790
+ type: `${string}:${string}/${string}:${string}`;
764
791
  amount: string;
765
792
  fungible: true;
766
793
  } | {
@@ -770,8 +797,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
770
797
  }[], import("@metamask/superstruct").Struct<{
771
798
  address: string;
772
799
  asset: {
773
- type: `${string}:${string}/${string}:${string}`;
774
800
  unit: string;
801
+ type: `${string}:${string}/${string}:${string}`;
775
802
  amount: string;
776
803
  fungible: true;
777
804
  } | {
@@ -787,8 +814,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
787
814
  * Asset being transferred.
788
815
  */
789
816
  asset: import("@metamask/superstruct").Struct<{
790
- type: `${string}:${string}/${string}:${string}`;
791
817
  unit: string;
818
+ type: `${string}:${string}/${string}:${string}`;
792
819
  amount: string;
793
820
  fungible: true;
794
821
  } | {
@@ -802,8 +829,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
802
829
  to: import("@metamask/superstruct").Struct<{
803
830
  address: string;
804
831
  asset: {
805
- type: `${string}:${string}/${string}:${string}`;
806
832
  unit: string;
833
+ type: `${string}:${string}/${string}:${string}`;
807
834
  amount: string;
808
835
  fungible: true;
809
836
  } | {
@@ -813,8 +840,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
813
840
  }[], import("@metamask/superstruct").Struct<{
814
841
  address: string;
815
842
  asset: {
816
- type: `${string}:${string}/${string}:${string}`;
817
843
  unit: string;
844
+ type: `${string}:${string}/${string}:${string}`;
818
845
  amount: string;
819
846
  fungible: true;
820
847
  } | {
@@ -830,8 +857,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
830
857
  * Asset being transferred.
831
858
  */
832
859
  asset: import("@metamask/superstruct").Struct<{
833
- type: `${string}:${string}/${string}:${string}`;
834
860
  unit: string;
861
+ type: `${string}:${string}/${string}:${string}`;
835
862
  amount: string;
836
863
  fungible: true;
837
864
  } | {
@@ -845,8 +872,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
845
872
  fees: import("@metamask/superstruct").Struct<{
846
873
  type: "base" | "priority";
847
874
  asset: {
848
- type: `${string}:${string}/${string}:${string}`;
849
875
  unit: string;
876
+ type: `${string}:${string}/${string}:${string}`;
850
877
  amount: string;
851
878
  fungible: true;
852
879
  } | {
@@ -856,8 +883,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
856
883
  }[], import("@metamask/superstruct").Struct<{
857
884
  type: "base" | "priority";
858
885
  asset: {
859
- type: `${string}:${string}/${string}:${string}`;
860
886
  unit: string;
887
+ type: `${string}:${string}/${string}:${string}`;
861
888
  amount: string;
862
889
  fungible: true;
863
890
  } | {
@@ -876,8 +903,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
876
903
  * Asset used to pay for the fee.
877
904
  */
878
905
  asset: import("@metamask/superstruct").Struct<{
879
- type: `${string}:${string}/${string}:${string}`;
880
906
  unit: string;
907
+ type: `${string}:${string}/${string}:${string}`;
881
908
  amount: string;
882
909
  fungible: true;
883
910
  } | {
@@ -915,13 +942,14 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
915
942
  /**
916
943
  * Additional transaction details {@see TransactionDetailsStruct}.
917
944
  *
918
- * Contains contextual information about the transaction such as its origin and
919
- * security assessment. This field is optional and may not be present for all
920
- * transactions.
945
+ * Contains contextual information about the transaction such as its origin,
946
+ * security assessment, and optional `typeLabel`. This field is optional and
947
+ * may not be present for all transactions.
921
948
  */
922
949
  details: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
923
950
  origin?: string;
924
951
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
952
+ typeLabel?: string;
925
953
  }, {
926
954
  /**
927
955
  * Origin of the original transaction request.
@@ -939,6 +967,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
939
967
  Warning: "Warning";
940
968
  Malicious: "Malicious";
941
969
  }>;
970
+ /**
971
+ * Optional label for UI display purposes.
972
+ */
973
+ typeLabel: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag, null>;
942
974
  }>;
943
975
  }>>;
944
976
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.mts","sourceRoot":"","sources":["../../src/api/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAiD9C;;GAEG;AACH,oBAAY,OAAO;IACjB;;;;;;OAMG;IACH,IAAI,SAAS;IAEb;;;;;OAKG;IACH,QAAQ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;;;;;;;;;;;;;;;;;QA9HH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;QAQH;;;;WAIG;;QAGH;;;WAGG;;;;;;;;;;;;;QAcH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YArVH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAiVH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YA1VH;;eAEG;;YAGH;;eAEG;;;;;;;;;;;QAsVH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;YA1TH;;eAEG;;;;;YAGH;;eAEG;;;;;;;;;;;QAsTH;;;;;WAKG;;;;;;;;YA/IH;;eAEG;;;;;;;YAQH;;eAEG;;;QAsIH;;;;;;WAMG;;;;;;YAtLH;;;;;eAKG;;YAGH;;;eAGG;;;;;;YASH;;eAEG;;;;IAmNH;;;OAGG;;EAEH,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,CACxC,OAAO,sBAAsB,EAC7B,SAAS,CAAC,WAAW,CAAC,CACvB,CAAC"}
@@ -150,6 +150,10 @@ export var TransactionType;
150
150
  * Represents a token approval transaction.
151
151
  */
152
152
  TransactionType["TokenApprove"] = "token:approve";
153
+ /**
154
+ * Represents a token disapproval transaction.
155
+ */
156
+ TransactionType["TokenDisapprove"] = "token:disapprove";
153
157
  /**
154
158
  * The transaction type is unknown. It's not possible to determine the
155
159
  * transaction type based on the information available.
@@ -192,6 +196,13 @@ export var SecurityAlertResponse;
192
196
  * securityAlertResponse: 'Warning',
193
197
  * }
194
198
  * ```
199
+ *
200
+ * @example
201
+ * ```ts
202
+ * {
203
+ * typeLabel: 'Some label',
204
+ * }
205
+ * ```
195
206
  */
196
207
  export const TransactionDetailsStruct = object({
197
208
  /**
@@ -210,6 +221,10 @@ export const TransactionDetailsStruct = object({
210
221
  `${SecurityAlertResponse.Warning}`,
211
222
  `${SecurityAlertResponse.Malicious}`,
212
223
  ])),
224
+ /**
225
+ * Optional label for UI display purposes.
226
+ */
227
+ typeLabel: exactOptional(string()),
213
228
  });
214
229
  /**
215
230
  * This struct represents a transaction event.
@@ -327,6 +342,7 @@ export const TransactionStruct = object({
327
342
  `${TransactionType.StakeDeposit}`,
328
343
  `${TransactionType.StakeWithdraw}`,
329
344
  `${TransactionType.TokenApprove}`,
345
+ `${TransactionType.TokenDisapprove}`,
330
346
  `${TransactionType.Unknown}`,
331
347
  ]),
332
348
  /**
@@ -351,9 +367,9 @@ export const TransactionStruct = object({
351
367
  /**
352
368
  * Additional transaction details {@see TransactionDetailsStruct}.
353
369
  *
354
- * Contains contextual information about the transaction such as its origin and
355
- * security assessment. This field is optional and may not be present for all
356
- * transactions.
370
+ * Contains contextual information about the transaction such as its origin,
371
+ * security assessment, and optional `typeLabel`. This field is optional and
372
+ * may not be present for all transactions.
357
373
  */
358
374
  details: exactOptional(TransactionDetailsStruct),
359
375
  });