@metamask-previews/keyring-api 23.2.0-023fc63 → 23.2.0-7540e4c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rpc.d.cts CHANGED
@@ -31,8 +31,8 @@ export declare enum KeyringRpcMethod {
31
31
  */
32
32
  export declare function isKeyringRpcMethod(method: string): method is KeyringRpcMethod;
33
33
  export declare const ListAccountsRequestStruct: import("@metamask/superstruct").Struct<{
34
- id: string | number | null;
35
34
  method: "keyring_listAccounts";
35
+ id: string | number | null;
36
36
  jsonrpc: "2.0";
37
37
  }, {
38
38
  method: import("@metamask/superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
@@ -43,8 +43,6 @@ export type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;
43
43
  export declare const ListAccountsResponseStruct: import("@metamask/superstruct").Struct<{
44
44
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
45
45
  id: string;
46
- address: string;
47
- scopes: `${string}:${string}`[];
48
46
  options: Record<string, import("@metamask/utils").Json> & {
49
47
  entropy?: {
50
48
  type: "mnemonic";
@@ -58,12 +56,12 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
58
56
  };
59
57
  exportable?: boolean;
60
58
  };
59
+ address: string;
60
+ scopes: `${string}:${string}`[];
61
61
  methods: string[];
62
62
  }[], import("@metamask/superstruct").Struct<{
63
63
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
64
64
  id: string;
65
- address: string;
66
- scopes: `${string}:${string}`[];
67
65
  options: Record<string, import("@metamask/utils").Json> & {
68
66
  entropy?: {
69
67
  type: "mnemonic";
@@ -77,6 +75,8 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
77
75
  };
78
76
  exportable?: boolean;
79
77
  };
78
+ address: string;
79
+ scopes: `${string}:${string}`[];
80
80
  methods: string[];
81
81
  }, {
82
82
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -111,12 +111,12 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
111
111
  }>>;
112
112
  export type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;
113
113
  export declare const GetAccountRequestStruct: import("@metamask/superstruct").Struct<{
114
- id: string | number | null;
115
114
  method: "keyring_getAccount";
115
+ id: string | number | null;
116
+ jsonrpc: "2.0";
116
117
  params: {
117
118
  id: string;
118
119
  };
119
- jsonrpc: "2.0";
120
120
  }, {
121
121
  method: import("@metamask/superstruct").Struct<"keyring_getAccount", "keyring_getAccount">;
122
122
  params: import("@metamask/superstruct").Struct<{
@@ -131,8 +131,6 @@ export type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;
131
131
  export declare const GetAccountResponseStruct: import("@metamask/superstruct").Struct<{
132
132
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
133
133
  id: string;
134
- address: string;
135
- scopes: `${string}:${string}`[];
136
134
  options: Record<string, import("@metamask/utils").Json> & {
137
135
  entropy?: {
138
136
  type: "mnemonic";
@@ -146,6 +144,8 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
146
144
  };
147
145
  exportable?: boolean;
148
146
  };
147
+ address: string;
148
+ scopes: `${string}:${string}`[];
149
149
  methods: string[];
150
150
  }, {
151
151
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -180,12 +180,12 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
180
180
  }>;
181
181
  export type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;
182
182
  export declare const CreateAccountRequestStruct: import("@metamask/superstruct").Struct<{
183
- id: string | number | null;
184
183
  method: "keyring_createAccount";
184
+ id: string | number | null;
185
+ jsonrpc: "2.0";
185
186
  params: {
186
187
  options: Record<string, import("@metamask/utils").Json>;
187
188
  };
188
- jsonrpc: "2.0";
189
189
  }, {
190
190
  method: import("@metamask/superstruct").Struct<"keyring_createAccount", "keyring_createAccount">;
191
191
  params: import("@metamask/superstruct").Struct<{
@@ -200,8 +200,6 @@ export type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;
200
200
  export declare const CreateAccountResponseStruct: import("@metamask/superstruct").Struct<{
201
201
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
202
202
  id: string;
203
- address: string;
204
- scopes: `${string}:${string}`[];
205
203
  options: Record<string, import("@metamask/utils").Json> & {
206
204
  entropy?: {
207
205
  type: "mnemonic";
@@ -215,6 +213,8 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
215
213
  };
216
214
  exportable?: boolean;
217
215
  };
216
+ address: string;
217
+ scopes: `${string}:${string}`[];
218
218
  methods: string[];
219
219
  }, {
220
220
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -249,8 +249,9 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
249
249
  }>;
250
250
  export type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;
251
251
  export declare const CreateAccountsRequestStruct: import("@metamask/superstruct").Struct<{
252
- id: string | number | null;
253
252
  method: "keyring_createAccounts";
253
+ id: string | number | null;
254
+ jsonrpc: "2.0";
254
255
  params: {
255
256
  options: {
256
257
  type: "bip44:derive-path";
@@ -266,11 +267,11 @@ export declare const CreateAccountsRequestStruct: import("@metamask/superstruct"
266
267
  entropySource: string;
267
268
  } | {
268
269
  type: "bip44:derive-index-range";
269
- entropySource: string;
270
270
  range: {
271
271
  from: number;
272
272
  to: number;
273
273
  };
274
+ entropySource: string;
274
275
  } | {
275
276
  type: "custom";
276
277
  } | {
@@ -280,7 +281,6 @@ export declare const CreateAccountsRequestStruct: import("@metamask/superstruct"
280
281
  accountType?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
281
282
  };
282
283
  };
283
- jsonrpc: "2.0";
284
284
  }, {
285
285
  method: import("@metamask/superstruct").Struct<"keyring_createAccounts", "keyring_createAccounts">;
286
286
  params: import("@metamask/superstruct").Struct<{
@@ -298,11 +298,11 @@ export declare const CreateAccountsRequestStruct: import("@metamask/superstruct"
298
298
  entropySource: string;
299
299
  } | {
300
300
  type: "bip44:derive-index-range";
301
- entropySource: string;
302
301
  range: {
303
302
  from: number;
304
303
  to: number;
305
304
  };
305
+ entropySource: string;
306
306
  } | {
307
307
  type: "custom";
308
308
  } | {
@@ -326,11 +326,11 @@ export declare const CreateAccountsRequestStruct: import("@metamask/superstruct"
326
326
  entropySource: string;
327
327
  } | {
328
328
  type: "bip44:derive-index-range";
329
- entropySource: string;
330
329
  range: {
331
330
  from: number;
332
331
  to: number;
333
332
  };
333
+ entropySource: string;
334
334
  } | {
335
335
  type: "custom";
336
336
  } | {
@@ -347,8 +347,6 @@ export type CreateAccountsRequest = Infer<typeof CreateAccountsRequestStruct>;
347
347
  export declare const CreateAccountsResponseStruct: import("@metamask/superstruct").Struct<{
348
348
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
349
349
  id: string;
350
- address: string;
351
- scopes: `${string}:${string}`[];
352
350
  options: Record<string, import("@metamask/utils").Json> & {
353
351
  entropy?: {
354
352
  type: "mnemonic";
@@ -362,12 +360,12 @@ export declare const CreateAccountsResponseStruct: import("@metamask/superstruct
362
360
  };
363
361
  exportable?: boolean;
364
362
  };
363
+ address: string;
364
+ scopes: `${string}:${string}`[];
365
365
  methods: string[];
366
366
  }[], import("@metamask/superstruct").Struct<{
367
367
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
368
368
  id: string;
369
- address: string;
370
- scopes: `${string}:${string}`[];
371
369
  options: Record<string, import("@metamask/utils").Json> & {
372
370
  entropy?: {
373
371
  type: "mnemonic";
@@ -381,6 +379,8 @@ export declare const CreateAccountsResponseStruct: import("@metamask/superstruct
381
379
  };
382
380
  exportable?: boolean;
383
381
  };
382
+ address: string;
383
+ scopes: `${string}:${string}`[];
384
384
  methods: string[];
385
385
  }, {
386
386
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -415,12 +415,12 @@ export declare const CreateAccountsResponseStruct: import("@metamask/superstruct
415
415
  }>>;
416
416
  export type CreateAccountsResponse = Infer<typeof CreateAccountsResponseStruct>;
417
417
  export declare const SetSelectedAccountsRequestStruct: import("@metamask/superstruct").Struct<{
418
- id: string | number | null;
419
418
  method: "keyring_setSelectedAccounts";
419
+ id: string | number | null;
420
+ jsonrpc: "2.0";
420
421
  params: {
421
422
  accounts: string[];
422
423
  };
423
- jsonrpc: "2.0";
424
424
  }, {
425
425
  method: import("@metamask/superstruct").Struct<"keyring_setSelectedAccounts", "keyring_setSelectedAccounts">;
426
426
  params: import("@metamask/superstruct").Struct<{
@@ -435,14 +435,14 @@ export type SetSelectedAccountsRequest = Infer<typeof SetSelectedAccountsRequest
435
435
  export declare const SetSelectedAccountsResponseStruct: import("@metamask/superstruct").Struct<null, null>;
436
436
  export type SetSelectedAccountsResponse = Infer<typeof SetSelectedAccountsResponseStruct>;
437
437
  export declare const DiscoverAccountsRequestStruct: import("@metamask/superstruct").Struct<{
438
- id: string | number | null;
439
438
  method: "keyring_discoverAccounts";
439
+ id: string | number | null;
440
+ jsonrpc: "2.0";
440
441
  params: {
441
442
  groupIndex: number;
442
443
  scopes: `${string}:${string}`[];
443
444
  entropySource: string;
444
445
  };
445
- jsonrpc: "2.0";
446
446
  }, {
447
447
  method: import("@metamask/superstruct").Struct<"keyring_discoverAccounts", "keyring_discoverAccounts">;
448
448
  params: import("@metamask/superstruct").Struct<{
@@ -473,8 +473,9 @@ export declare const DiscoverAccountsResponseStruct: import("@metamask/superstru
473
473
  }>>;
474
474
  export type DiscoverAccountsResponse = Infer<typeof DiscoverAccountsResponseStruct>;
475
475
  export declare const ListAccountTransactionsRequestStruct: import("@metamask/superstruct").Struct<{
476
- id: string | number | null;
477
476
  method: "keyring_listAccountTransactions";
477
+ id: string | number | null;
478
+ jsonrpc: "2.0";
478
479
  params: {
479
480
  id: string;
480
481
  pagination: {
@@ -482,7 +483,6 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
482
483
  next?: string | null;
483
484
  };
484
485
  };
485
- jsonrpc: "2.0";
486
486
  }, {
487
487
  method: import("@metamask/superstruct").Struct<"keyring_listAccountTransactions", "keyring_listAccountTransactions">;
488
488
  params: import("@metamask/superstruct").Struct<{
@@ -506,19 +506,14 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
506
506
  }>;
507
507
  export type ListAccountTransactionsRequest = Infer<typeof ListAccountTransactionsRequestStruct>;
508
508
  export declare const ListAccountTransactionsResponseStruct: import("@metamask/superstruct").Struct<{
509
- next: string | null;
510
509
  data: {
511
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
510
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
512
511
  id: string;
513
- account: string;
514
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
515
- timestamp: number | null;
516
- chain: `${string}:${string}`;
517
512
  from: {
518
513
  address: string;
519
514
  asset: {
520
- type: `${string}:${string}/${string}:${string}`;
521
515
  unit: string;
516
+ type: `${string}:${string}/${string}:${string}`;
522
517
  amount: string;
523
518
  fungible: true;
524
519
  } | {
@@ -526,11 +521,19 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
526
521
  fungible: false;
527
522
  } | null;
528
523
  }[];
524
+ events: {
525
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
526
+ timestamp: number | null;
527
+ }[];
528
+ chain: `${string}:${string}`;
529
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
530
+ account: string;
531
+ timestamp: number | null;
529
532
  to: {
530
533
  address: string;
531
534
  asset: {
532
- type: `${string}:${string}/${string}:${string}`;
533
535
  unit: string;
536
+ type: `${string}:${string}/${string}:${string}`;
534
537
  amount: string;
535
538
  fungible: true;
536
539
  } | {
@@ -541,8 +544,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
541
544
  fees: {
542
545
  type: "base" | "priority";
543
546
  asset: {
544
- type: `${string}:${string}/${string}:${string}`;
545
547
  unit: string;
548
+ type: `${string}:${string}/${string}:${string}`;
546
549
  amount: string;
547
550
  fungible: true;
548
551
  } | {
@@ -550,28 +553,21 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
550
553
  fungible: false;
551
554
  };
552
555
  }[];
553
- events: {
554
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
555
- timestamp: number | null;
556
- }[];
557
556
  details?: {
558
557
  origin?: string;
559
558
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
560
559
  };
561
560
  }[];
561
+ next: string | null;
562
562
  }, {
563
563
  data: import("@metamask/superstruct").Struct<{
564
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
564
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
565
565
  id: string;
566
- account: string;
567
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
568
- timestamp: number | null;
569
- chain: `${string}:${string}`;
570
566
  from: {
571
567
  address: string;
572
568
  asset: {
573
- type: `${string}:${string}/${string}:${string}`;
574
569
  unit: string;
570
+ type: `${string}:${string}/${string}:${string}`;
575
571
  amount: string;
576
572
  fungible: true;
577
573
  } | {
@@ -579,11 +575,19 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
579
575
  fungible: false;
580
576
  } | null;
581
577
  }[];
578
+ events: {
579
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
580
+ timestamp: number | null;
581
+ }[];
582
+ chain: `${string}:${string}`;
583
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
584
+ account: string;
585
+ timestamp: number | null;
582
586
  to: {
583
587
  address: string;
584
588
  asset: {
585
- type: `${string}:${string}/${string}:${string}`;
586
589
  unit: string;
590
+ type: `${string}:${string}/${string}:${string}`;
587
591
  amount: string;
588
592
  fungible: true;
589
593
  } | {
@@ -594,8 +598,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
594
598
  fees: {
595
599
  type: "base" | "priority";
596
600
  asset: {
597
- type: `${string}:${string}/${string}:${string}`;
598
601
  unit: string;
602
+ type: `${string}:${string}/${string}:${string}`;
599
603
  amount: string;
600
604
  fungible: true;
601
605
  } | {
@@ -603,26 +607,18 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
603
607
  fungible: false;
604
608
  };
605
609
  }[];
606
- events: {
607
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
608
- timestamp: number | null;
609
- }[];
610
610
  details?: {
611
611
  origin?: string;
612
612
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
613
613
  };
614
614
  }[], import("@metamask/superstruct").Struct<{
615
- type: "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown";
615
+ type: "unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve";
616
616
  id: string;
617
- account: string;
618
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
619
- timestamp: number | null;
620
- chain: `${string}:${string}`;
621
617
  from: {
622
618
  address: string;
623
619
  asset: {
624
- type: `${string}:${string}/${string}:${string}`;
625
620
  unit: string;
621
+ type: `${string}:${string}/${string}:${string}`;
626
622
  amount: string;
627
623
  fungible: true;
628
624
  } | {
@@ -630,11 +626,19 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
630
626
  fungible: false;
631
627
  } | null;
632
628
  }[];
629
+ events: {
630
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
631
+ timestamp: number | null;
632
+ }[];
633
+ chain: `${string}:${string}`;
634
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
635
+ account: string;
636
+ timestamp: number | null;
633
637
  to: {
634
638
  address: string;
635
639
  asset: {
636
- type: `${string}:${string}/${string}:${string}`;
637
640
  unit: string;
641
+ type: `${string}:${string}/${string}:${string}`;
638
642
  amount: string;
639
643
  fungible: true;
640
644
  } | {
@@ -645,8 +649,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
645
649
  fees: {
646
650
  type: "base" | "priority";
647
651
  asset: {
648
- type: `${string}:${string}/${string}:${string}`;
649
652
  unit: string;
653
+ type: `${string}:${string}/${string}:${string}`;
650
654
  amount: string;
651
655
  fungible: true;
652
656
  } | {
@@ -654,10 +658,6 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
654
658
  fungible: false;
655
659
  };
656
660
  }[];
657
- events: {
658
- status: "submitted" | "unconfirmed" | "confirmed" | "failed";
659
- timestamp: number | null;
660
- }[];
661
661
  details?: {
662
662
  origin?: string;
663
663
  securityAlertResponse?: "Benign" | "Warning" | "Malicious";
@@ -673,7 +673,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
673
673
  failed: "failed";
674
674
  }>;
675
675
  timestamp: import("@metamask/superstruct").Struct<number | null, null>;
676
- type: import("@metamask/superstruct").Struct<"send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve" | "unknown", {
676
+ type: import("@metamask/superstruct").Struct<"unknown" | "send" | "receive" | "swap" | "bridge:send" | "bridge:receive" | "stake:deposit" | "stake:withdraw" | "token:approve", {
677
+ unknown: "unknown";
677
678
  send: "send";
678
679
  receive: "receive";
679
680
  swap: "swap";
@@ -682,13 +683,12 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
682
683
  "stake:deposit": "stake:deposit";
683
684
  "stake:withdraw": "stake:withdraw";
684
685
  "token:approve": "token:approve";
685
- unknown: "unknown";
686
686
  }>;
687
687
  from: import("@metamask/superstruct").Struct<{
688
688
  address: string;
689
689
  asset: {
690
- type: `${string}:${string}/${string}:${string}`;
691
690
  unit: string;
691
+ type: `${string}:${string}/${string}:${string}`;
692
692
  amount: string;
693
693
  fungible: true;
694
694
  } | {
@@ -698,8 +698,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
698
698
  }[], import("@metamask/superstruct").Struct<{
699
699
  address: string;
700
700
  asset: {
701
- type: `${string}:${string}/${string}:${string}`;
702
701
  unit: string;
702
+ type: `${string}:${string}/${string}:${string}`;
703
703
  amount: string;
704
704
  fungible: true;
705
705
  } | {
@@ -709,8 +709,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
709
709
  }, {
710
710
  address: import("@metamask/superstruct").Struct<string, null>;
711
711
  asset: import("@metamask/superstruct").Struct<{
712
- type: `${string}:${string}/${string}:${string}`;
713
712
  unit: string;
713
+ type: `${string}:${string}/${string}:${string}`;
714
714
  amount: string;
715
715
  fungible: true;
716
716
  } | {
@@ -721,8 +721,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
721
721
  to: import("@metamask/superstruct").Struct<{
722
722
  address: string;
723
723
  asset: {
724
- type: `${string}:${string}/${string}:${string}`;
725
724
  unit: string;
725
+ type: `${string}:${string}/${string}:${string}`;
726
726
  amount: string;
727
727
  fungible: true;
728
728
  } | {
@@ -732,8 +732,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
732
732
  }[], import("@metamask/superstruct").Struct<{
733
733
  address: string;
734
734
  asset: {
735
- type: `${string}:${string}/${string}:${string}`;
736
735
  unit: string;
736
+ type: `${string}:${string}/${string}:${string}`;
737
737
  amount: string;
738
738
  fungible: true;
739
739
  } | {
@@ -743,8 +743,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
743
743
  }, {
744
744
  address: import("@metamask/superstruct").Struct<string, null>;
745
745
  asset: import("@metamask/superstruct").Struct<{
746
- type: `${string}:${string}/${string}:${string}`;
747
746
  unit: string;
747
+ type: `${string}:${string}/${string}:${string}`;
748
748
  amount: string;
749
749
  fungible: true;
750
750
  } | {
@@ -755,8 +755,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
755
755
  fees: import("@metamask/superstruct").Struct<{
756
756
  type: "base" | "priority";
757
757
  asset: {
758
- type: `${string}:${string}/${string}:${string}`;
759
758
  unit: string;
759
+ type: `${string}:${string}/${string}:${string}`;
760
760
  amount: string;
761
761
  fungible: true;
762
762
  } | {
@@ -766,8 +766,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
766
766
  }[], import("@metamask/superstruct").Struct<{
767
767
  type: "base" | "priority";
768
768
  asset: {
769
- type: `${string}:${string}/${string}:${string}`;
770
769
  unit: string;
770
+ type: `${string}:${string}/${string}:${string}`;
771
771
  amount: string;
772
772
  fungible: true;
773
773
  } | {
@@ -780,8 +780,8 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
780
780
  priority: "priority";
781
781
  }>;
782
782
  asset: import("@metamask/superstruct").Struct<{
783
- type: `${string}:${string}/${string}:${string}`;
784
783
  unit: string;
784
+ type: `${string}:${string}/${string}:${string}`;
785
785
  amount: string;
786
786
  fungible: true;
787
787
  } | {
@@ -820,12 +820,12 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
820
820
  }>;
821
821
  export type ListAccountTransactionsResponse = Infer<typeof ListAccountTransactionsResponseStruct>;
822
822
  export declare const ListAccountAssetsRequestStruct: import("@metamask/superstruct").Struct<{
823
- id: string | number | null;
824
823
  method: "keyring_listAccountAssets";
824
+ id: string | number | null;
825
+ jsonrpc: "2.0";
825
826
  params: {
826
827
  id: string;
827
828
  };
828
- jsonrpc: "2.0";
829
829
  }, {
830
830
  method: import("@metamask/superstruct").Struct<"keyring_listAccountAssets", "keyring_listAccountAssets">;
831
831
  params: import("@metamask/superstruct").Struct<{
@@ -837,16 +837,16 @@ export declare const ListAccountAssetsRequestStruct: import("@metamask/superstru
837
837
  id: import("@metamask/superstruct").Struct<string | number | null, null>;
838
838
  }>;
839
839
  export type ListAccountAssetsRequest = Infer<typeof ListAccountAssetsRequestStruct>;
840
- export declare const ListAccountAssetsResponseStruct: import("@metamask/superstruct").Struct<(`${string}:${string}/${string}:${string}/${string}` | `${string}:${string}/${string}:${string}`)[], import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}/${string}` | `${string}:${string}/${string}:${string}`, null>>;
840
+ export declare const ListAccountAssetsResponseStruct: import("@metamask/superstruct").Struct<(`${string}:${string}/${string}:${string}` | `${string}:${string}/${string}:${string}/${string}`)[], import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}` | `${string}:${string}/${string}:${string}/${string}`, null>>;
841
841
  export type ListAccountAssetsResponse = Infer<typeof ListAccountAssetsResponseStruct>;
842
842
  export declare const GetAccountBalancesRequestStruct: import("@metamask/superstruct").Struct<{
843
- id: string | number | null;
844
843
  method: "keyring_getAccountBalances";
844
+ id: string | number | null;
845
+ jsonrpc: "2.0";
845
846
  params: {
846
847
  id: string;
847
848
  assets: `${string}:${string}/${string}:${string}`[];
848
849
  };
849
- jsonrpc: "2.0";
850
850
  }, {
851
851
  method: import("@metamask/superstruct").Struct<"keyring_getAccountBalances", "keyring_getAccountBalances">;
852
852
  params: import("@metamask/superstruct").Struct<{
@@ -866,40 +866,40 @@ export declare const GetAccountBalancesResponseStruct: import("@metamask/superst
866
866
  }>, null>;
867
867
  export type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
868
868
  export declare const ResolveAccountAddressRequestStruct: import("@metamask/superstruct").Struct<{
869
- id: string | number | null;
870
869
  method: "keyring_resolveAccountAddress";
870
+ id: string | number | null;
871
+ jsonrpc: "2.0";
871
872
  params: {
872
- scope: `${string}:${string}`;
873
873
  request: {
874
- jsonrpc: "2.0";
875
- id: string | number | null;
876
874
  method: string;
875
+ id: string | number | null;
876
+ jsonrpc: "2.0";
877
877
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
878
878
  };
879
+ scope: `${string}:${string}`;
879
880
  };
880
- jsonrpc: "2.0";
881
881
  }, {
882
882
  method: import("@metamask/superstruct").Struct<"keyring_resolveAccountAddress", "keyring_resolveAccountAddress">;
883
883
  params: import("@metamask/superstruct").Struct<{
884
- scope: `${string}:${string}`;
885
884
  request: {
886
- jsonrpc: "2.0";
887
- id: string | number | null;
888
885
  method: string;
886
+ id: string | number | null;
887
+ jsonrpc: "2.0";
889
888
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
890
889
  };
890
+ scope: `${string}:${string}`;
891
891
  }, {
892
892
  scope: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
893
893
  request: import("@metamask/superstruct").Struct<{
894
- jsonrpc: "2.0";
895
- id: string | number | null;
896
894
  method: string;
895
+ id: string | number | null;
896
+ jsonrpc: "2.0";
897
897
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
898
898
  }, {
899
899
  jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
900
900
  id: import("@metamask/superstruct").Struct<string | number | null, null>;
901
901
  method: import("@metamask/superstruct").Struct<string, null>;
902
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/keyring-utils").ExactOptionalTag | import("@metamask/utils").Json[], null>;
902
+ params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
903
903
  }>;
904
904
  }>;
905
905
  jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
@@ -913,13 +913,13 @@ export declare const ResolveAccountAddressResponseStruct: import("@metamask/supe
913
913
  }>;
914
914
  export type ResolveAccountAddressResponse = Infer<typeof ResolveAccountAddressResponseStruct>;
915
915
  export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
916
- id: string | number | null;
917
916
  method: "keyring_filterAccountChains";
917
+ id: string | number | null;
918
+ jsonrpc: "2.0";
918
919
  params: {
919
920
  id: string;
920
921
  chains: string[];
921
922
  };
922
- jsonrpc: "2.0";
923
923
  }, {
924
924
  method: import("@metamask/superstruct").Struct<"keyring_filterAccountChains", "keyring_filterAccountChains">;
925
925
  params: import("@metamask/superstruct").Struct<{
@@ -936,14 +936,13 @@ export type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>
936
936
  export declare const FilterAccountChainsResponseStruct: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
937
937
  export type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
938
938
  export declare const UpdateAccountRequestStruct: import("@metamask/superstruct").Struct<{
939
- id: string | number | null;
940
939
  method: "keyring_updateAccount";
940
+ id: string | number | null;
941
+ jsonrpc: "2.0";
941
942
  params: {
942
943
  account: {
943
944
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
944
945
  id: string;
945
- address: string;
946
- scopes: `${string}:${string}`[];
947
946
  options: Record<string, import("@metamask/utils").Json> & {
948
947
  entropy?: {
949
948
  type: "mnemonic";
@@ -957,18 +956,17 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
957
956
  };
958
957
  exportable?: boolean;
959
958
  };
959
+ address: string;
960
+ scopes: `${string}:${string}`[];
960
961
  methods: string[];
961
962
  };
962
963
  };
963
- jsonrpc: "2.0";
964
964
  }, {
965
965
  method: import("@metamask/superstruct").Struct<"keyring_updateAccount", "keyring_updateAccount">;
966
966
  params: import("@metamask/superstruct").Struct<{
967
967
  account: {
968
968
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
969
969
  id: string;
970
- address: string;
971
- scopes: `${string}:${string}`[];
972
970
  options: Record<string, import("@metamask/utils").Json> & {
973
971
  entropy?: {
974
972
  type: "mnemonic";
@@ -982,14 +980,14 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
982
980
  };
983
981
  exportable?: boolean;
984
982
  };
983
+ address: string;
984
+ scopes: `${string}:${string}`[];
985
985
  methods: string[];
986
986
  };
987
987
  }, {
988
988
  account: import("@metamask/superstruct").Struct<{
989
989
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
990
990
  id: string;
991
- address: string;
992
- scopes: `${string}:${string}`[];
993
991
  options: Record<string, import("@metamask/utils").Json> & {
994
992
  entropy?: {
995
993
  type: "mnemonic";
@@ -1003,6 +1001,8 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
1003
1001
  };
1004
1002
  exportable?: boolean;
1005
1003
  };
1004
+ address: string;
1005
+ scopes: `${string}:${string}`[];
1006
1006
  methods: string[];
1007
1007
  }, {
1008
1008
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -1043,12 +1043,12 @@ export type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;
1043
1043
  export declare const UpdateAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
1044
1044
  export type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;
1045
1045
  export declare const DeleteAccountRequestStruct: import("@metamask/superstruct").Struct<{
1046
- id: string | number | null;
1047
1046
  method: "keyring_deleteAccount";
1047
+ id: string | number | null;
1048
+ jsonrpc: "2.0";
1048
1049
  params: {
1049
1050
  id: string;
1050
1051
  };
1051
- jsonrpc: "2.0";
1052
1052
  }, {
1053
1053
  method: import("@metamask/superstruct").Struct<"keyring_deleteAccount", "keyring_deleteAccount">;
1054
1054
  params: import("@metamask/superstruct").Struct<{
@@ -1063,12 +1063,12 @@ export type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;
1063
1063
  export declare const DeleteAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
1064
1064
  export type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;
1065
1065
  export declare const ExportAccountRequestStruct: import("@metamask/superstruct").Struct<{
1066
- id: string | number | null;
1067
1066
  method: "keyring_exportAccount";
1067
+ id: string | number | null;
1068
+ jsonrpc: "2.0";
1068
1069
  params: {
1069
1070
  id: string;
1070
1071
  };
1071
- jsonrpc: "2.0";
1072
1072
  }, {
1073
1073
  method: import("@metamask/superstruct").Struct<"keyring_exportAccount", "keyring_exportAccount">;
1074
1074
  params: import("@metamask/superstruct").Struct<{
@@ -1083,8 +1083,8 @@ export type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;
1083
1083
  export declare const ExportAccountResponseStruct: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
1084
1084
  export type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;
1085
1085
  export declare const ListRequestsRequestStruct: import("@metamask/superstruct").Struct<{
1086
- id: string | number | null;
1087
1086
  method: "keyring_listRequests";
1087
+ id: string | number | null;
1088
1088
  jsonrpc: "2.0";
1089
1089
  }, {
1090
1090
  method: import("@metamask/superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
@@ -1094,22 +1094,22 @@ export declare const ListRequestsRequestStruct: import("@metamask/superstruct").
1094
1094
  export type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;
1095
1095
  export declare const ListRequestsResponseStruct: import("@metamask/superstruct").Struct<{
1096
1096
  id: string;
1097
- scope: string;
1098
- account: string;
1099
1097
  origin: string;
1100
1098
  request: {
1101
1099
  method: string;
1102
1100
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1103
1101
  };
1104
- }[], import("@metamask/superstruct").Struct<{
1105
- id: string;
1106
1102
  scope: string;
1107
1103
  account: string;
1104
+ }[], import("@metamask/superstruct").Struct<{
1105
+ id: string;
1108
1106
  origin: string;
1109
1107
  request: {
1110
1108
  method: string;
1111
1109
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1112
1110
  };
1111
+ scope: string;
1112
+ account: string;
1113
1113
  }, {
1114
1114
  id: import("@metamask/superstruct").Struct<string, null>;
1115
1115
  scope: import("@metamask/superstruct").Struct<string, null>;
@@ -1120,17 +1120,17 @@ export declare const ListRequestsResponseStruct: import("@metamask/superstruct")
1120
1120
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1121
1121
  }, {
1122
1122
  method: import("@metamask/superstruct").Struct<string, null>;
1123
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/keyring-utils").ExactOptionalTag | import("@metamask/utils").Json[], null>;
1123
+ params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
1124
1124
  }>;
1125
1125
  }>>;
1126
1126
  export type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;
1127
1127
  export declare const GetRequestRequestStruct: import("@metamask/superstruct").Struct<{
1128
- id: string | number | null;
1129
1128
  method: "keyring_getRequest";
1129
+ id: string | number | null;
1130
+ jsonrpc: "2.0";
1130
1131
  params: {
1131
1132
  id: string;
1132
1133
  };
1133
- jsonrpc: "2.0";
1134
1134
  }, {
1135
1135
  method: import("@metamask/superstruct").Struct<"keyring_getRequest", "keyring_getRequest">;
1136
1136
  params: import("@metamask/superstruct").Struct<{
@@ -1144,13 +1144,13 @@ export declare const GetRequestRequestStruct: import("@metamask/superstruct").St
1144
1144
  export type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;
1145
1145
  export declare const GetRequestResponseStruct: import("@metamask/superstruct").Struct<{
1146
1146
  id: string;
1147
- scope: string;
1148
- account: string;
1149
1147
  origin: string;
1150
1148
  request: {
1151
1149
  method: string;
1152
1150
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1153
1151
  };
1152
+ scope: string;
1153
+ account: string;
1154
1154
  }, {
1155
1155
  id: import("@metamask/superstruct").Struct<string, null>;
1156
1156
  scope: import("@metamask/superstruct").Struct<string, null>;
@@ -1161,35 +1161,35 @@ export declare const GetRequestResponseStruct: import("@metamask/superstruct").S
1161
1161
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1162
1162
  }, {
1163
1163
  method: import("@metamask/superstruct").Struct<string, null>;
1164
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/keyring-utils").ExactOptionalTag | import("@metamask/utils").Json[], null>;
1164
+ params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
1165
1165
  }>;
1166
1166
  }>;
1167
1167
  export type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;
1168
1168
  export declare const SubmitRequestRequestStruct: import("@metamask/superstruct").Struct<{
1169
- id: string | number | null;
1170
1169
  method: "keyring_submitRequest";
1170
+ id: string | number | null;
1171
+ jsonrpc: "2.0";
1171
1172
  params: {
1172
1173
  id: string;
1173
- scope: string;
1174
- account: string;
1175
1174
  origin: string;
1176
1175
  request: {
1177
1176
  method: string;
1178
1177
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1179
1178
  };
1179
+ scope: string;
1180
+ account: string;
1180
1181
  };
1181
- jsonrpc: "2.0";
1182
1182
  }, {
1183
1183
  method: import("@metamask/superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
1184
1184
  params: import("@metamask/superstruct").Struct<{
1185
1185
  id: string;
1186
- scope: string;
1187
- account: string;
1188
1186
  origin: string;
1189
1187
  request: {
1190
1188
  method: string;
1191
1189
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1192
1190
  };
1191
+ scope: string;
1192
+ account: string;
1193
1193
  }, {
1194
1194
  id: import("@metamask/superstruct").Struct<string, null>;
1195
1195
  scope: import("@metamask/superstruct").Struct<string, null>;
@@ -1200,7 +1200,7 @@ export declare const SubmitRequestRequestStruct: import("@metamask/superstruct")
1200
1200
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
1201
1201
  }, {
1202
1202
  method: import("@metamask/superstruct").Struct<string, null>;
1203
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/keyring-utils").ExactOptionalTag | import("@metamask/utils").Json[], null>;
1203
+ params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
1204
1204
  }>;
1205
1205
  }>;
1206
1206
  jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
@@ -1214,23 +1214,23 @@ export declare const SubmitRequestResponseStruct: import("@metamask/superstruct"
1214
1214
  url?: string;
1215
1215
  };
1216
1216
  } | {
1217
- pending: false;
1218
1217
  result: import("@metamask/utils").Json;
1218
+ pending: false;
1219
1219
  }, null>;
1220
1220
  export type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;
1221
1221
  export declare const ApproveRequestRequestStruct: import("@metamask/superstruct").Struct<{
1222
- id: string | number | null;
1223
1222
  method: "keyring_approveRequest";
1223
+ id: string | number | null;
1224
+ jsonrpc: "2.0";
1224
1225
  params: {
1225
- id: string;
1226
1226
  data: Record<string, import("@metamask/utils").Json>;
1227
+ id: string;
1227
1228
  };
1228
- jsonrpc: "2.0";
1229
1229
  }, {
1230
1230
  method: import("@metamask/superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
1231
1231
  params: import("@metamask/superstruct").Struct<{
1232
- id: string;
1233
1232
  data: Record<string, import("@metamask/utils").Json>;
1233
+ id: string;
1234
1234
  }, {
1235
1235
  id: import("@metamask/superstruct").Struct<string, null>;
1236
1236
  data: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
@@ -1242,12 +1242,12 @@ export type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;
1242
1242
  export declare const ApproveRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
1243
1243
  export type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;
1244
1244
  export declare const RejectRequestRequestStruct: import("@metamask/superstruct").Struct<{
1245
- id: string | number | null;
1246
1245
  method: "keyring_rejectRequest";
1246
+ id: string | number | null;
1247
+ jsonrpc: "2.0";
1247
1248
  params: {
1248
1249
  id: string;
1249
1250
  };
1250
- jsonrpc: "2.0";
1251
1251
  }, {
1252
1252
  method: import("@metamask/superstruct").Struct<"keyring_rejectRequest", "keyring_rejectRequest">;
1253
1253
  params: import("@metamask/superstruct").Struct<{