@metamask-previews/keyring-internal-api 11.0.1-4bf3baf → 11.0.1-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.
@@ -5,12 +5,12 @@ import type { Infer } from "@metamask/superstruct";
5
5
  */
6
6
  export declare const KeyringRequestWithoutOriginStruct: import("@metamask/superstruct").Struct<{
7
7
  id: string;
8
+ scope: string;
9
+ account: string;
8
10
  request: {
9
11
  method: string;
10
12
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
11
13
  };
12
- scope: string;
13
- account: string;
14
14
  }, Omit<{
15
15
  id: import("@metamask/superstruct").Struct<string, null>;
16
16
  scope: import("@metamask/superstruct").Struct<string, null>;
@@ -35,8 +35,8 @@ export declare const KeyringResponseWithoutOriginStruct: import("@metamask/super
35
35
  url?: string;
36
36
  };
37
37
  } | {
38
- result: import("@metamask/utils").Json;
39
38
  pending: false;
39
+ result: import("@metamask/utils").Json;
40
40
  }, null>;
41
41
  export type KeyringResponseWithoutOrigin = Infer<typeof KeyringResponseWithoutOriginStruct>;
42
42
  export declare const SubmitRequestResponseV1Struct: import("@metamask/superstruct").Struct<{
@@ -46,8 +46,8 @@ export declare const SubmitRequestResponseV1Struct: import("@metamask/superstruc
46
46
  url?: string;
47
47
  };
48
48
  } | {
49
- result: import("@metamask/utils").Json;
50
49
  pending: false;
50
+ result: import("@metamask/utils").Json;
51
51
  }, null>;
52
52
  /**
53
53
  * Converts a keyring request to a keyring request v1.
@@ -5,12 +5,12 @@ import type { Infer } from "@metamask/superstruct";
5
5
  */
6
6
  export declare const KeyringRequestWithoutOriginStruct: import("@metamask/superstruct").Struct<{
7
7
  id: string;
8
+ scope: string;
9
+ account: string;
8
10
  request: {
9
11
  method: string;
10
12
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
11
13
  };
12
- scope: string;
13
- account: string;
14
14
  }, Omit<{
15
15
  id: import("@metamask/superstruct").Struct<string, null>;
16
16
  scope: import("@metamask/superstruct").Struct<string, null>;
@@ -35,8 +35,8 @@ export declare const KeyringResponseWithoutOriginStruct: import("@metamask/super
35
35
  url?: string;
36
36
  };
37
37
  } | {
38
- result: import("@metamask/utils").Json;
39
38
  pending: false;
39
+ result: import("@metamask/utils").Json;
40
40
  }, null>;
41
41
  export type KeyringResponseWithoutOrigin = Infer<typeof KeyringResponseWithoutOriginStruct>;
42
42
  export declare const SubmitRequestResponseV1Struct: import("@metamask/superstruct").Struct<{
@@ -46,8 +46,8 @@ export declare const SubmitRequestResponseV1Struct: import("@metamask/superstruc
46
46
  url?: string;
47
47
  };
48
48
  } | {
49
- result: import("@metamask/utils").Json;
50
49
  pending: false;
50
+ result: import("@metamask/utils").Json;
51
51
  }, null>;
52
52
  /**
53
53
  * Converts a keyring request to a keyring request v1.
package/dist/types.d.cts CHANGED
@@ -8,10 +8,10 @@ export declare const InternalAccountMetadataStruct: Struct<{
8
8
  keyring: {
9
9
  type: string;
10
10
  };
11
+ nameLastUpdatedAt?: number;
11
12
  snap?: {
12
13
  id: string;
13
14
  };
14
- nameLastUpdatedAt?: number;
15
15
  lastSelected?: number;
16
16
  };
17
17
  }, {
@@ -21,10 +21,10 @@ export declare const InternalAccountMetadataStruct: Struct<{
21
21
  keyring: {
22
22
  type: string;
23
23
  };
24
+ nameLastUpdatedAt?: number;
24
25
  snap?: {
25
26
  id: string;
26
27
  };
27
- nameLastUpdatedAt?: number;
28
28
  lastSelected?: number;
29
29
  }, {
30
30
  name: Struct<string, null>;
@@ -44,36 +44,36 @@ export declare const InternalAccountMetadataStruct: Struct<{
44
44
  }>;
45
45
  }>;
46
46
  export declare const InternalEthEoaAccountStruct: Struct<{
47
- type: "eip155:eoa";
48
47
  id: string;
49
- options: Record<string, import("@metamask/utils").Json> & {
50
- entropy?: {
51
- type: "mnemonic";
52
- id: string;
53
- derivationPath: string;
54
- groupIndex: number;
55
- } | {
56
- type: "private-key";
57
- } | {
58
- type: "custom";
59
- };
60
- exportable?: boolean;
61
- };
62
48
  metadata: {
63
49
  name: string;
64
50
  importTime: number;
65
51
  keyring: {
66
52
  type: string;
67
53
  };
54
+ nameLastUpdatedAt?: number;
68
55
  snap?: {
69
56
  id: string;
70
57
  };
71
- nameLastUpdatedAt?: number;
72
58
  lastSelected?: number;
73
59
  };
60
+ type: "eip155:eoa";
74
61
  address: string;
75
62
  scopes: import("@metamask/keyring-api").EthScope.Eoa[];
76
63
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
64
+ options: Record<string, import("@metamask/utils").Json> & {
65
+ entropy?: {
66
+ type: "mnemonic";
67
+ id: string;
68
+ derivationPath: string;
69
+ groupIndex: number;
70
+ } | {
71
+ type: "private-key";
72
+ } | {
73
+ type: "custom";
74
+ };
75
+ exportable?: boolean;
76
+ };
77
77
  }, {
78
78
  metadata: Struct<{
79
79
  name: string;
@@ -81,10 +81,10 @@ export declare const InternalEthEoaAccountStruct: Struct<{
81
81
  keyring: {
82
82
  type: string;
83
83
  };
84
+ nameLastUpdatedAt?: number;
84
85
  snap?: {
85
86
  id: string;
86
87
  };
87
- nameLastUpdatedAt?: number;
88
88
  lastSelected?: number;
89
89
  }, {
90
90
  name: Struct<string, null>;
@@ -129,36 +129,36 @@ export declare const InternalEthEoaAccountStruct: Struct<{
129
129
  }, null>;
130
130
  }>;
131
131
  export declare const InternalEthErc4337AccountStruct: Struct<{
132
- type: "eip155:erc4337";
133
132
  id: string;
134
- options: Record<string, import("@metamask/utils").Json> & {
135
- entropy?: {
136
- type: "mnemonic";
137
- id: string;
138
- derivationPath: string;
139
- groupIndex: number;
140
- } | {
141
- type: "private-key";
142
- } | {
143
- type: "custom";
144
- };
145
- exportable?: boolean;
146
- };
147
133
  metadata: {
148
134
  name: string;
149
135
  importTime: number;
150
136
  keyring: {
151
137
  type: string;
152
138
  };
139
+ nameLastUpdatedAt?: number;
153
140
  snap?: {
154
141
  id: string;
155
142
  };
156
- nameLastUpdatedAt?: number;
157
143
  lastSelected?: number;
158
144
  };
145
+ type: "eip155:erc4337";
159
146
  address: string;
160
147
  scopes: `${string}:${string}`[];
161
148
  methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
149
+ options: Record<string, import("@metamask/utils").Json> & {
150
+ entropy?: {
151
+ type: "mnemonic";
152
+ id: string;
153
+ derivationPath: string;
154
+ groupIndex: number;
155
+ } | {
156
+ type: "private-key";
157
+ } | {
158
+ type: "custom";
159
+ };
160
+ exportable?: boolean;
161
+ };
162
162
  }, {
163
163
  metadata: Struct<{
164
164
  name: string;
@@ -166,10 +166,10 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
166
166
  keyring: {
167
167
  type: string;
168
168
  };
169
+ nameLastUpdatedAt?: number;
169
170
  snap?: {
170
171
  id: string;
171
172
  };
172
- nameLastUpdatedAt?: number;
173
173
  lastSelected?: number;
174
174
  }, {
175
175
  name: Struct<string, null>;
@@ -216,36 +216,36 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
216
216
  }, null>;
217
217
  }>;
218
218
  export declare const InternalBtcP2pkhAccountStruct: Struct<{
219
- type: "bip122:p2pkh";
220
219
  id: string;
221
- options: Record<string, import("@metamask/utils").Json> & {
222
- entropy?: {
223
- type: "mnemonic";
224
- id: string;
225
- derivationPath: string;
226
- groupIndex: number;
227
- } | {
228
- type: "private-key";
229
- } | {
230
- type: "custom";
231
- };
232
- exportable?: boolean;
233
- };
234
220
  metadata: {
235
221
  name: string;
236
222
  importTime: number;
237
223
  keyring: {
238
224
  type: string;
239
225
  };
226
+ nameLastUpdatedAt?: number;
240
227
  snap?: {
241
228
  id: string;
242
229
  };
243
- nameLastUpdatedAt?: number;
244
230
  lastSelected?: number;
245
231
  };
232
+ type: "bip122:p2pkh";
246
233
  address: string;
247
234
  scopes: `${string}:${string}`[];
248
235
  methods: import("@metamask/keyring-api").BtcMethod[];
236
+ options: Record<string, import("@metamask/utils").Json> & {
237
+ entropy?: {
238
+ type: "mnemonic";
239
+ id: string;
240
+ derivationPath: string;
241
+ groupIndex: number;
242
+ } | {
243
+ type: "private-key";
244
+ } | {
245
+ type: "custom";
246
+ };
247
+ exportable?: boolean;
248
+ };
249
249
  }, {
250
250
  metadata: Struct<{
251
251
  name: string;
@@ -253,10 +253,10 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
253
253
  keyring: {
254
254
  type: string;
255
255
  };
256
+ nameLastUpdatedAt?: number;
256
257
  snap?: {
257
258
  id: string;
258
259
  };
259
- nameLastUpdatedAt?: number;
260
260
  lastSelected?: number;
261
261
  }, {
262
262
  name: Struct<string, null>;
@@ -304,36 +304,36 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
304
304
  }, null>;
305
305
  }>;
306
306
  export declare const InternalBtcP2shAccountStruct: Struct<{
307
- type: "bip122:p2sh";
308
307
  id: string;
309
- options: Record<string, import("@metamask/utils").Json> & {
310
- entropy?: {
311
- type: "mnemonic";
312
- id: string;
313
- derivationPath: string;
314
- groupIndex: number;
315
- } | {
316
- type: "private-key";
317
- } | {
318
- type: "custom";
319
- };
320
- exportable?: boolean;
321
- };
322
308
  metadata: {
323
309
  name: string;
324
310
  importTime: number;
325
311
  keyring: {
326
312
  type: string;
327
313
  };
314
+ nameLastUpdatedAt?: number;
328
315
  snap?: {
329
316
  id: string;
330
317
  };
331
- nameLastUpdatedAt?: number;
332
318
  lastSelected?: number;
333
319
  };
320
+ type: "bip122:p2sh";
334
321
  address: string;
335
322
  scopes: `${string}:${string}`[];
336
323
  methods: import("@metamask/keyring-api").BtcMethod[];
324
+ options: Record<string, import("@metamask/utils").Json> & {
325
+ entropy?: {
326
+ type: "mnemonic";
327
+ id: string;
328
+ derivationPath: string;
329
+ groupIndex: number;
330
+ } | {
331
+ type: "private-key";
332
+ } | {
333
+ type: "custom";
334
+ };
335
+ exportable?: boolean;
336
+ };
337
337
  }, {
338
338
  metadata: Struct<{
339
339
  name: string;
@@ -341,10 +341,10 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
341
341
  keyring: {
342
342
  type: string;
343
343
  };
344
+ nameLastUpdatedAt?: number;
344
345
  snap?: {
345
346
  id: string;
346
347
  };
347
- nameLastUpdatedAt?: number;
348
348
  lastSelected?: number;
349
349
  }, {
350
350
  name: Struct<string, null>;
@@ -392,36 +392,36 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
392
392
  }, null>;
393
393
  }>;
394
394
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
395
- type: "bip122:p2wpkh";
396
395
  id: string;
397
- options: Record<string, import("@metamask/utils").Json> & {
398
- entropy?: {
399
- type: "mnemonic";
400
- id: string;
401
- derivationPath: string;
402
- groupIndex: number;
403
- } | {
404
- type: "private-key";
405
- } | {
406
- type: "custom";
407
- };
408
- exportable?: boolean;
409
- };
410
396
  metadata: {
411
397
  name: string;
412
398
  importTime: number;
413
399
  keyring: {
414
400
  type: string;
415
401
  };
402
+ nameLastUpdatedAt?: number;
416
403
  snap?: {
417
404
  id: string;
418
405
  };
419
- nameLastUpdatedAt?: number;
420
406
  lastSelected?: number;
421
407
  };
408
+ type: "bip122:p2wpkh";
422
409
  address: string;
423
410
  scopes: `${string}:${string}`[];
424
411
  methods: import("@metamask/keyring-api").BtcMethod[];
412
+ options: Record<string, import("@metamask/utils").Json> & {
413
+ entropy?: {
414
+ type: "mnemonic";
415
+ id: string;
416
+ derivationPath: string;
417
+ groupIndex: number;
418
+ } | {
419
+ type: "private-key";
420
+ } | {
421
+ type: "custom";
422
+ };
423
+ exportable?: boolean;
424
+ };
425
425
  }, {
426
426
  metadata: Struct<{
427
427
  name: string;
@@ -429,10 +429,10 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
429
429
  keyring: {
430
430
  type: string;
431
431
  };
432
+ nameLastUpdatedAt?: number;
432
433
  snap?: {
433
434
  id: string;
434
435
  };
435
- nameLastUpdatedAt?: number;
436
436
  lastSelected?: number;
437
437
  }, {
438
438
  name: Struct<string, null>;
@@ -480,36 +480,36 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
480
480
  }, null>;
481
481
  }>;
482
482
  export declare const InternalBtcP2trAccountStruct: Struct<{
483
- type: "bip122:p2tr";
484
483
  id: string;
485
- options: Record<string, import("@metamask/utils").Json> & {
486
- entropy?: {
487
- type: "mnemonic";
488
- id: string;
489
- derivationPath: string;
490
- groupIndex: number;
491
- } | {
492
- type: "private-key";
493
- } | {
494
- type: "custom";
495
- };
496
- exportable?: boolean;
497
- };
498
484
  metadata: {
499
485
  name: string;
500
486
  importTime: number;
501
487
  keyring: {
502
488
  type: string;
503
489
  };
490
+ nameLastUpdatedAt?: number;
504
491
  snap?: {
505
492
  id: string;
506
493
  };
507
- nameLastUpdatedAt?: number;
508
494
  lastSelected?: number;
509
495
  };
496
+ type: "bip122:p2tr";
510
497
  address: string;
511
498
  scopes: `${string}:${string}`[];
512
499
  methods: import("@metamask/keyring-api").BtcMethod[];
500
+ options: Record<string, import("@metamask/utils").Json> & {
501
+ entropy?: {
502
+ type: "mnemonic";
503
+ id: string;
504
+ derivationPath: string;
505
+ groupIndex: number;
506
+ } | {
507
+ type: "private-key";
508
+ } | {
509
+ type: "custom";
510
+ };
511
+ exportable?: boolean;
512
+ };
513
513
  }, {
514
514
  metadata: Struct<{
515
515
  name: string;
@@ -517,10 +517,10 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
517
517
  keyring: {
518
518
  type: string;
519
519
  };
520
+ nameLastUpdatedAt?: number;
520
521
  snap?: {
521
522
  id: string;
522
523
  };
523
- nameLastUpdatedAt?: number;
524
524
  lastSelected?: number;
525
525
  }, {
526
526
  name: Struct<string, null>;
@@ -568,36 +568,36 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
568
568
  }, null>;
569
569
  }>;
570
570
  export declare const InternalSolDataAccountStruct: Struct<{
571
- type: "solana:data-account";
572
571
  id: string;
573
- options: Record<string, import("@metamask/utils").Json> & {
574
- entropy?: {
575
- type: "mnemonic";
576
- id: string;
577
- derivationPath: string;
578
- groupIndex: number;
579
- } | {
580
- type: "private-key";
581
- } | {
582
- type: "custom";
583
- };
584
- exportable?: boolean;
585
- };
586
572
  metadata: {
587
573
  name: string;
588
574
  importTime: number;
589
575
  keyring: {
590
576
  type: string;
591
577
  };
578
+ nameLastUpdatedAt?: number;
592
579
  snap?: {
593
580
  id: string;
594
581
  };
595
- nameLastUpdatedAt?: number;
596
582
  lastSelected?: number;
597
583
  };
584
+ type: "solana:data-account";
598
585
  address: string;
599
586
  scopes: `${string}:${string}`[];
600
587
  methods: import("@metamask/keyring-api").SolMethod[];
588
+ options: Record<string, import("@metamask/utils").Json> & {
589
+ entropy?: {
590
+ type: "mnemonic";
591
+ id: string;
592
+ derivationPath: string;
593
+ groupIndex: number;
594
+ } | {
595
+ type: "private-key";
596
+ } | {
597
+ type: "custom";
598
+ };
599
+ exportable?: boolean;
600
+ };
601
601
  }, {
602
602
  metadata: Struct<{
603
603
  name: string;
@@ -605,10 +605,10 @@ export declare const InternalSolDataAccountStruct: Struct<{
605
605
  keyring: {
606
606
  type: string;
607
607
  };
608
+ nameLastUpdatedAt?: number;
608
609
  snap?: {
609
610
  id: string;
610
611
  };
611
- nameLastUpdatedAt?: number;
612
612
  lastSelected?: number;
613
613
  }, {
614
614
  name: Struct<string, null>;
@@ -652,36 +652,36 @@ export declare const InternalSolDataAccountStruct: Struct<{
652
652
  }, null>;
653
653
  }>;
654
654
  export declare const InternalTrxEoaAccountStruct: Struct<{
655
- type: "tron:eoa";
656
655
  id: string;
657
- options: Record<string, import("@metamask/utils").Json> & {
658
- entropy?: {
659
- type: "mnemonic";
660
- id: string;
661
- derivationPath: string;
662
- groupIndex: number;
663
- } | {
664
- type: "private-key";
665
- } | {
666
- type: "custom";
667
- };
668
- exportable?: boolean;
669
- };
670
656
  metadata: {
671
657
  name: string;
672
658
  importTime: number;
673
659
  keyring: {
674
660
  type: string;
675
661
  };
662
+ nameLastUpdatedAt?: number;
676
663
  snap?: {
677
664
  id: string;
678
665
  };
679
- nameLastUpdatedAt?: number;
680
666
  lastSelected?: number;
681
667
  };
668
+ type: "tron:eoa";
682
669
  address: string;
683
670
  scopes: `${string}:${string}`[];
684
671
  methods: import("@metamask/keyring-api").TrxMethod[];
672
+ options: Record<string, import("@metamask/utils").Json> & {
673
+ entropy?: {
674
+ type: "mnemonic";
675
+ id: string;
676
+ derivationPath: string;
677
+ groupIndex: number;
678
+ } | {
679
+ type: "private-key";
680
+ } | {
681
+ type: "custom";
682
+ };
683
+ exportable?: boolean;
684
+ };
685
685
  }, {
686
686
  metadata: Struct<{
687
687
  name: string;
@@ -689,10 +689,10 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
689
689
  keyring: {
690
690
  type: string;
691
691
  };
692
+ nameLastUpdatedAt?: number;
692
693
  snap?: {
693
694
  id: string;
694
695
  };
695
- nameLastUpdatedAt?: number;
696
696
  lastSelected?: number;
697
697
  }, {
698
698
  name: Struct<string, null>;
@@ -735,36 +735,36 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
735
735
  }, null>;
736
736
  }>;
737
737
  export declare const InternalXlmAccountStruct: Struct<{
738
- type: "stellar:account";
739
738
  id: string;
740
- options: Record<string, import("@metamask/utils").Json> & {
741
- entropy?: {
742
- type: "mnemonic";
743
- id: string;
744
- derivationPath: string;
745
- groupIndex: number;
746
- } | {
747
- type: "private-key";
748
- } | {
749
- type: "custom";
750
- };
751
- exportable?: boolean;
752
- };
753
739
  metadata: {
754
740
  name: string;
755
741
  importTime: number;
756
742
  keyring: {
757
743
  type: string;
758
744
  };
745
+ nameLastUpdatedAt?: number;
759
746
  snap?: {
760
747
  id: string;
761
748
  };
762
- nameLastUpdatedAt?: number;
763
749
  lastSelected?: number;
764
750
  };
751
+ type: "stellar:account";
765
752
  address: string;
766
753
  scopes: `${string}:${string}`[];
767
754
  methods: import("@metamask/keyring-api").XlmMethod[];
755
+ options: Record<string, import("@metamask/utils").Json> & {
756
+ entropy?: {
757
+ type: "mnemonic";
758
+ id: string;
759
+ derivationPath: string;
760
+ groupIndex: number;
761
+ } | {
762
+ type: "private-key";
763
+ } | {
764
+ type: "custom";
765
+ };
766
+ exportable?: boolean;
767
+ };
768
768
  }, {
769
769
  metadata: Struct<{
770
770
  name: string;
@@ -772,10 +772,10 @@ export declare const InternalXlmAccountStruct: Struct<{
772
772
  keyring: {
773
773
  type: string;
774
774
  };
775
+ nameLastUpdatedAt?: number;
775
776
  snap?: {
776
777
  id: string;
777
778
  };
778
- nameLastUpdatedAt?: number;
779
779
  lastSelected?: number;
780
780
  }, {
781
781
  name: Struct<string, null>;
@@ -828,36 +828,36 @@ export type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;
828
828
  export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2pkhAccount> | Struct<InternalBtcP2shAccount> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalBtcP2trAccount> | Struct<InternalSolDataAccount> | Struct<InternalTrxEoaAccount> | Struct<InternalXlmAccount>>;
829
829
  export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2pkhAccount | InternalBtcP2shAccount | InternalBtcP2wpkhAccount | InternalBtcP2trAccount | InternalSolDataAccount | InternalTrxEoaAccount | InternalXlmAccount;
830
830
  export declare const InternalAccountStruct: Struct<{
831
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
832
831
  id: string;
833
- options: Record<string, import("@metamask/utils").Json> & {
834
- entropy?: {
835
- type: "mnemonic";
836
- id: string;
837
- derivationPath: string;
838
- groupIndex: number;
839
- } | {
840
- type: "private-key";
841
- } | {
842
- type: "custom";
843
- };
844
- exportable?: boolean;
845
- };
846
832
  metadata: {
847
833
  name: string;
848
834
  importTime: number;
849
835
  keyring: {
850
836
  type: string;
851
837
  };
838
+ nameLastUpdatedAt?: number;
852
839
  snap?: {
853
840
  id: string;
854
841
  };
855
- nameLastUpdatedAt?: number;
856
842
  lastSelected?: number;
857
843
  };
844
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
858
845
  address: string;
859
846
  scopes: `${string}:${string}`[];
860
847
  methods: string[];
848
+ options: Record<string, import("@metamask/utils").Json> & {
849
+ entropy?: {
850
+ type: "mnemonic";
851
+ id: string;
852
+ derivationPath: string;
853
+ groupIndex: number;
854
+ } | {
855
+ type: "private-key";
856
+ } | {
857
+ type: "custom";
858
+ };
859
+ exportable?: boolean;
860
+ };
861
861
  }, {
862
862
  metadata: Struct<{
863
863
  name: string;
@@ -865,10 +865,10 @@ export declare const InternalAccountStruct: Struct<{
865
865
  keyring: {
866
866
  type: string;
867
867
  };
868
+ nameLastUpdatedAt?: number;
868
869
  snap?: {
869
870
  id: string;
870
871
  };
871
- nameLastUpdatedAt?: number;
872
872
  lastSelected?: number;
873
873
  }, {
874
874
  name: Struct<string, null>;
package/dist/types.d.mts CHANGED
@@ -8,10 +8,10 @@ export declare const InternalAccountMetadataStruct: Struct<{
8
8
  keyring: {
9
9
  type: string;
10
10
  };
11
+ nameLastUpdatedAt?: number;
11
12
  snap?: {
12
13
  id: string;
13
14
  };
14
- nameLastUpdatedAt?: number;
15
15
  lastSelected?: number;
16
16
  };
17
17
  }, {
@@ -21,10 +21,10 @@ export declare const InternalAccountMetadataStruct: Struct<{
21
21
  keyring: {
22
22
  type: string;
23
23
  };
24
+ nameLastUpdatedAt?: number;
24
25
  snap?: {
25
26
  id: string;
26
27
  };
27
- nameLastUpdatedAt?: number;
28
28
  lastSelected?: number;
29
29
  }, {
30
30
  name: Struct<string, null>;
@@ -44,36 +44,36 @@ export declare const InternalAccountMetadataStruct: Struct<{
44
44
  }>;
45
45
  }>;
46
46
  export declare const InternalEthEoaAccountStruct: Struct<{
47
- type: "eip155:eoa";
48
47
  id: string;
49
- options: Record<string, import("@metamask/utils").Json> & {
50
- entropy?: {
51
- type: "mnemonic";
52
- id: string;
53
- derivationPath: string;
54
- groupIndex: number;
55
- } | {
56
- type: "private-key";
57
- } | {
58
- type: "custom";
59
- };
60
- exportable?: boolean;
61
- };
62
48
  metadata: {
63
49
  name: string;
64
50
  importTime: number;
65
51
  keyring: {
66
52
  type: string;
67
53
  };
54
+ nameLastUpdatedAt?: number;
68
55
  snap?: {
69
56
  id: string;
70
57
  };
71
- nameLastUpdatedAt?: number;
72
58
  lastSelected?: number;
73
59
  };
60
+ type: "eip155:eoa";
74
61
  address: string;
75
62
  scopes: import("@metamask/keyring-api").EthScope.Eoa[];
76
63
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
64
+ options: Record<string, import("@metamask/utils").Json> & {
65
+ entropy?: {
66
+ type: "mnemonic";
67
+ id: string;
68
+ derivationPath: string;
69
+ groupIndex: number;
70
+ } | {
71
+ type: "private-key";
72
+ } | {
73
+ type: "custom";
74
+ };
75
+ exportable?: boolean;
76
+ };
77
77
  }, {
78
78
  metadata: Struct<{
79
79
  name: string;
@@ -81,10 +81,10 @@ export declare const InternalEthEoaAccountStruct: Struct<{
81
81
  keyring: {
82
82
  type: string;
83
83
  };
84
+ nameLastUpdatedAt?: number;
84
85
  snap?: {
85
86
  id: string;
86
87
  };
87
- nameLastUpdatedAt?: number;
88
88
  lastSelected?: number;
89
89
  }, {
90
90
  name: Struct<string, null>;
@@ -129,36 +129,36 @@ export declare const InternalEthEoaAccountStruct: Struct<{
129
129
  }, null>;
130
130
  }>;
131
131
  export declare const InternalEthErc4337AccountStruct: Struct<{
132
- type: "eip155:erc4337";
133
132
  id: string;
134
- options: Record<string, import("@metamask/utils").Json> & {
135
- entropy?: {
136
- type: "mnemonic";
137
- id: string;
138
- derivationPath: string;
139
- groupIndex: number;
140
- } | {
141
- type: "private-key";
142
- } | {
143
- type: "custom";
144
- };
145
- exportable?: boolean;
146
- };
147
133
  metadata: {
148
134
  name: string;
149
135
  importTime: number;
150
136
  keyring: {
151
137
  type: string;
152
138
  };
139
+ nameLastUpdatedAt?: number;
153
140
  snap?: {
154
141
  id: string;
155
142
  };
156
- nameLastUpdatedAt?: number;
157
143
  lastSelected?: number;
158
144
  };
145
+ type: "eip155:erc4337";
159
146
  address: string;
160
147
  scopes: `${string}:${string}`[];
161
148
  methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
149
+ options: Record<string, import("@metamask/utils").Json> & {
150
+ entropy?: {
151
+ type: "mnemonic";
152
+ id: string;
153
+ derivationPath: string;
154
+ groupIndex: number;
155
+ } | {
156
+ type: "private-key";
157
+ } | {
158
+ type: "custom";
159
+ };
160
+ exportable?: boolean;
161
+ };
162
162
  }, {
163
163
  metadata: Struct<{
164
164
  name: string;
@@ -166,10 +166,10 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
166
166
  keyring: {
167
167
  type: string;
168
168
  };
169
+ nameLastUpdatedAt?: number;
169
170
  snap?: {
170
171
  id: string;
171
172
  };
172
- nameLastUpdatedAt?: number;
173
173
  lastSelected?: number;
174
174
  }, {
175
175
  name: Struct<string, null>;
@@ -216,36 +216,36 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
216
216
  }, null>;
217
217
  }>;
218
218
  export declare const InternalBtcP2pkhAccountStruct: Struct<{
219
- type: "bip122:p2pkh";
220
219
  id: string;
221
- options: Record<string, import("@metamask/utils").Json> & {
222
- entropy?: {
223
- type: "mnemonic";
224
- id: string;
225
- derivationPath: string;
226
- groupIndex: number;
227
- } | {
228
- type: "private-key";
229
- } | {
230
- type: "custom";
231
- };
232
- exportable?: boolean;
233
- };
234
220
  metadata: {
235
221
  name: string;
236
222
  importTime: number;
237
223
  keyring: {
238
224
  type: string;
239
225
  };
226
+ nameLastUpdatedAt?: number;
240
227
  snap?: {
241
228
  id: string;
242
229
  };
243
- nameLastUpdatedAt?: number;
244
230
  lastSelected?: number;
245
231
  };
232
+ type: "bip122:p2pkh";
246
233
  address: string;
247
234
  scopes: `${string}:${string}`[];
248
235
  methods: import("@metamask/keyring-api").BtcMethod[];
236
+ options: Record<string, import("@metamask/utils").Json> & {
237
+ entropy?: {
238
+ type: "mnemonic";
239
+ id: string;
240
+ derivationPath: string;
241
+ groupIndex: number;
242
+ } | {
243
+ type: "private-key";
244
+ } | {
245
+ type: "custom";
246
+ };
247
+ exportable?: boolean;
248
+ };
249
249
  }, {
250
250
  metadata: Struct<{
251
251
  name: string;
@@ -253,10 +253,10 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
253
253
  keyring: {
254
254
  type: string;
255
255
  };
256
+ nameLastUpdatedAt?: number;
256
257
  snap?: {
257
258
  id: string;
258
259
  };
259
- nameLastUpdatedAt?: number;
260
260
  lastSelected?: number;
261
261
  }, {
262
262
  name: Struct<string, null>;
@@ -304,36 +304,36 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
304
304
  }, null>;
305
305
  }>;
306
306
  export declare const InternalBtcP2shAccountStruct: Struct<{
307
- type: "bip122:p2sh";
308
307
  id: string;
309
- options: Record<string, import("@metamask/utils").Json> & {
310
- entropy?: {
311
- type: "mnemonic";
312
- id: string;
313
- derivationPath: string;
314
- groupIndex: number;
315
- } | {
316
- type: "private-key";
317
- } | {
318
- type: "custom";
319
- };
320
- exportable?: boolean;
321
- };
322
308
  metadata: {
323
309
  name: string;
324
310
  importTime: number;
325
311
  keyring: {
326
312
  type: string;
327
313
  };
314
+ nameLastUpdatedAt?: number;
328
315
  snap?: {
329
316
  id: string;
330
317
  };
331
- nameLastUpdatedAt?: number;
332
318
  lastSelected?: number;
333
319
  };
320
+ type: "bip122:p2sh";
334
321
  address: string;
335
322
  scopes: `${string}:${string}`[];
336
323
  methods: import("@metamask/keyring-api").BtcMethod[];
324
+ options: Record<string, import("@metamask/utils").Json> & {
325
+ entropy?: {
326
+ type: "mnemonic";
327
+ id: string;
328
+ derivationPath: string;
329
+ groupIndex: number;
330
+ } | {
331
+ type: "private-key";
332
+ } | {
333
+ type: "custom";
334
+ };
335
+ exportable?: boolean;
336
+ };
337
337
  }, {
338
338
  metadata: Struct<{
339
339
  name: string;
@@ -341,10 +341,10 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
341
341
  keyring: {
342
342
  type: string;
343
343
  };
344
+ nameLastUpdatedAt?: number;
344
345
  snap?: {
345
346
  id: string;
346
347
  };
347
- nameLastUpdatedAt?: number;
348
348
  lastSelected?: number;
349
349
  }, {
350
350
  name: Struct<string, null>;
@@ -392,36 +392,36 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
392
392
  }, null>;
393
393
  }>;
394
394
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
395
- type: "bip122:p2wpkh";
396
395
  id: string;
397
- options: Record<string, import("@metamask/utils").Json> & {
398
- entropy?: {
399
- type: "mnemonic";
400
- id: string;
401
- derivationPath: string;
402
- groupIndex: number;
403
- } | {
404
- type: "private-key";
405
- } | {
406
- type: "custom";
407
- };
408
- exportable?: boolean;
409
- };
410
396
  metadata: {
411
397
  name: string;
412
398
  importTime: number;
413
399
  keyring: {
414
400
  type: string;
415
401
  };
402
+ nameLastUpdatedAt?: number;
416
403
  snap?: {
417
404
  id: string;
418
405
  };
419
- nameLastUpdatedAt?: number;
420
406
  lastSelected?: number;
421
407
  };
408
+ type: "bip122:p2wpkh";
422
409
  address: string;
423
410
  scopes: `${string}:${string}`[];
424
411
  methods: import("@metamask/keyring-api").BtcMethod[];
412
+ options: Record<string, import("@metamask/utils").Json> & {
413
+ entropy?: {
414
+ type: "mnemonic";
415
+ id: string;
416
+ derivationPath: string;
417
+ groupIndex: number;
418
+ } | {
419
+ type: "private-key";
420
+ } | {
421
+ type: "custom";
422
+ };
423
+ exportable?: boolean;
424
+ };
425
425
  }, {
426
426
  metadata: Struct<{
427
427
  name: string;
@@ -429,10 +429,10 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
429
429
  keyring: {
430
430
  type: string;
431
431
  };
432
+ nameLastUpdatedAt?: number;
432
433
  snap?: {
433
434
  id: string;
434
435
  };
435
- nameLastUpdatedAt?: number;
436
436
  lastSelected?: number;
437
437
  }, {
438
438
  name: Struct<string, null>;
@@ -480,36 +480,36 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
480
480
  }, null>;
481
481
  }>;
482
482
  export declare const InternalBtcP2trAccountStruct: Struct<{
483
- type: "bip122:p2tr";
484
483
  id: string;
485
- options: Record<string, import("@metamask/utils").Json> & {
486
- entropy?: {
487
- type: "mnemonic";
488
- id: string;
489
- derivationPath: string;
490
- groupIndex: number;
491
- } | {
492
- type: "private-key";
493
- } | {
494
- type: "custom";
495
- };
496
- exportable?: boolean;
497
- };
498
484
  metadata: {
499
485
  name: string;
500
486
  importTime: number;
501
487
  keyring: {
502
488
  type: string;
503
489
  };
490
+ nameLastUpdatedAt?: number;
504
491
  snap?: {
505
492
  id: string;
506
493
  };
507
- nameLastUpdatedAt?: number;
508
494
  lastSelected?: number;
509
495
  };
496
+ type: "bip122:p2tr";
510
497
  address: string;
511
498
  scopes: `${string}:${string}`[];
512
499
  methods: import("@metamask/keyring-api").BtcMethod[];
500
+ options: Record<string, import("@metamask/utils").Json> & {
501
+ entropy?: {
502
+ type: "mnemonic";
503
+ id: string;
504
+ derivationPath: string;
505
+ groupIndex: number;
506
+ } | {
507
+ type: "private-key";
508
+ } | {
509
+ type: "custom";
510
+ };
511
+ exportable?: boolean;
512
+ };
513
513
  }, {
514
514
  metadata: Struct<{
515
515
  name: string;
@@ -517,10 +517,10 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
517
517
  keyring: {
518
518
  type: string;
519
519
  };
520
+ nameLastUpdatedAt?: number;
520
521
  snap?: {
521
522
  id: string;
522
523
  };
523
- nameLastUpdatedAt?: number;
524
524
  lastSelected?: number;
525
525
  }, {
526
526
  name: Struct<string, null>;
@@ -568,36 +568,36 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
568
568
  }, null>;
569
569
  }>;
570
570
  export declare const InternalSolDataAccountStruct: Struct<{
571
- type: "solana:data-account";
572
571
  id: string;
573
- options: Record<string, import("@metamask/utils").Json> & {
574
- entropy?: {
575
- type: "mnemonic";
576
- id: string;
577
- derivationPath: string;
578
- groupIndex: number;
579
- } | {
580
- type: "private-key";
581
- } | {
582
- type: "custom";
583
- };
584
- exportable?: boolean;
585
- };
586
572
  metadata: {
587
573
  name: string;
588
574
  importTime: number;
589
575
  keyring: {
590
576
  type: string;
591
577
  };
578
+ nameLastUpdatedAt?: number;
592
579
  snap?: {
593
580
  id: string;
594
581
  };
595
- nameLastUpdatedAt?: number;
596
582
  lastSelected?: number;
597
583
  };
584
+ type: "solana:data-account";
598
585
  address: string;
599
586
  scopes: `${string}:${string}`[];
600
587
  methods: import("@metamask/keyring-api").SolMethod[];
588
+ options: Record<string, import("@metamask/utils").Json> & {
589
+ entropy?: {
590
+ type: "mnemonic";
591
+ id: string;
592
+ derivationPath: string;
593
+ groupIndex: number;
594
+ } | {
595
+ type: "private-key";
596
+ } | {
597
+ type: "custom";
598
+ };
599
+ exportable?: boolean;
600
+ };
601
601
  }, {
602
602
  metadata: Struct<{
603
603
  name: string;
@@ -605,10 +605,10 @@ export declare const InternalSolDataAccountStruct: Struct<{
605
605
  keyring: {
606
606
  type: string;
607
607
  };
608
+ nameLastUpdatedAt?: number;
608
609
  snap?: {
609
610
  id: string;
610
611
  };
611
- nameLastUpdatedAt?: number;
612
612
  lastSelected?: number;
613
613
  }, {
614
614
  name: Struct<string, null>;
@@ -652,36 +652,36 @@ export declare const InternalSolDataAccountStruct: Struct<{
652
652
  }, null>;
653
653
  }>;
654
654
  export declare const InternalTrxEoaAccountStruct: Struct<{
655
- type: "tron:eoa";
656
655
  id: string;
657
- options: Record<string, import("@metamask/utils").Json> & {
658
- entropy?: {
659
- type: "mnemonic";
660
- id: string;
661
- derivationPath: string;
662
- groupIndex: number;
663
- } | {
664
- type: "private-key";
665
- } | {
666
- type: "custom";
667
- };
668
- exportable?: boolean;
669
- };
670
656
  metadata: {
671
657
  name: string;
672
658
  importTime: number;
673
659
  keyring: {
674
660
  type: string;
675
661
  };
662
+ nameLastUpdatedAt?: number;
676
663
  snap?: {
677
664
  id: string;
678
665
  };
679
- nameLastUpdatedAt?: number;
680
666
  lastSelected?: number;
681
667
  };
668
+ type: "tron:eoa";
682
669
  address: string;
683
670
  scopes: `${string}:${string}`[];
684
671
  methods: import("@metamask/keyring-api").TrxMethod[];
672
+ options: Record<string, import("@metamask/utils").Json> & {
673
+ entropy?: {
674
+ type: "mnemonic";
675
+ id: string;
676
+ derivationPath: string;
677
+ groupIndex: number;
678
+ } | {
679
+ type: "private-key";
680
+ } | {
681
+ type: "custom";
682
+ };
683
+ exportable?: boolean;
684
+ };
685
685
  }, {
686
686
  metadata: Struct<{
687
687
  name: string;
@@ -689,10 +689,10 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
689
689
  keyring: {
690
690
  type: string;
691
691
  };
692
+ nameLastUpdatedAt?: number;
692
693
  snap?: {
693
694
  id: string;
694
695
  };
695
- nameLastUpdatedAt?: number;
696
696
  lastSelected?: number;
697
697
  }, {
698
698
  name: Struct<string, null>;
@@ -735,36 +735,36 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
735
735
  }, null>;
736
736
  }>;
737
737
  export declare const InternalXlmAccountStruct: Struct<{
738
- type: "stellar:account";
739
738
  id: string;
740
- options: Record<string, import("@metamask/utils").Json> & {
741
- entropy?: {
742
- type: "mnemonic";
743
- id: string;
744
- derivationPath: string;
745
- groupIndex: number;
746
- } | {
747
- type: "private-key";
748
- } | {
749
- type: "custom";
750
- };
751
- exportable?: boolean;
752
- };
753
739
  metadata: {
754
740
  name: string;
755
741
  importTime: number;
756
742
  keyring: {
757
743
  type: string;
758
744
  };
745
+ nameLastUpdatedAt?: number;
759
746
  snap?: {
760
747
  id: string;
761
748
  };
762
- nameLastUpdatedAt?: number;
763
749
  lastSelected?: number;
764
750
  };
751
+ type: "stellar:account";
765
752
  address: string;
766
753
  scopes: `${string}:${string}`[];
767
754
  methods: import("@metamask/keyring-api").XlmMethod[];
755
+ options: Record<string, import("@metamask/utils").Json> & {
756
+ entropy?: {
757
+ type: "mnemonic";
758
+ id: string;
759
+ derivationPath: string;
760
+ groupIndex: number;
761
+ } | {
762
+ type: "private-key";
763
+ } | {
764
+ type: "custom";
765
+ };
766
+ exportable?: boolean;
767
+ };
768
768
  }, {
769
769
  metadata: Struct<{
770
770
  name: string;
@@ -772,10 +772,10 @@ export declare const InternalXlmAccountStruct: Struct<{
772
772
  keyring: {
773
773
  type: string;
774
774
  };
775
+ nameLastUpdatedAt?: number;
775
776
  snap?: {
776
777
  id: string;
777
778
  };
778
- nameLastUpdatedAt?: number;
779
779
  lastSelected?: number;
780
780
  }, {
781
781
  name: Struct<string, null>;
@@ -828,36 +828,36 @@ export type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;
828
828
  export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2pkhAccount> | Struct<InternalBtcP2shAccount> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalBtcP2trAccount> | Struct<InternalSolDataAccount> | Struct<InternalTrxEoaAccount> | Struct<InternalXlmAccount>>;
829
829
  export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2pkhAccount | InternalBtcP2shAccount | InternalBtcP2wpkhAccount | InternalBtcP2trAccount | InternalSolDataAccount | InternalTrxEoaAccount | InternalXlmAccount;
830
830
  export declare const InternalAccountStruct: Struct<{
831
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
832
831
  id: string;
833
- options: Record<string, import("@metamask/utils").Json> & {
834
- entropy?: {
835
- type: "mnemonic";
836
- id: string;
837
- derivationPath: string;
838
- groupIndex: number;
839
- } | {
840
- type: "private-key";
841
- } | {
842
- type: "custom";
843
- };
844
- exportable?: boolean;
845
- };
846
832
  metadata: {
847
833
  name: string;
848
834
  importTime: number;
849
835
  keyring: {
850
836
  type: string;
851
837
  };
838
+ nameLastUpdatedAt?: number;
852
839
  snap?: {
853
840
  id: string;
854
841
  };
855
- nameLastUpdatedAt?: number;
856
842
  lastSelected?: number;
857
843
  };
844
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
858
845
  address: string;
859
846
  scopes: `${string}:${string}`[];
860
847
  methods: string[];
848
+ options: Record<string, import("@metamask/utils").Json> & {
849
+ entropy?: {
850
+ type: "mnemonic";
851
+ id: string;
852
+ derivationPath: string;
853
+ groupIndex: number;
854
+ } | {
855
+ type: "private-key";
856
+ } | {
857
+ type: "custom";
858
+ };
859
+ exportable?: boolean;
860
+ };
861
861
  }, {
862
862
  metadata: Struct<{
863
863
  name: string;
@@ -865,10 +865,10 @@ export declare const InternalAccountStruct: Struct<{
865
865
  keyring: {
866
866
  type: string;
867
867
  };
868
+ nameLastUpdatedAt?: number;
868
869
  snap?: {
869
870
  id: string;
870
871
  };
871
- nameLastUpdatedAt?: number;
872
872
  lastSelected?: number;
873
873
  }, {
874
874
  name: Struct<string, null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-internal-api",
3
- "version": "11.0.1-4bf3baf",
3
+ "version": "11.0.1-862665d",
4
4
  "description": "MetaMask Keyring Internal API",
5
5
  "keywords": [
6
6
  "keyring",