@metamask-previews/keyring-api 23.1.0-4bf3baf → 23.1.0-862665d

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 (43) hide show
  1. package/dist/api/account-options.cjs +4 -0
  2. package/dist/api/account-options.cjs.map +1 -1
  3. package/dist/api/account-options.d.cts +4 -0
  4. package/dist/api/account-options.d.cts.map +1 -1
  5. package/dist/api/account-options.d.mts +4 -0
  6. package/dist/api/account-options.d.mts.map +1 -1
  7. package/dist/api/account-options.mjs +4 -0
  8. package/dist/api/account-options.mjs.map +1 -1
  9. package/dist/api/account.d.cts +2 -2
  10. package/dist/api/account.d.mts +2 -2
  11. package/dist/api/asset.d.cts +2 -2
  12. package/dist/api/asset.d.mts +2 -2
  13. package/dist/api/request.d.cts +3 -3
  14. package/dist/api/request.d.mts +3 -3
  15. package/dist/api/response.d.cts +1 -1
  16. package/dist/api/response.d.mts +1 -1
  17. package/dist/api/transaction.d.cts +71 -71
  18. package/dist/api/transaction.d.mts +71 -71
  19. package/dist/btc/types.d.cts +8 -8
  20. package/dist/btc/types.d.mts +8 -8
  21. package/dist/eth/erc4337/types.d.cts +3 -3
  22. package/dist/eth/erc4337/types.d.mts +3 -3
  23. package/dist/eth/rpc/params.d.cts +29 -29
  24. package/dist/eth/rpc/params.d.mts +29 -29
  25. package/dist/eth/types.d.cts +4 -4
  26. package/dist/eth/types.d.mts +4 -4
  27. package/dist/events.d.cts +56 -56
  28. package/dist/events.d.mts +56 -56
  29. package/dist/rpc.d.cts +131 -131
  30. package/dist/rpc.d.mts +131 -131
  31. package/dist/sol/types.d.cts +2 -2
  32. package/dist/sol/types.d.mts +2 -2
  33. package/dist/trx/types.d.cts +2 -2
  34. package/dist/trx/types.d.mts +2 -2
  35. package/dist/v2/api/create-account/bip44.d.cts +1 -1
  36. package/dist/v2/api/create-account/bip44.d.mts +1 -1
  37. package/dist/v2/api/create-account/index.d.cts +1 -1
  38. package/dist/v2/api/create-account/index.d.mts +1 -1
  39. package/dist/v2/api/keyring-rpc.d.cts +28 -28
  40. package/dist/v2/api/keyring-rpc.d.mts +28 -28
  41. package/dist/xlm/types.d.cts +2 -2
  42. package/dist/xlm/types.d.mts +2 -2
  43. package/package.json +1 -1
@@ -230,13 +230,17 @@ export declare const TransactionEventStruct: import("@metamask/superstruct").Str
230
230
  * ```
231
231
  */
232
232
  export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
233
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
233
+ type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
234
234
  id: string;
235
+ account: string;
236
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
237
+ timestamp: number | null;
238
+ chain: `${string}:${string}`;
235
239
  from: {
236
240
  address: string;
237
241
  asset: {
238
- unit: string;
239
242
  type: `${string}:${string}/${string}:${string}`;
243
+ unit: string;
240
244
  amount: string;
241
245
  fungible: true;
242
246
  } | {
@@ -244,19 +248,11 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
244
248
  fungible: false;
245
249
  } | null;
246
250
  }[];
247
- events: {
248
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
249
- timestamp: number | null;
250
- }[];
251
- chain: `${string}:${string}`;
252
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
253
- account: string;
254
- timestamp: number | null;
255
251
  to: {
256
252
  address: string;
257
253
  asset: {
258
- unit: string;
259
254
  type: `${string}:${string}/${string}:${string}`;
255
+ unit: string;
260
256
  amount: string;
261
257
  fungible: true;
262
258
  } | {
@@ -267,8 +263,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
267
263
  fees: {
268
264
  type: "base" | "priority";
269
265
  asset: {
270
- unit: string;
271
266
  type: `${string}:${string}/${string}:${string}`;
267
+ unit: string;
272
268
  amount: string;
273
269
  fungible: true;
274
270
  } | {
@@ -276,6 +272,10 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
276
272
  fungible: false;
277
273
  };
278
274
  }[];
275
+ events: {
276
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
277
+ timestamp: number | null;
278
+ }[];
279
279
  details?: {
280
280
  origin?: string;
281
281
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
@@ -312,8 +312,7 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
312
312
  * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
313
313
  * details on the UI.
314
314
  */
315
- type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve", {
316
- unknown: "unknown";
315
+ type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown", {
317
316
  send: "send";
318
317
  receive: "receive";
319
318
  swap: "swap";
@@ -322,6 +321,7 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
322
321
  "stake:deposit": "stake:deposit";
323
322
  "stake:withdraw": "stake:withdraw";
324
323
  "token:approve": "token:approve";
324
+ unknown: "unknown";
325
325
  }>;
326
326
  /**
327
327
  * Transaction sender addresses and amounts.
@@ -329,8 +329,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
329
329
  from: import("@metamask/superstruct").Struct<{
330
330
  address: string;
331
331
  asset: {
332
- unit: string;
333
332
  type: `${string}:${string}/${string}:${string}`;
333
+ unit: string;
334
334
  amount: string;
335
335
  fungible: true;
336
336
  } | {
@@ -340,8 +340,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
340
340
  }[], import("@metamask/superstruct").Struct<{
341
341
  address: string;
342
342
  asset: {
343
- unit: string;
344
343
  type: `${string}:${string}/${string}:${string}`;
344
+ unit: string;
345
345
  amount: string;
346
346
  fungible: true;
347
347
  } | {
@@ -357,8 +357,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
357
357
  * Asset being transferred.
358
358
  */
359
359
  asset: import("@metamask/superstruct").Struct<{
360
- unit: string;
361
360
  type: `${string}:${string}/${string}:${string}`;
361
+ unit: string;
362
362
  amount: string;
363
363
  fungible: true;
364
364
  } | {
@@ -372,8 +372,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
372
372
  to: import("@metamask/superstruct").Struct<{
373
373
  address: string;
374
374
  asset: {
375
- unit: string;
376
375
  type: `${string}:${string}/${string}:${string}`;
376
+ unit: string;
377
377
  amount: string;
378
378
  fungible: true;
379
379
  } | {
@@ -383,8 +383,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
383
383
  }[], import("@metamask/superstruct").Struct<{
384
384
  address: string;
385
385
  asset: {
386
- unit: string;
387
386
  type: `${string}:${string}/${string}:${string}`;
387
+ unit: string;
388
388
  amount: string;
389
389
  fungible: true;
390
390
  } | {
@@ -400,8 +400,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
400
400
  * Asset being transferred.
401
401
  */
402
402
  asset: import("@metamask/superstruct").Struct<{
403
- unit: string;
404
403
  type: `${string}:${string}/${string}:${string}`;
404
+ unit: string;
405
405
  amount: string;
406
406
  fungible: true;
407
407
  } | {
@@ -415,8 +415,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
415
415
  fees: import("@metamask/superstruct").Struct<{
416
416
  type: "base" | "priority";
417
417
  asset: {
418
- unit: string;
419
418
  type: `${string}:${string}/${string}:${string}`;
419
+ unit: string;
420
420
  amount: string;
421
421
  fungible: true;
422
422
  } | {
@@ -426,8 +426,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
426
426
  }[], import("@metamask/superstruct").Struct<{
427
427
  type: "base" | "priority";
428
428
  asset: {
429
- unit: string;
430
429
  type: `${string}:${string}/${string}:${string}`;
430
+ unit: string;
431
431
  amount: string;
432
432
  fungible: true;
433
433
  } | {
@@ -446,8 +446,8 @@ export declare const TransactionStruct: import("@metamask/superstruct").Struct<{
446
446
  * Asset used to pay for the fee.
447
447
  */
448
448
  asset: import("@metamask/superstruct").Struct<{
449
- unit: string;
450
449
  type: `${string}:${string}/${string}:${string}`;
450
+ unit: string;
451
451
  amount: string;
452
452
  fungible: true;
453
453
  } | {
@@ -551,14 +551,19 @@ export type Transaction = Infer<typeof TransactionStruct>;
551
551
  * ```
552
552
  */
553
553
  export declare const TransactionsPageStruct: import("@metamask/superstruct").Struct<{
554
+ next: string | null;
554
555
  data: {
555
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
556
+ type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
556
557
  id: string;
558
+ account: string;
559
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
560
+ timestamp: number | null;
561
+ chain: `${string}:${string}`;
557
562
  from: {
558
563
  address: string;
559
564
  asset: {
560
- unit: string;
561
565
  type: `${string}:${string}/${string}:${string}`;
566
+ unit: string;
562
567
  amount: string;
563
568
  fungible: true;
564
569
  } | {
@@ -566,19 +571,11 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
566
571
  fungible: false;
567
572
  } | null;
568
573
  }[];
569
- events: {
570
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
571
- timestamp: number | null;
572
- }[];
573
- chain: `${string}:${string}`;
574
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
575
- account: string;
576
- timestamp: number | null;
577
574
  to: {
578
575
  address: string;
579
576
  asset: {
580
- unit: string;
581
577
  type: `${string}:${string}/${string}:${string}`;
578
+ unit: string;
582
579
  amount: string;
583
580
  fungible: true;
584
581
  } | {
@@ -589,8 +586,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
589
586
  fees: {
590
587
  type: "base" | "priority";
591
588
  asset: {
592
- unit: string;
593
589
  type: `${string}:${string}/${string}:${string}`;
590
+ unit: string;
594
591
  amount: string;
595
592
  fungible: true;
596
593
  } | {
@@ -598,24 +595,31 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
598
595
  fungible: false;
599
596
  };
600
597
  }[];
598
+ events: {
599
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
600
+ timestamp: number | null;
601
+ }[];
601
602
  details?: {
602
603
  origin?: string;
603
604
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
604
605
  };
605
606
  }[];
606
- next: string | null;
607
607
  }, {
608
608
  /**
609
609
  * List of transactions.
610
610
  */
611
611
  data: import("@metamask/superstruct").Struct<{
612
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
612
+ type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
613
613
  id: string;
614
+ account: string;
615
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
616
+ timestamp: number | null;
617
+ chain: `${string}:${string}`;
614
618
  from: {
615
619
  address: string;
616
620
  asset: {
617
- unit: string;
618
621
  type: `${string}:${string}/${string}:${string}`;
622
+ unit: string;
619
623
  amount: string;
620
624
  fungible: true;
621
625
  } | {
@@ -623,19 +627,11 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
623
627
  fungible: false;
624
628
  } | null;
625
629
  }[];
626
- events: {
627
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
628
- timestamp: number | null;
629
- }[];
630
- chain: `${string}:${string}`;
631
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
632
- account: string;
633
- timestamp: number | null;
634
630
  to: {
635
631
  address: string;
636
632
  asset: {
637
- unit: string;
638
633
  type: `${string}:${string}/${string}:${string}`;
634
+ unit: string;
639
635
  amount: string;
640
636
  fungible: true;
641
637
  } | {
@@ -646,8 +642,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
646
642
  fees: {
647
643
  type: "base" | "priority";
648
644
  asset: {
649
- unit: string;
650
645
  type: `${string}:${string}/${string}:${string}`;
646
+ unit: string;
651
647
  amount: string;
652
648
  fungible: true;
653
649
  } | {
@@ -655,18 +651,26 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
655
651
  fungible: false;
656
652
  };
657
653
  }[];
654
+ events: {
655
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
656
+ timestamp: number | null;
657
+ }[];
658
658
  details?: {
659
659
  origin?: string;
660
660
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
661
661
  };
662
662
  }[], import("@metamask/superstruct").Struct<{
663
- type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
663
+ type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
664
664
  id: string;
665
+ account: string;
666
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
667
+ timestamp: number | null;
668
+ chain: `${string}:${string}`;
665
669
  from: {
666
670
  address: string;
667
671
  asset: {
668
- unit: string;
669
672
  type: `${string}:${string}/${string}:${string}`;
673
+ unit: string;
670
674
  amount: string;
671
675
  fungible: true;
672
676
  } | {
@@ -674,19 +678,11 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
674
678
  fungible: false;
675
679
  } | null;
676
680
  }[];
677
- events: {
678
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
679
- timestamp: number | null;
680
- }[];
681
- chain: `${string}:${string}`;
682
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
683
- account: string;
684
- timestamp: number | null;
685
681
  to: {
686
682
  address: string;
687
683
  asset: {
688
- unit: string;
689
684
  type: `${string}:${string}/${string}:${string}`;
685
+ unit: string;
690
686
  amount: string;
691
687
  fungible: true;
692
688
  } | {
@@ -697,8 +693,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
697
693
  fees: {
698
694
  type: "base" | "priority";
699
695
  asset: {
700
- unit: string;
701
696
  type: `${string}:${string}/${string}:${string}`;
697
+ unit: string;
702
698
  amount: string;
703
699
  fungible: true;
704
700
  } | {
@@ -706,6 +702,10 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
706
702
  fungible: false;
707
703
  };
708
704
  }[];
705
+ events: {
706
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
707
+ timestamp: number | null;
708
+ }[];
709
709
  details?: {
710
710
  origin?: string;
711
711
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
@@ -742,8 +742,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
742
742
  * Transaction type {@see TransactionType}. This will be used by MetaMask to enrich the transaction
743
743
  * details on the UI.
744
744
  */
745
- type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve", {
746
- unknown: "unknown";
745
+ type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown", {
747
746
  send: "send";
748
747
  receive: "receive";
749
748
  swap: "swap";
@@ -752,6 +751,7 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
752
751
  "stake:deposit": "stake:deposit";
753
752
  "stake:withdraw": "stake:withdraw";
754
753
  "token:approve": "token:approve";
754
+ unknown: "unknown";
755
755
  }>;
756
756
  /**
757
757
  * Transaction sender addresses and amounts.
@@ -759,8 +759,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
759
759
  from: import("@metamask/superstruct").Struct<{
760
760
  address: string;
761
761
  asset: {
762
- unit: string;
763
762
  type: `${string}:${string}/${string}:${string}`;
763
+ unit: string;
764
764
  amount: string;
765
765
  fungible: true;
766
766
  } | {
@@ -770,8 +770,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
770
770
  }[], import("@metamask/superstruct").Struct<{
771
771
  address: string;
772
772
  asset: {
773
- unit: string;
774
773
  type: `${string}:${string}/${string}:${string}`;
774
+ unit: string;
775
775
  amount: string;
776
776
  fungible: true;
777
777
  } | {
@@ -787,8 +787,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
787
787
  * Asset being transferred.
788
788
  */
789
789
  asset: import("@metamask/superstruct").Struct<{
790
- unit: string;
791
790
  type: `${string}:${string}/${string}:${string}`;
791
+ unit: string;
792
792
  amount: string;
793
793
  fungible: true;
794
794
  } | {
@@ -802,8 +802,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
802
802
  to: import("@metamask/superstruct").Struct<{
803
803
  address: string;
804
804
  asset: {
805
- unit: string;
806
805
  type: `${string}:${string}/${string}:${string}`;
806
+ unit: string;
807
807
  amount: string;
808
808
  fungible: true;
809
809
  } | {
@@ -813,8 +813,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
813
813
  }[], import("@metamask/superstruct").Struct<{
814
814
  address: string;
815
815
  asset: {
816
- unit: string;
817
816
  type: `${string}:${string}/${string}:${string}`;
817
+ unit: string;
818
818
  amount: string;
819
819
  fungible: true;
820
820
  } | {
@@ -830,8 +830,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
830
830
  * Asset being transferred.
831
831
  */
832
832
  asset: import("@metamask/superstruct").Struct<{
833
- unit: string;
834
833
  type: `${string}:${string}/${string}:${string}`;
834
+ unit: string;
835
835
  amount: string;
836
836
  fungible: true;
837
837
  } | {
@@ -845,8 +845,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
845
845
  fees: import("@metamask/superstruct").Struct<{
846
846
  type: "base" | "priority";
847
847
  asset: {
848
- unit: string;
849
848
  type: `${string}:${string}/${string}:${string}`;
849
+ unit: string;
850
850
  amount: string;
851
851
  fungible: true;
852
852
  } | {
@@ -856,8 +856,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
856
856
  }[], import("@metamask/superstruct").Struct<{
857
857
  type: "base" | "priority";
858
858
  asset: {
859
- unit: string;
860
859
  type: `${string}:${string}/${string}:${string}`;
860
+ unit: string;
861
861
  amount: string;
862
862
  fungible: true;
863
863
  } | {
@@ -876,8 +876,8 @@ export declare const TransactionsPageStruct: import("@metamask/superstruct").Str
876
876
  * Asset used to pay for the fee.
877
877
  */
878
878
  asset: import("@metamask/superstruct").Struct<{
879
- unit: string;
880
879
  type: `${string}:${string}/${string}:${string}`;
880
+ unit: string;
881
881
  amount: string;
882
882
  fungible: true;
883
883
  } | {