@metamask-previews/keyring-internal-api 6.0.1-33a98a2 → 6.1.0-1e1233a

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.1.0]
11
+
12
+ ### Added
13
+
14
+ - Add support for Bitcoin account type: p2pkh, p2sh, p2tr ([#284](https://github.com/MetaMask/accounts/pull/284))
15
+ - Bump `@metamask/keyring-api` from `^17.4.0` to `^17.6.0` ([#277](https://github.com/MetaMask/accounts/pull/277)), ([#288](https://github.com/MetaMask/accounts/pull/288))
16
+
10
17
  ## [6.0.1]
11
18
 
12
19
  ### Changed
@@ -92,7 +99,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
92
99
  - This new version fixes a bug with CJS re-exports.
93
100
  - Initial release ([#24](https://github.com/MetaMask/accounts/pull/24))
94
101
 
95
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@6.0.1...HEAD
102
+ [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@6.1.0...HEAD
103
+ [6.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@6.0.1...@metamask/keyring-internal-api@6.1.0
96
104
  [6.0.1]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@6.0.0...@metamask/keyring-internal-api@6.0.1
97
105
  [6.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@5.0.0...@metamask/keyring-internal-api@6.0.0
98
106
  [5.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@4.0.3...@metamask/keyring-internal-api@5.0.0
package/dist/types.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  // FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`
5
5
  // and `InternalAccountTypes`.
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.InternalAccountStruct = exports.InternalAccountStructs = exports.InternalSolDataAccountStruct = exports.InternalBtcP2wpkhAccountStruct = exports.InternalEthErc4337AccountStruct = exports.InternalEthEoaAccountStruct = exports.InternalAccountMetadataStruct = void 0;
7
+ exports.InternalAccountStruct = exports.InternalAccountStructs = exports.InternalSolDataAccountStruct = exports.InternalBtcP2trAccountStruct = exports.InternalBtcP2wpkhAccountStruct = exports.InternalBtcP2shAccountStruct = exports.InternalBtcP2pkhAccountStruct = exports.InternalEthErc4337AccountStruct = exports.InternalEthEoaAccountStruct = exports.InternalAccountMetadataStruct = void 0;
8
8
  const keyring_api_1 = require("@metamask/keyring-api");
9
9
  const keyring_utils_1 = require("@metamask/keyring-utils");
10
10
  const superstruct_1 = require("@metamask/superstruct");
@@ -14,6 +14,8 @@ exports.InternalAccountMetadataStruct = (0, keyring_utils_1.object)({
14
14
  nameLastUpdatedAt: (0, keyring_utils_1.exactOptional)((0, superstruct_1.number)()),
15
15
  snap: (0, keyring_utils_1.exactOptional)((0, keyring_utils_1.object)({
16
16
  id: (0, superstruct_1.string)(),
17
+ enabled: (0, superstruct_1.boolean)(),
18
+ name: (0, superstruct_1.string)(),
17
19
  })),
18
20
  lastSelected: (0, keyring_utils_1.exactOptional)((0, superstruct_1.number)()),
19
21
  importTime: (0, superstruct_1.number)(),
@@ -30,10 +32,22 @@ exports.InternalEthErc4337AccountStruct = (0, keyring_utils_1.object)({
30
32
  ...keyring_api_1.EthErc4337AccountStruct.schema,
31
33
  ...exports.InternalAccountMetadataStruct.schema,
32
34
  });
35
+ exports.InternalBtcP2pkhAccountStruct = (0, keyring_utils_1.object)({
36
+ ...keyring_api_1.BtcP2pkhAccountStruct.schema,
37
+ ...exports.InternalAccountMetadataStruct.schema,
38
+ });
39
+ exports.InternalBtcP2shAccountStruct = (0, keyring_utils_1.object)({
40
+ ...keyring_api_1.BtcP2shAccountStruct.schema,
41
+ ...exports.InternalAccountMetadataStruct.schema,
42
+ });
33
43
  exports.InternalBtcP2wpkhAccountStruct = (0, keyring_utils_1.object)({
34
44
  ...keyring_api_1.BtcP2wpkhAccountStruct.schema,
35
45
  ...exports.InternalAccountMetadataStruct.schema,
36
46
  });
47
+ exports.InternalBtcP2trAccountStruct = (0, keyring_utils_1.object)({
48
+ ...keyring_api_1.BtcP2trAccountStruct.schema,
49
+ ...exports.InternalAccountMetadataStruct.schema,
50
+ });
37
51
  exports.InternalSolDataAccountStruct = (0, keyring_utils_1.object)({
38
52
  ...keyring_api_1.SolDataAccountStruct.schema,
39
53
  ...exports.InternalAccountMetadataStruct.schema,
@@ -41,7 +55,10 @@ exports.InternalSolDataAccountStruct = (0, keyring_utils_1.object)({
41
55
  exports.InternalAccountStructs = {
42
56
  [`${keyring_api_1.EthAccountType.Eoa}`]: exports.InternalEthEoaAccountStruct,
43
57
  [`${keyring_api_1.EthAccountType.Erc4337}`]: exports.InternalEthErc4337AccountStruct,
58
+ [`${keyring_api_1.BtcAccountType.P2pkh}`]: exports.InternalBtcP2pkhAccountStruct,
59
+ [`${keyring_api_1.BtcAccountType.P2sh}`]: exports.InternalBtcP2shAccountStruct,
44
60
  [`${keyring_api_1.BtcAccountType.P2wpkh}`]: exports.InternalBtcP2wpkhAccountStruct,
61
+ [`${keyring_api_1.BtcAccountType.P2tr}`]: exports.InternalBtcP2trAccountStruct,
45
62
  [`${keyring_api_1.SolAccountType.DataAccount}`]: exports.InternalSolDataAccountStruct,
46
63
  };
47
64
  exports.InternalAccountStruct = (0, keyring_utils_1.object)({
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4FAA4F;AAC5F,8BAA8B;;;AAE9B,uDAS+B;AAC/B,2DAAgE;AAEhE,uDAAuD;AAO1C,QAAA,6BAA6B,GAAG,IAAA,sBAAM,EAAC;IAClD,QAAQ,EAAE,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oCAA4B;CAChE,CAAC;AAQW,QAAA,qBAAqB,GAAG,IAAA,sBAAM,EAAC;IAC1C,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n// FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`\n// and `InternalAccountTypes`.\n\nimport {\n BtcAccountType,\n EthAccountType,\n KeyringAccountStruct,\n SolAccountType,\n BtcP2wpkhAccountStruct,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { exactOptional, object } from '@metamask/keyring-utils';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType;\n\nexport const InternalAccountMetadataStruct = object({\n metadata: object({\n name: string(),\n nameLastUpdatedAt: exactOptional(number()),\n snap: exactOptional(\n object({\n id: string(),\n }),\n ),\n lastSelected: exactOptional(number()),\n importTime: number(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\nexport const InternalEthEoaAccountStruct = object({\n ...EthEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalEthErc4337AccountStruct = object({\n ...EthErc4337AccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2wpkhAccountStruct = object({\n ...BtcP2wpkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalSolDataAccountStruct = object({\n ...SolDataAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;\n\nexport type InternalEthErc4337Account = Infer<\n typeof InternalEthErc4337AccountStruct\n>;\n\nexport type InternalBtcP2wpkhAccount = Infer<\n typeof InternalBtcP2wpkhAccountStruct\n>;\n\nexport type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;\n\nexport const InternalAccountStructs: Record<\n string,\n | Struct<InternalEthEoaAccount>\n | Struct<InternalEthErc4337Account>\n | Struct<InternalBtcP2wpkhAccount>\n | Struct<InternalSolDataAccount>\n> = {\n [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,\n [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,\n [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,\n [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2wpkhAccount\n | InternalSolDataAccount;\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4FAA4F;AAC5F,8BAA8B;;;AAE9B,uDAY+B;AAC/B,2DAAgE;AAEhE,uDAAgE;AAOnD,QAAA,6BAA6B,GAAG,IAAA,sBAAM,EAAC;IAClD,QAAQ,EAAE,IAAA,sBAAM,EAAC;QACf,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd,iBAAiB,EAAE,IAAA,6BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QAC1C,IAAI,EAAE,IAAA,6BAAa,EACjB,IAAA,sBAAM,EAAC;YACL,EAAE,EAAE,IAAA,oBAAM,GAAE;YACZ,OAAO,EAAE,IAAA,qBAAO,GAAE;YAClB,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC,CACH;QACD,YAAY,E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O,EAAE,CAAC,EAAE,uCAA+B;IAC9D,CAAC,GAAG,4BAAc,CAAC,KAAK,EAAE,CAAC,EAAE,qCAA6B;IAC1D,CAAC,GAAG,4BAAc,CAAC,IAAI,EAAE,CAAC,EAAE,oCAA4B;IACxD,CAAC,GAAG,4BAAc,CAAC,MAAM,EAAE,CAAC,EAAE,sCAA8B;IAC5D,CAAC,GAAG,4BAAc,CAAC,IAAI,EAAE,CAAC,EAAE,oCAA4B;IACxD,CAAC,GAAG,4BAAc,CAAC,WAAW,EAAE,CAAC,EAAE,oCAA4B;CAChE,CAAC;AAWW,QAAA,qBAAqB,GAAG,IAAA,sBAAM,EAAC;IAC1C,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n// FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`\n// and `InternalAccountTypes`.\n\nimport {\n BtcAccountType,\n EthAccountType,\n KeyringAccountStruct,\n SolAccountType,\n BtcP2pkhAccountStruct,\n BtcP2shAccountStruct,\n BtcP2wpkhAccountStruct,\n BtcP2trAccountStruct,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { exactOptional, object } from '@metamask/keyring-utils';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { boolean, string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType;\n\nexport const InternalAccountMetadataStruct = object({\n metadata: object({\n name: string(),\n nameLastUpdatedAt: exactOptional(number()),\n snap: exactOptional(\n object({\n id: string(),\n enabled: boolean(),\n name: string(),\n }),\n ),\n lastSelected: exactOptional(number()),\n importTime: number(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\nexport const InternalEthEoaAccountStruct = object({\n ...EthEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalEthErc4337AccountStruct = object({\n ...EthErc4337AccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2pkhAccountStruct = object({\n ...BtcP2pkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2shAccountStruct = object({\n ...BtcP2shAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2wpkhAccountStruct = object({\n ...BtcP2wpkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2trAccountStruct = object({\n ...BtcP2trAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalSolDataAccountStruct = object({\n ...SolDataAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;\n\nexport type InternalEthErc4337Account = Infer<\n typeof InternalEthErc4337AccountStruct\n>;\n\nexport type InternalBtcP2pkhAccount = Infer<\n typeof InternalBtcP2pkhAccountStruct\n>;\n\nexport type InternalBtcP2shAccount = Infer<typeof InternalBtcP2shAccountStruct>;\n\nexport type InternalBtcP2wpkhAccount = Infer<\n typeof InternalBtcP2wpkhAccountStruct\n>;\n\nexport type InternalBtcP2trAccount = Infer<typeof InternalBtcP2trAccountStruct>;\n\nexport type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;\n\nexport const InternalAccountStructs: Record<\n string,\n | Struct<InternalEthEoaAccount>\n | Struct<InternalEthErc4337Account>\n | Struct<InternalBtcP2pkhAccount>\n | Struct<InternalBtcP2shAccount>\n | Struct<InternalBtcP2wpkhAccount>\n | Struct<InternalBtcP2trAccount>\n | Struct<InternalSolDataAccount>\n> = {\n [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,\n [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,\n [`${BtcAccountType.P2pkh}`]: InternalBtcP2pkhAccountStruct,\n [`${BtcAccountType.P2sh}`]: InternalBtcP2shAccountStruct,\n [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,\n [`${BtcAccountType.P2tr}`]: InternalBtcP2trAccountStruct,\n [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount;\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
package/dist/types.d.cts CHANGED
@@ -10,7 +10,9 @@ export declare const InternalAccountMetadataStruct: Struct<{
10
10
  };
11
11
  nameLastUpdatedAt?: number;
12
12
  snap?: {
13
+ name: string;
13
14
  id: string;
15
+ enabled: boolean;
14
16
  };
15
17
  lastSelected?: number;
16
18
  };
@@ -23,16 +25,22 @@ export declare const InternalAccountMetadataStruct: Struct<{
23
25
  };
24
26
  nameLastUpdatedAt?: number;
25
27
  snap?: {
28
+ name: string;
26
29
  id: string;
30
+ enabled: boolean;
27
31
  };
28
32
  lastSelected?: number;
29
33
  }, {
30
34
  name: Struct<string, null>;
31
35
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
32
36
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
37
+ name: string;
33
38
  id: string;
39
+ enabled: boolean;
34
40
  }, {
35
41
  id: Struct<string, null>;
42
+ enabled: Struct<boolean, null>;
43
+ name: Struct<string, null>;
36
44
  }>;
37
45
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
38
46
  importTime: Struct<number, null>;
@@ -55,7 +63,9 @@ export declare const InternalEthEoaAccountStruct: Struct<{
55
63
  };
56
64
  nameLastUpdatedAt?: number;
57
65
  snap?: {
66
+ name: string;
58
67
  id: string;
68
+ enabled: boolean;
59
69
  };
60
70
  lastSelected?: number;
61
71
  };
@@ -71,16 +81,22 @@ export declare const InternalEthEoaAccountStruct: Struct<{
71
81
  };
72
82
  nameLastUpdatedAt?: number;
73
83
  snap?: {
84
+ name: string;
74
85
  id: string;
86
+ enabled: boolean;
75
87
  };
76
88
  lastSelected?: number;
77
89
  }, {
78
90
  name: Struct<string, null>;
79
91
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
80
92
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
93
+ name: string;
81
94
  id: string;
95
+ enabled: boolean;
82
96
  }, {
83
97
  id: Struct<string, null>;
98
+ enabled: Struct<boolean, null>;
99
+ name: Struct<string, null>;
84
100
  }>;
85
101
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
86
102
  importTime: Struct<number, null>;
@@ -116,7 +132,9 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
116
132
  };
117
133
  nameLastUpdatedAt?: number;
118
134
  snap?: {
135
+ name: string;
119
136
  id: string;
137
+ enabled: boolean;
120
138
  };
121
139
  lastSelected?: number;
122
140
  };
@@ -132,16 +150,22 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
132
150
  };
133
151
  nameLastUpdatedAt?: number;
134
152
  snap?: {
153
+ name: string;
135
154
  id: string;
155
+ enabled: boolean;
136
156
  };
137
157
  lastSelected?: number;
138
158
  }, {
139
159
  name: Struct<string, null>;
140
160
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
141
161
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
162
+ name: string;
142
163
  id: string;
164
+ enabled: boolean;
143
165
  }, {
144
166
  id: Struct<string, null>;
167
+ enabled: Struct<boolean, null>;
168
+ name: Struct<string, null>;
145
169
  }>;
146
170
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
147
171
  importTime: Struct<number, null>;
@@ -167,6 +191,134 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
167
191
  id: import("@metamask/superstruct").Struct<string, null>;
168
192
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
169
193
  }>;
194
+ export declare const InternalBtcP2pkhAccountStruct: Struct<{
195
+ type: "bip122:p2pkh";
196
+ id: string;
197
+ options: Record<string, import("@metamask/utils").Json>;
198
+ metadata: {
199
+ name: string;
200
+ importTime: number;
201
+ keyring: {
202
+ type: string;
203
+ };
204
+ nameLastUpdatedAt?: number;
205
+ snap?: {
206
+ name: string;
207
+ id: string;
208
+ enabled: boolean;
209
+ };
210
+ lastSelected?: number;
211
+ };
212
+ address: string;
213
+ scopes: `${string}:${string}`[];
214
+ methods: "sendBitcoin"[];
215
+ }, {
216
+ metadata: Struct<{
217
+ name: string;
218
+ importTime: number;
219
+ keyring: {
220
+ type: string;
221
+ };
222
+ nameLastUpdatedAt?: number;
223
+ snap?: {
224
+ name: string;
225
+ id: string;
226
+ enabled: boolean;
227
+ };
228
+ lastSelected?: number;
229
+ }, {
230
+ name: Struct<string, null>;
231
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
232
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
233
+ name: string;
234
+ id: string;
235
+ enabled: boolean;
236
+ }, {
237
+ id: Struct<string, null>;
238
+ enabled: Struct<boolean, null>;
239
+ name: Struct<string, null>;
240
+ }>;
241
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
242
+ importTime: Struct<number, null>;
243
+ keyring: Struct<{
244
+ type: string;
245
+ }, {
246
+ type: Struct<string, null>;
247
+ }>;
248
+ }>;
249
+ address: import("@metamask/superstruct").Struct<string, null>;
250
+ type: import("@metamask/superstruct").Struct<"bip122:p2pkh", "bip122:p2pkh">;
251
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
252
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
253
+ sendBitcoin: "sendBitcoin";
254
+ }>>;
255
+ id: import("@metamask/superstruct").Struct<string, null>;
256
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
257
+ }>;
258
+ export declare const InternalBtcP2shAccountStruct: Struct<{
259
+ type: "bip122:p2sh";
260
+ id: string;
261
+ options: Record<string, import("@metamask/utils").Json>;
262
+ metadata: {
263
+ name: string;
264
+ importTime: number;
265
+ keyring: {
266
+ type: string;
267
+ };
268
+ nameLastUpdatedAt?: number;
269
+ snap?: {
270
+ name: string;
271
+ id: string;
272
+ enabled: boolean;
273
+ };
274
+ lastSelected?: number;
275
+ };
276
+ address: string;
277
+ scopes: `${string}:${string}`[];
278
+ methods: "sendBitcoin"[];
279
+ }, {
280
+ metadata: Struct<{
281
+ name: string;
282
+ importTime: number;
283
+ keyring: {
284
+ type: string;
285
+ };
286
+ nameLastUpdatedAt?: number;
287
+ snap?: {
288
+ name: string;
289
+ id: string;
290
+ enabled: boolean;
291
+ };
292
+ lastSelected?: number;
293
+ }, {
294
+ name: Struct<string, null>;
295
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
296
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
297
+ name: string;
298
+ id: string;
299
+ enabled: boolean;
300
+ }, {
301
+ id: Struct<string, null>;
302
+ enabled: Struct<boolean, null>;
303
+ name: Struct<string, null>;
304
+ }>;
305
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
306
+ importTime: Struct<number, null>;
307
+ keyring: Struct<{
308
+ type: string;
309
+ }, {
310
+ type: Struct<string, null>;
311
+ }>;
312
+ }>;
313
+ address: import("@metamask/superstruct").Struct<string, null>;
314
+ type: import("@metamask/superstruct").Struct<"bip122:p2sh", "bip122:p2sh">;
315
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
316
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
317
+ sendBitcoin: "sendBitcoin";
318
+ }>>;
319
+ id: import("@metamask/superstruct").Struct<string, null>;
320
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
321
+ }>;
170
322
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
171
323
  type: "bip122:p2wpkh";
172
324
  id: string;
@@ -179,7 +331,9 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
179
331
  };
180
332
  nameLastUpdatedAt?: number;
181
333
  snap?: {
334
+ name: string;
182
335
  id: string;
336
+ enabled: boolean;
183
337
  };
184
338
  lastSelected?: number;
185
339
  };
@@ -195,16 +349,22 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
195
349
  };
196
350
  nameLastUpdatedAt?: number;
197
351
  snap?: {
352
+ name: string;
198
353
  id: string;
354
+ enabled: boolean;
199
355
  };
200
356
  lastSelected?: number;
201
357
  }, {
202
358
  name: Struct<string, null>;
203
359
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
204
360
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
361
+ name: string;
205
362
  id: string;
363
+ enabled: boolean;
206
364
  }, {
207
365
  id: Struct<string, null>;
366
+ enabled: Struct<boolean, null>;
367
+ name: Struct<string, null>;
208
368
  }>;
209
369
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
210
370
  importTime: Struct<number, null>;
@@ -223,6 +383,70 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
223
383
  id: import("@metamask/superstruct").Struct<string, null>;
224
384
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
225
385
  }>;
386
+ export declare const InternalBtcP2trAccountStruct: Struct<{
387
+ type: "bip122:p2tr";
388
+ id: string;
389
+ options: Record<string, import("@metamask/utils").Json>;
390
+ metadata: {
391
+ name: string;
392
+ importTime: number;
393
+ keyring: {
394
+ type: string;
395
+ };
396
+ nameLastUpdatedAt?: number;
397
+ snap?: {
398
+ name: string;
399
+ id: string;
400
+ enabled: boolean;
401
+ };
402
+ lastSelected?: number;
403
+ };
404
+ address: string;
405
+ scopes: `${string}:${string}`[];
406
+ methods: "sendBitcoin"[];
407
+ }, {
408
+ metadata: Struct<{
409
+ name: string;
410
+ importTime: number;
411
+ keyring: {
412
+ type: string;
413
+ };
414
+ nameLastUpdatedAt?: number;
415
+ snap?: {
416
+ name: string;
417
+ id: string;
418
+ enabled: boolean;
419
+ };
420
+ lastSelected?: number;
421
+ }, {
422
+ name: Struct<string, null>;
423
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
424
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
425
+ name: string;
426
+ id: string;
427
+ enabled: boolean;
428
+ }, {
429
+ id: Struct<string, null>;
430
+ enabled: Struct<boolean, null>;
431
+ name: Struct<string, null>;
432
+ }>;
433
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
434
+ importTime: Struct<number, null>;
435
+ keyring: Struct<{
436
+ type: string;
437
+ }, {
438
+ type: Struct<string, null>;
439
+ }>;
440
+ }>;
441
+ address: import("@metamask/superstruct").Struct<string, null>;
442
+ type: import("@metamask/superstruct").Struct<"bip122:p2tr", "bip122:p2tr">;
443
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
444
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
445
+ sendBitcoin: "sendBitcoin";
446
+ }>>;
447
+ id: import("@metamask/superstruct").Struct<string, null>;
448
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
449
+ }>;
226
450
  export declare const InternalSolDataAccountStruct: Struct<{
227
451
  type: "solana:data-account";
228
452
  id: string;
@@ -235,7 +459,9 @@ export declare const InternalSolDataAccountStruct: Struct<{
235
459
  };
236
460
  nameLastUpdatedAt?: number;
237
461
  snap?: {
462
+ name: string;
238
463
  id: string;
464
+ enabled: boolean;
239
465
  };
240
466
  lastSelected?: number;
241
467
  };
@@ -251,16 +477,22 @@ export declare const InternalSolDataAccountStruct: Struct<{
251
477
  };
252
478
  nameLastUpdatedAt?: number;
253
479
  snap?: {
480
+ name: string;
254
481
  id: string;
482
+ enabled: boolean;
255
483
  };
256
484
  lastSelected?: number;
257
485
  }, {
258
486
  name: Struct<string, null>;
259
487
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
260
488
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
489
+ name: string;
261
490
  id: string;
491
+ enabled: boolean;
262
492
  }, {
263
493
  id: Struct<string, null>;
494
+ enabled: Struct<boolean, null>;
495
+ name: Struct<string, null>;
264
496
  }>;
265
497
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
266
498
  importTime: Struct<number, null>;
@@ -285,12 +517,15 @@ export declare const InternalSolDataAccountStruct: Struct<{
285
517
  }>;
286
518
  export type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
287
519
  export type InternalEthErc4337Account = Infer<typeof InternalEthErc4337AccountStruct>;
520
+ export type InternalBtcP2pkhAccount = Infer<typeof InternalBtcP2pkhAccountStruct>;
521
+ export type InternalBtcP2shAccount = Infer<typeof InternalBtcP2shAccountStruct>;
288
522
  export type InternalBtcP2wpkhAccount = Infer<typeof InternalBtcP2wpkhAccountStruct>;
523
+ export type InternalBtcP2trAccount = Infer<typeof InternalBtcP2trAccountStruct>;
289
524
  export type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;
290
- export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalSolDataAccount>>;
291
- export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2wpkhAccount | InternalSolDataAccount;
525
+ export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2pkhAccount> | Struct<InternalBtcP2shAccount> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalBtcP2trAccount> | Struct<InternalSolDataAccount>>;
526
+ export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2pkhAccount | InternalBtcP2shAccount | InternalBtcP2wpkhAccount | InternalBtcP2trAccount | InternalSolDataAccount;
292
527
  export declare const InternalAccountStruct: Struct<{
293
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
528
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
294
529
  id: string;
295
530
  options: Record<string, import("@metamask/utils").Json>;
296
531
  metadata: {
@@ -301,7 +536,9 @@ export declare const InternalAccountStruct: Struct<{
301
536
  };
302
537
  nameLastUpdatedAt?: number;
303
538
  snap?: {
539
+ name: string;
304
540
  id: string;
541
+ enabled: boolean;
305
542
  };
306
543
  lastSelected?: number;
307
544
  };
@@ -317,16 +554,22 @@ export declare const InternalAccountStruct: Struct<{
317
554
  };
318
555
  nameLastUpdatedAt?: number;
319
556
  snap?: {
557
+ name: string;
320
558
  id: string;
559
+ enabled: boolean;
321
560
  };
322
561
  lastSelected?: number;
323
562
  }, {
324
563
  name: Struct<string, null>;
325
564
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
326
565
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
566
+ name: string;
327
567
  id: string;
568
+ enabled: boolean;
328
569
  }, {
329
570
  id: Struct<string, null>;
571
+ enabled: Struct<boolean, null>;
572
+ name: Struct<string, null>;
330
573
  }>;
331
574
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
332
575
  importTime: Struct<number, null>;
@@ -337,10 +580,13 @@ export declare const InternalAccountStruct: Struct<{
337
580
  }>;
338
581
  }>;
339
582
  id: import("@metamask/superstruct").Struct<string, null>;
340
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
583
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account", {
341
584
  "eip155:eoa": "eip155:eoa";
342
585
  "eip155:erc4337": "eip155:erc4337";
586
+ "bip122:p2pkh": "bip122:p2pkh";
587
+ "bip122:p2sh": "bip122:p2sh";
343
588
  "bip122:p2wpkh": "bip122:p2wpkh";
589
+ "bip122:p2tr": "bip122:p2tr";
344
590
  "solana:data-account": "solana:data-account";
345
591
  }>;
346
592
  address: import("@metamask/superstruct").Struct<string, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EACd,cAAc,EAEd,cAAc,EAKf,8BAA8B;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAG3D,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAexC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAuB,GAAG,KAAK,CACzC,OAAO,6BAA6B,CACrC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEhF,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAC1C,OAAO,8BAA8B,CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEhF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEhF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,MAAM,EACJ,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,yBAAyB,CAAC,GACjC,MAAM,CAAC,uBAAuB,CAAC,GAC/B,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,wBAAwB,CAAC,GAChC,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,sBAAsB,CAAC,CASjC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,CAAC;AAE3B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/dist/types.d.mts CHANGED
@@ -10,7 +10,9 @@ export declare const InternalAccountMetadataStruct: Struct<{
10
10
  };
11
11
  nameLastUpdatedAt?: number;
12
12
  snap?: {
13
+ name: string;
13
14
  id: string;
15
+ enabled: boolean;
14
16
  };
15
17
  lastSelected?: number;
16
18
  };
@@ -23,16 +25,22 @@ export declare const InternalAccountMetadataStruct: Struct<{
23
25
  };
24
26
  nameLastUpdatedAt?: number;
25
27
  snap?: {
28
+ name: string;
26
29
  id: string;
30
+ enabled: boolean;
27
31
  };
28
32
  lastSelected?: number;
29
33
  }, {
30
34
  name: Struct<string, null>;
31
35
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
32
36
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
37
+ name: string;
33
38
  id: string;
39
+ enabled: boolean;
34
40
  }, {
35
41
  id: Struct<string, null>;
42
+ enabled: Struct<boolean, null>;
43
+ name: Struct<string, null>;
36
44
  }>;
37
45
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
38
46
  importTime: Struct<number, null>;
@@ -55,7 +63,9 @@ export declare const InternalEthEoaAccountStruct: Struct<{
55
63
  };
56
64
  nameLastUpdatedAt?: number;
57
65
  snap?: {
66
+ name: string;
58
67
  id: string;
68
+ enabled: boolean;
59
69
  };
60
70
  lastSelected?: number;
61
71
  };
@@ -71,16 +81,22 @@ export declare const InternalEthEoaAccountStruct: Struct<{
71
81
  };
72
82
  nameLastUpdatedAt?: number;
73
83
  snap?: {
84
+ name: string;
74
85
  id: string;
86
+ enabled: boolean;
75
87
  };
76
88
  lastSelected?: number;
77
89
  }, {
78
90
  name: Struct<string, null>;
79
91
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
80
92
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
93
+ name: string;
81
94
  id: string;
95
+ enabled: boolean;
82
96
  }, {
83
97
  id: Struct<string, null>;
98
+ enabled: Struct<boolean, null>;
99
+ name: Struct<string, null>;
84
100
  }>;
85
101
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
86
102
  importTime: Struct<number, null>;
@@ -116,7 +132,9 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
116
132
  };
117
133
  nameLastUpdatedAt?: number;
118
134
  snap?: {
135
+ name: string;
119
136
  id: string;
137
+ enabled: boolean;
120
138
  };
121
139
  lastSelected?: number;
122
140
  };
@@ -132,16 +150,22 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
132
150
  };
133
151
  nameLastUpdatedAt?: number;
134
152
  snap?: {
153
+ name: string;
135
154
  id: string;
155
+ enabled: boolean;
136
156
  };
137
157
  lastSelected?: number;
138
158
  }, {
139
159
  name: Struct<string, null>;
140
160
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
141
161
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
162
+ name: string;
142
163
  id: string;
164
+ enabled: boolean;
143
165
  }, {
144
166
  id: Struct<string, null>;
167
+ enabled: Struct<boolean, null>;
168
+ name: Struct<string, null>;
145
169
  }>;
146
170
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
147
171
  importTime: Struct<number, null>;
@@ -167,6 +191,134 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
167
191
  id: import("@metamask/superstruct").Struct<string, null>;
168
192
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
169
193
  }>;
194
+ export declare const InternalBtcP2pkhAccountStruct: Struct<{
195
+ type: "bip122:p2pkh";
196
+ id: string;
197
+ options: Record<string, import("@metamask/utils").Json>;
198
+ metadata: {
199
+ name: string;
200
+ importTime: number;
201
+ keyring: {
202
+ type: string;
203
+ };
204
+ nameLastUpdatedAt?: number;
205
+ snap?: {
206
+ name: string;
207
+ id: string;
208
+ enabled: boolean;
209
+ };
210
+ lastSelected?: number;
211
+ };
212
+ address: string;
213
+ scopes: `${string}:${string}`[];
214
+ methods: "sendBitcoin"[];
215
+ }, {
216
+ metadata: Struct<{
217
+ name: string;
218
+ importTime: number;
219
+ keyring: {
220
+ type: string;
221
+ };
222
+ nameLastUpdatedAt?: number;
223
+ snap?: {
224
+ name: string;
225
+ id: string;
226
+ enabled: boolean;
227
+ };
228
+ lastSelected?: number;
229
+ }, {
230
+ name: Struct<string, null>;
231
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
232
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
233
+ name: string;
234
+ id: string;
235
+ enabled: boolean;
236
+ }, {
237
+ id: Struct<string, null>;
238
+ enabled: Struct<boolean, null>;
239
+ name: Struct<string, null>;
240
+ }>;
241
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
242
+ importTime: Struct<number, null>;
243
+ keyring: Struct<{
244
+ type: string;
245
+ }, {
246
+ type: Struct<string, null>;
247
+ }>;
248
+ }>;
249
+ address: import("@metamask/superstruct").Struct<string, null>;
250
+ type: import("@metamask/superstruct").Struct<"bip122:p2pkh", "bip122:p2pkh">;
251
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
252
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
253
+ sendBitcoin: "sendBitcoin";
254
+ }>>;
255
+ id: import("@metamask/superstruct").Struct<string, null>;
256
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
257
+ }>;
258
+ export declare const InternalBtcP2shAccountStruct: Struct<{
259
+ type: "bip122:p2sh";
260
+ id: string;
261
+ options: Record<string, import("@metamask/utils").Json>;
262
+ metadata: {
263
+ name: string;
264
+ importTime: number;
265
+ keyring: {
266
+ type: string;
267
+ };
268
+ nameLastUpdatedAt?: number;
269
+ snap?: {
270
+ name: string;
271
+ id: string;
272
+ enabled: boolean;
273
+ };
274
+ lastSelected?: number;
275
+ };
276
+ address: string;
277
+ scopes: `${string}:${string}`[];
278
+ methods: "sendBitcoin"[];
279
+ }, {
280
+ metadata: Struct<{
281
+ name: string;
282
+ importTime: number;
283
+ keyring: {
284
+ type: string;
285
+ };
286
+ nameLastUpdatedAt?: number;
287
+ snap?: {
288
+ name: string;
289
+ id: string;
290
+ enabled: boolean;
291
+ };
292
+ lastSelected?: number;
293
+ }, {
294
+ name: Struct<string, null>;
295
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
296
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
297
+ name: string;
298
+ id: string;
299
+ enabled: boolean;
300
+ }, {
301
+ id: Struct<string, null>;
302
+ enabled: Struct<boolean, null>;
303
+ name: Struct<string, null>;
304
+ }>;
305
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
306
+ importTime: Struct<number, null>;
307
+ keyring: Struct<{
308
+ type: string;
309
+ }, {
310
+ type: Struct<string, null>;
311
+ }>;
312
+ }>;
313
+ address: import("@metamask/superstruct").Struct<string, null>;
314
+ type: import("@metamask/superstruct").Struct<"bip122:p2sh", "bip122:p2sh">;
315
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
316
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
317
+ sendBitcoin: "sendBitcoin";
318
+ }>>;
319
+ id: import("@metamask/superstruct").Struct<string, null>;
320
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
321
+ }>;
170
322
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
171
323
  type: "bip122:p2wpkh";
172
324
  id: string;
@@ -179,7 +331,9 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
179
331
  };
180
332
  nameLastUpdatedAt?: number;
181
333
  snap?: {
334
+ name: string;
182
335
  id: string;
336
+ enabled: boolean;
183
337
  };
184
338
  lastSelected?: number;
185
339
  };
@@ -195,16 +349,22 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
195
349
  };
196
350
  nameLastUpdatedAt?: number;
197
351
  snap?: {
352
+ name: string;
198
353
  id: string;
354
+ enabled: boolean;
199
355
  };
200
356
  lastSelected?: number;
201
357
  }, {
202
358
  name: Struct<string, null>;
203
359
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
204
360
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
361
+ name: string;
205
362
  id: string;
363
+ enabled: boolean;
206
364
  }, {
207
365
  id: Struct<string, null>;
366
+ enabled: Struct<boolean, null>;
367
+ name: Struct<string, null>;
208
368
  }>;
209
369
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
210
370
  importTime: Struct<number, null>;
@@ -223,6 +383,70 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
223
383
  id: import("@metamask/superstruct").Struct<string, null>;
224
384
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
225
385
  }>;
386
+ export declare const InternalBtcP2trAccountStruct: Struct<{
387
+ type: "bip122:p2tr";
388
+ id: string;
389
+ options: Record<string, import("@metamask/utils").Json>;
390
+ metadata: {
391
+ name: string;
392
+ importTime: number;
393
+ keyring: {
394
+ type: string;
395
+ };
396
+ nameLastUpdatedAt?: number;
397
+ snap?: {
398
+ name: string;
399
+ id: string;
400
+ enabled: boolean;
401
+ };
402
+ lastSelected?: number;
403
+ };
404
+ address: string;
405
+ scopes: `${string}:${string}`[];
406
+ methods: "sendBitcoin"[];
407
+ }, {
408
+ metadata: Struct<{
409
+ name: string;
410
+ importTime: number;
411
+ keyring: {
412
+ type: string;
413
+ };
414
+ nameLastUpdatedAt?: number;
415
+ snap?: {
416
+ name: string;
417
+ id: string;
418
+ enabled: boolean;
419
+ };
420
+ lastSelected?: number;
421
+ }, {
422
+ name: Struct<string, null>;
423
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
424
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
425
+ name: string;
426
+ id: string;
427
+ enabled: boolean;
428
+ }, {
429
+ id: Struct<string, null>;
430
+ enabled: Struct<boolean, null>;
431
+ name: Struct<string, null>;
432
+ }>;
433
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
434
+ importTime: Struct<number, null>;
435
+ keyring: Struct<{
436
+ type: string;
437
+ }, {
438
+ type: Struct<string, null>;
439
+ }>;
440
+ }>;
441
+ address: import("@metamask/superstruct").Struct<string, null>;
442
+ type: import("@metamask/superstruct").Struct<"bip122:p2tr", "bip122:p2tr">;
443
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
444
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
445
+ sendBitcoin: "sendBitcoin";
446
+ }>>;
447
+ id: import("@metamask/superstruct").Struct<string, null>;
448
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
449
+ }>;
226
450
  export declare const InternalSolDataAccountStruct: Struct<{
227
451
  type: "solana:data-account";
228
452
  id: string;
@@ -235,7 +459,9 @@ export declare const InternalSolDataAccountStruct: Struct<{
235
459
  };
236
460
  nameLastUpdatedAt?: number;
237
461
  snap?: {
462
+ name: string;
238
463
  id: string;
464
+ enabled: boolean;
239
465
  };
240
466
  lastSelected?: number;
241
467
  };
@@ -251,16 +477,22 @@ export declare const InternalSolDataAccountStruct: Struct<{
251
477
  };
252
478
  nameLastUpdatedAt?: number;
253
479
  snap?: {
480
+ name: string;
254
481
  id: string;
482
+ enabled: boolean;
255
483
  };
256
484
  lastSelected?: number;
257
485
  }, {
258
486
  name: Struct<string, null>;
259
487
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
260
488
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
489
+ name: string;
261
490
  id: string;
491
+ enabled: boolean;
262
492
  }, {
263
493
  id: Struct<string, null>;
494
+ enabled: Struct<boolean, null>;
495
+ name: Struct<string, null>;
264
496
  }>;
265
497
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
266
498
  importTime: Struct<number, null>;
@@ -285,12 +517,15 @@ export declare const InternalSolDataAccountStruct: Struct<{
285
517
  }>;
286
518
  export type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
287
519
  export type InternalEthErc4337Account = Infer<typeof InternalEthErc4337AccountStruct>;
520
+ export type InternalBtcP2pkhAccount = Infer<typeof InternalBtcP2pkhAccountStruct>;
521
+ export type InternalBtcP2shAccount = Infer<typeof InternalBtcP2shAccountStruct>;
288
522
  export type InternalBtcP2wpkhAccount = Infer<typeof InternalBtcP2wpkhAccountStruct>;
523
+ export type InternalBtcP2trAccount = Infer<typeof InternalBtcP2trAccountStruct>;
289
524
  export type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;
290
- export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalSolDataAccount>>;
291
- export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2wpkhAccount | InternalSolDataAccount;
525
+ export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2pkhAccount> | Struct<InternalBtcP2shAccount> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalBtcP2trAccount> | Struct<InternalSolDataAccount>>;
526
+ export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2pkhAccount | InternalBtcP2shAccount | InternalBtcP2wpkhAccount | InternalBtcP2trAccount | InternalSolDataAccount;
292
527
  export declare const InternalAccountStruct: Struct<{
293
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
528
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
294
529
  id: string;
295
530
  options: Record<string, import("@metamask/utils").Json>;
296
531
  metadata: {
@@ -301,7 +536,9 @@ export declare const InternalAccountStruct: Struct<{
301
536
  };
302
537
  nameLastUpdatedAt?: number;
303
538
  snap?: {
539
+ name: string;
304
540
  id: string;
541
+ enabled: boolean;
305
542
  };
306
543
  lastSelected?: number;
307
544
  };
@@ -317,16 +554,22 @@ export declare const InternalAccountStruct: Struct<{
317
554
  };
318
555
  nameLastUpdatedAt?: number;
319
556
  snap?: {
557
+ name: string;
320
558
  id: string;
559
+ enabled: boolean;
321
560
  };
322
561
  lastSelected?: number;
323
562
  }, {
324
563
  name: Struct<string, null>;
325
564
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
326
565
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
566
+ name: string;
327
567
  id: string;
568
+ enabled: boolean;
328
569
  }, {
329
570
  id: Struct<string, null>;
571
+ enabled: Struct<boolean, null>;
572
+ name: Struct<string, null>;
330
573
  }>;
331
574
  lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
332
575
  importTime: Struct<number, null>;
@@ -337,10 +580,13 @@ export declare const InternalAccountStruct: Struct<{
337
580
  }>;
338
581
  }>;
339
582
  id: import("@metamask/superstruct").Struct<string, null>;
340
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
583
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account", {
341
584
  "eip155:eoa": "eip155:eoa";
342
585
  "eip155:erc4337": "eip155:erc4337";
586
+ "bip122:p2pkh": "bip122:p2pkh";
587
+ "bip122:p2sh": "bip122:p2sh";
343
588
  "bip122:p2wpkh": "bip122:p2wpkh";
589
+ "bip122:p2tr": "bip122:p2tr";
344
590
  "solana:data-account": "solana:data-account";
345
591
  }>;
346
592
  address: import("@metamask/superstruct").Struct<string, null>;
@@ -1 +1 @@
1
-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/dist/types.mjs CHANGED
@@ -2,15 +2,17 @@
2
2
  /* eslint-disable @typescript-eslint/no-duplicate-type-constituents */
3
3
  // FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`
4
4
  // and `InternalAccountTypes`.
5
- import { BtcAccountType, EthAccountType, KeyringAccountStruct, SolAccountType, BtcP2wpkhAccountStruct, EthEoaAccountStruct, EthErc4337AccountStruct, SolDataAccountStruct } from "@metamask/keyring-api";
5
+ import { BtcAccountType, EthAccountType, KeyringAccountStruct, SolAccountType, BtcP2pkhAccountStruct, BtcP2shAccountStruct, BtcP2wpkhAccountStruct, BtcP2trAccountStruct, EthEoaAccountStruct, EthErc4337AccountStruct, SolDataAccountStruct } from "@metamask/keyring-api";
6
6
  import { exactOptional, object } from "@metamask/keyring-utils";
7
- import { string, number } from "@metamask/superstruct";
7
+ import { boolean, string, number } from "@metamask/superstruct";
8
8
  export const InternalAccountMetadataStruct = object({
9
9
  metadata: object({
10
10
  name: string(),
11
11
  nameLastUpdatedAt: exactOptional(number()),
12
12
  snap: exactOptional(object({
13
13
  id: string(),
14
+ enabled: boolean(),
15
+ name: string(),
14
16
  })),
15
17
  lastSelected: exactOptional(number()),
16
18
  importTime: number(),
@@ -27,10 +29,22 @@ export const InternalEthErc4337AccountStruct = object({
27
29
  ...EthErc4337AccountStruct.schema,
28
30
  ...InternalAccountMetadataStruct.schema,
29
31
  });
32
+ export const InternalBtcP2pkhAccountStruct = object({
33
+ ...BtcP2pkhAccountStruct.schema,
34
+ ...InternalAccountMetadataStruct.schema,
35
+ });
36
+ export const InternalBtcP2shAccountStruct = object({
37
+ ...BtcP2shAccountStruct.schema,
38
+ ...InternalAccountMetadataStruct.schema,
39
+ });
30
40
  export const InternalBtcP2wpkhAccountStruct = object({
31
41
  ...BtcP2wpkhAccountStruct.schema,
32
42
  ...InternalAccountMetadataStruct.schema,
33
43
  });
44
+ export const InternalBtcP2trAccountStruct = object({
45
+ ...BtcP2trAccountStruct.schema,
46
+ ...InternalAccountMetadataStruct.schema,
47
+ });
34
48
  export const InternalSolDataAccountStruct = object({
35
49
  ...SolDataAccountStruct.schema,
36
50
  ...InternalAccountMetadataStruct.schema,
@@ -38,7 +52,10 @@ export const InternalSolDataAccountStruct = object({
38
52
  export const InternalAccountStructs = {
39
53
  [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,
40
54
  [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,
55
+ [`${BtcAccountType.P2pkh}`]: InternalBtcP2pkhAccountStruct,
56
+ [`${BtcAccountType.P2sh}`]: InternalBtcP2shAccountStruct,
41
57
  [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,
58
+ [`${BtcAccountType.P2tr}`]: InternalBtcP2trAccountStruct,
42
59
  [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,
43
60
  };
44
61
  export const InternalAccountStruct = object({
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4FAA4F;AAC5F,8BAA8B;AAE9B,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACrB,8BAA8B;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gCAAgC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAOvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;IAClD,QAAQ,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,EAAE;QACd,iBAAiB,EAAE,aAAa,CAAC,MAA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M;CACxC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n// FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`\n// and `InternalAccountTypes`.\n\nimport {\n BtcAccountType,\n EthAccountType,\n KeyringAccountStruct,\n SolAccountType,\n BtcP2wpkhAccountStruct,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { exactOptional, object } from '@metamask/keyring-utils';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType;\n\nexport const InternalAccountMetadataStruct = object({\n metadata: object({\n name: string(),\n nameLastUpdatedAt: exactOptional(number()),\n snap: exactOptional(\n object({\n id: string(),\n }),\n ),\n lastSelected: exactOptional(number()),\n importTime: number(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\nexport const InternalEthEoaAccountStruct = object({\n ...EthEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalEthErc4337AccountStruct = object({\n ...EthErc4337AccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2wpkhAccountStruct = object({\n ...BtcP2wpkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalSolDataAccountStruct = object({\n ...SolDataAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;\n\nexport type InternalEthErc4337Account = Infer<\n typeof InternalEthErc4337AccountStruct\n>;\n\nexport type InternalBtcP2wpkhAccount = Infer<\n typeof InternalBtcP2wpkhAccountStruct\n>;\n\nexport type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;\n\nexport const InternalAccountStructs: Record<\n string,\n | Struct<InternalEthEoaAccount>\n | Struct<InternalEthErc4337Account>\n | Struct<InternalBtcP2wpkhAccount>\n | Struct<InternalSolDataAccount>\n> = {\n [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,\n [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,\n [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,\n [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2wpkhAccount\n | InternalSolDataAccount;\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4FAA4F;AAC5F,8BAA8B;AAE9B,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACrB,8BAA8B;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gCAAgC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAOhE,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;IAClD,QAAQ,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,EAAE;QACd,iBAAiB,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC;QAC1C,IAAI,EAAE,aAAa,CACjB,MAAM,CAAC;YACL,EAAE,EAAE,MAAM,EAAE;YACZ,OAAO,EAAE,OAAO,EAAE;YAClB,IA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E,CAAC,EAAE,2BAA2B;IACtD,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC,EAAE,+BAA+B;IAC9D,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,6BAA6B;IAC1D,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,4BAA4B;IACxD,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,8BAA8B;IAC5D,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,4BAA4B;IACxD,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,EAAE,4BAA4B;CAChE,CAAC;AAWF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;IAC1C,GAAG,oBAAoB,CAAC,MAAM;IAC9B,GAAG,6BAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n// FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`\n// and `InternalAccountTypes`.\n\nimport {\n BtcAccountType,\n EthAccountType,\n KeyringAccountStruct,\n SolAccountType,\n BtcP2pkhAccountStruct,\n BtcP2shAccountStruct,\n BtcP2wpkhAccountStruct,\n BtcP2trAccountStruct,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { exactOptional, object } from '@metamask/keyring-utils';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { boolean, string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType;\n\nexport const InternalAccountMetadataStruct = object({\n metadata: object({\n name: string(),\n nameLastUpdatedAt: exactOptional(number()),\n snap: exactOptional(\n object({\n id: string(),\n enabled: boolean(),\n name: string(),\n }),\n ),\n lastSelected: exactOptional(number()),\n importTime: number(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\nexport const InternalEthEoaAccountStruct = object({\n ...EthEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalEthErc4337AccountStruct = object({\n ...EthErc4337AccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2pkhAccountStruct = object({\n ...BtcP2pkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2shAccountStruct = object({\n ...BtcP2shAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2wpkhAccountStruct = object({\n ...BtcP2wpkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2trAccountStruct = object({\n ...BtcP2trAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalSolDataAccountStruct = object({\n ...SolDataAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;\n\nexport type InternalEthErc4337Account = Infer<\n typeof InternalEthErc4337AccountStruct\n>;\n\nexport type InternalBtcP2pkhAccount = Infer<\n typeof InternalBtcP2pkhAccountStruct\n>;\n\nexport type InternalBtcP2shAccount = Infer<typeof InternalBtcP2shAccountStruct>;\n\nexport type InternalBtcP2wpkhAccount = Infer<\n typeof InternalBtcP2wpkhAccountStruct\n>;\n\nexport type InternalBtcP2trAccount = Infer<typeof InternalBtcP2trAccountStruct>;\n\nexport type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;\n\nexport const InternalAccountStructs: Record<\n string,\n | Struct<InternalEthEoaAccount>\n | Struct<InternalEthErc4337Account>\n | Struct<InternalBtcP2pkhAccount>\n | Struct<InternalBtcP2shAccount>\n | Struct<InternalBtcP2wpkhAccount>\n | Struct<InternalBtcP2trAccount>\n | Struct<InternalSolDataAccount>\n> = {\n [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,\n [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,\n [`${BtcAccountType.P2pkh}`]: InternalBtcP2pkhAccountStruct,\n [`${BtcAccountType.P2sh}`]: InternalBtcP2shAccountStruct,\n [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,\n [`${BtcAccountType.P2tr}`]: InternalBtcP2trAccountStruct,\n [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount;\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-internal-api",
3
- "version": "6.0.1-33a98a2",
3
+ "version": "6.1.0-1e1233a",
4
4
  "description": "MetaMask Keyring Internal API",
5
5
  "keywords": [
6
6
  "metamask",
@@ -45,7 +45,7 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@metamask/keyring-api": "17.5.0",
48
+ "@metamask/keyring-api": "17.6.0",
49
49
  "@metamask/keyring-utils": "3.0.0",
50
50
  "@metamask/superstruct": "^3.1.0"
51
51
  },