@metamask-previews/keyring-internal-api 11.0.1-4bf3baf → 11.0.1-5951828

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
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Changed
11
11
 
12
12
  - Bump `@metamask/keyring-utils` from `^3.2.0` to `^3.3.1` ([#544](https://github.com/MetaMask/accounts/pull/544), [#546](https://github.com/MetaMask/accounts/pull/546))
13
+ - Bump `@metamask/keyring-api` from `^23.1.0` to `^23.4.0` ([#562](https://github.com/MetaMask/accounts/pull/562), [#569](https://github.com/MetaMask/accounts/pull/569), [#583](https://github.com/MetaMask/accounts/pull/583))
13
14
 
14
15
  ## [11.0.1]
15
16
 
@@ -74,7 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
74
75
 
75
76
  ### Changed
76
77
 
77
- - **BREAKING:** Bump `@metamask/keyring-api` from `^20.0.0` to `^21.0.0` ([#355](https://github.com/MetaMask/accounts/pull/355)), ([#356](https://github.com/MetaMask/accounts/pull/356))
78
+ - **BREAKING:** Bump `@metamask/keyring-api` from `^20.0.0` to `^21.0.0` ([#355](https://github.com/MetaMask/accounts/pull/355), [#356](https://github.com/MetaMask/accounts/pull/356))
78
79
 
79
80
  ## [8.1.0]
80
81
 
@@ -121,19 +122,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
121
122
  ### Added
122
123
 
123
124
  - Add support for Bitcoin account type: p2pkh, p2sh, p2tr ([#284](https://github.com/MetaMask/accounts/pull/284))
124
- - 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))
125
+ - 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))
125
126
 
126
127
  ## [6.0.1]
127
128
 
128
129
  ### Changed
129
130
 
130
- - Bump `@metamask/keyring-api` from `^17.2.0` to `^17.4.0` ([#263](https://github.com/MetaMask/accounts/pull/263)), ([#269](https://github.com/MetaMask/accounts/pull/269))
131
+ - Bump `@metamask/keyring-api` from `^17.2.0` to `^17.4.0` ([#263](https://github.com/MetaMask/accounts/pull/263), [#269](https://github.com/MetaMask/accounts/pull/269))
131
132
 
132
133
  ## [6.0.0]
133
134
 
134
135
  ### Changed
135
136
 
136
- - **BREAKING:** The method `EthKeyring.signTransaction` can now returns various type of transactions ([#209](https://github.com/MetaMask/accounts/pull/209)), ([#235](https://github.com/MetaMask/accounts/pull/235))
137
+ - **BREAKING:** The method `EthKeyring.signTransaction` can now returns various type of transactions ([#209](https://github.com/MetaMask/accounts/pull/209), [#235](https://github.com/MetaMask/accounts/pull/235))
137
138
  - Initially was supporting: `Transaction | AccessListEIP2930Transaction | FeeMarketEIP1559Transaction` (types from `@ethereumjs/tx`).
138
139
  - Now also supports `BlobEIP4844Transaction | EOACodeEIP7702Transaction` (types from `@ethereumjs/tx`).
139
140
  - This new method signature is inherited by `Keyring` which is provided `@metamask/keyring-utils`.
@@ -149,7 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
149
150
 
150
151
  ### Changed
151
152
 
152
- - Bump `@metamask/keyring-api` from `^17.0.0` to `^17.2.0` ([#212](https://github.com/MetaMask/accounts/pull/212)), ([#220](https://github.com/MetaMask/accounts/pull/220))
153
+ - Bump `@metamask/keyring-api` from `^17.0.0` to `^17.2.0` ([#212](https://github.com/MetaMask/accounts/pull/212), [#220](https://github.com/MetaMask/accounts/pull/220))
153
154
  - Use `ts-bridge/cli@0.6.3` ([#214](https://github.com/MetaMask/accounts/pull/214))
154
155
  - This new version fixes a bug regarding some missing exports.
155
156
 
@@ -21,7 +21,7 @@ export declare const KeyringRequestWithoutOriginStruct: import("@metamask/supers
21
21
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
22
22
  }, {
23
23
  method: import("@metamask/superstruct").Struct<string, null>;
24
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
24
+ params: import("@metamask/superstruct").ExactOptionalStruct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[], null>;
25
25
  }>;
26
26
  }, "origin">>;
27
27
  export type KeyringRequestWithoutOrigin = Infer<typeof KeyringRequestWithoutOriginStruct>;
@@ -21,7 +21,7 @@ export declare const KeyringRequestWithoutOriginStruct: import("@metamask/supers
21
21
  params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
22
22
  }, {
23
23
  method: import("@metamask/superstruct").Struct<string, null>;
24
- params: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[] | import("@metamask/keyring-utils").ExactOptionalTag, null>;
24
+ params: import("@metamask/superstruct").ExactOptionalStruct<Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[], null>;
25
25
  }>;
26
26
  }, "origin">>;
27
27
  export type KeyringRequestWithoutOrigin = Infer<typeof KeyringRequestWithoutOriginStruct>;
package/dist/types.cjs CHANGED
@@ -4,55 +4,54 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.InternalAccountStruct = exports.InternalAccountStructs = exports.InternalXlmAccountStruct = exports.InternalTrxEoaAccountStruct = exports.InternalSolDataAccountStruct = exports.InternalBtcP2trAccountStruct = exports.InternalBtcP2wpkhAccountStruct = exports.InternalBtcP2shAccountStruct = exports.InternalBtcP2pkhAccountStruct = exports.InternalEthErc4337AccountStruct = exports.InternalEthEoaAccountStruct = exports.InternalAccountMetadataStruct = void 0;
6
6
  const keyring_api_1 = require("@metamask/keyring-api");
7
- const keyring_utils_1 = require("@metamask/keyring-utils");
8
7
  const superstruct_1 = require("@metamask/superstruct");
9
- exports.InternalAccountMetadataStruct = (0, keyring_utils_1.object)({
10
- metadata: (0, keyring_utils_1.object)({
8
+ exports.InternalAccountMetadataStruct = (0, superstruct_1.object)({
9
+ metadata: (0, superstruct_1.object)({
11
10
  name: (0, superstruct_1.string)(),
12
- nameLastUpdatedAt: (0, keyring_utils_1.exactOptional)((0, superstruct_1.number)()),
13
- snap: (0, keyring_utils_1.exactOptional)((0, keyring_utils_1.object)({
11
+ nameLastUpdatedAt: (0, superstruct_1.exactOptional)((0, superstruct_1.number)()),
12
+ snap: (0, superstruct_1.exactOptional)((0, superstruct_1.object)({
14
13
  id: (0, superstruct_1.string)(),
15
14
  })),
16
- lastSelected: (0, keyring_utils_1.exactOptional)((0, superstruct_1.number)()),
15
+ lastSelected: (0, superstruct_1.exactOptional)((0, superstruct_1.number)()),
17
16
  importTime: (0, superstruct_1.number)(),
18
- keyring: (0, keyring_utils_1.object)({
17
+ keyring: (0, superstruct_1.object)({
19
18
  type: (0, superstruct_1.string)(),
20
19
  }),
21
20
  }),
22
21
  });
23
- exports.InternalEthEoaAccountStruct = (0, keyring_utils_1.object)({
22
+ exports.InternalEthEoaAccountStruct = (0, superstruct_1.object)({
24
23
  ...keyring_api_1.EthEoaAccountStruct.schema,
25
24
  ...exports.InternalAccountMetadataStruct.schema,
26
25
  });
27
- exports.InternalEthErc4337AccountStruct = (0, keyring_utils_1.object)({
26
+ exports.InternalEthErc4337AccountStruct = (0, superstruct_1.object)({
28
27
  ...keyring_api_1.EthErc4337AccountStruct.schema,
29
28
  ...exports.InternalAccountMetadataStruct.schema,
30
29
  });
31
- exports.InternalBtcP2pkhAccountStruct = (0, keyring_utils_1.object)({
30
+ exports.InternalBtcP2pkhAccountStruct = (0, superstruct_1.object)({
32
31
  ...keyring_api_1.BtcP2pkhAccountStruct.schema,
33
32
  ...exports.InternalAccountMetadataStruct.schema,
34
33
  });
35
- exports.InternalBtcP2shAccountStruct = (0, keyring_utils_1.object)({
34
+ exports.InternalBtcP2shAccountStruct = (0, superstruct_1.object)({
36
35
  ...keyring_api_1.BtcP2shAccountStruct.schema,
37
36
  ...exports.InternalAccountMetadataStruct.schema,
38
37
  });
39
- exports.InternalBtcP2wpkhAccountStruct = (0, keyring_utils_1.object)({
38
+ exports.InternalBtcP2wpkhAccountStruct = (0, superstruct_1.object)({
40
39
  ...keyring_api_1.BtcP2wpkhAccountStruct.schema,
41
40
  ...exports.InternalAccountMetadataStruct.schema,
42
41
  });
43
- exports.InternalBtcP2trAccountStruct = (0, keyring_utils_1.object)({
42
+ exports.InternalBtcP2trAccountStruct = (0, superstruct_1.object)({
44
43
  ...keyring_api_1.BtcP2trAccountStruct.schema,
45
44
  ...exports.InternalAccountMetadataStruct.schema,
46
45
  });
47
- exports.InternalSolDataAccountStruct = (0, keyring_utils_1.object)({
46
+ exports.InternalSolDataAccountStruct = (0, superstruct_1.object)({
48
47
  ...keyring_api_1.SolDataAccountStruct.schema,
49
48
  ...exports.InternalAccountMetadataStruct.schema,
50
49
  });
51
- exports.InternalTrxEoaAccountStruct = (0, keyring_utils_1.object)({
50
+ exports.InternalTrxEoaAccountStruct = (0, superstruct_1.object)({
52
51
  ...keyring_api_1.TrxEoaAccountStruct.schema,
53
52
  ...exports.InternalAccountMetadataStruct.schema,
54
53
  });
55
- exports.InternalXlmAccountStruct = (0, keyring_utils_1.object)({
54
+ exports.InternalXlmAccountStruct = (0, superstruct_1.object)({
56
55
  ...keyring_api_1.XlmAccountStruct.schema,
57
56
  ...exports.InternalAccountMetadataStruct.schema,
58
57
  });
@@ -67,7 +66,7 @@ exports.InternalAccountStructs = {
67
66
  [`${keyring_api_1.TrxAccountType.Eoa}`]: exports.InternalTrxEoaAccountStruct,
68
67
  [`${keyring_api_1.XlmAccountType.Account}`]: exports.InternalXlmAccountStruct,
69
68
  };
70
- exports.InternalAccountStruct = (0, keyring_utils_1.object)({
69
+ exports.InternalAccountStruct = (0, superstruct_1.object)({
71
70
  ...keyring_api_1.KeyringAccountStruct.schema,
72
71
  ...exports.InternalAccountMetadataStru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;AAaW,QAAA,qBAAqB,GAAG,IAAA,sBAAM,EAAC;IAC1C,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["// FIXME: eslint is complaning about our account union even if those accounts\n// types should all be different, so we disable this for now:\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 TrxAccountType,\n TrxEoaAccountStruct,\n XlmAccountType,\n XlmAccountStruct,\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 | TrxAccountType\n | XlmAccountType;\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 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 const InternalTrxEoaAccountStruct = object({\n ...TrxEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalXlmAccountStruct = object({\n ...XlmAccountStruct.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 type InternalTrxEoaAccount = Infer<typeof InternalTrxEoaAccountStruct>;\n\nexport type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;\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 | Struct<InternalTrxEoaAccount>\n | Struct<InternalXlmAccount>\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 [`${TrxAccountType.Eoa}`]: InternalTrxEoaAccountStruct,\n [`${XlmAccountType.Account}`]: InternalXlmAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount\n | InternalTrxEoaAccount\n | InternalXlmAccount;\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,6EAA6E;AAC7E,6DAA6D;;;AAE7D,uDAgB+B;AAE/B,uDAA8E;AASjE,QAAA,6BAA6B,GAAG,IAAA,oBAAM,EAAC;IAClD,QAAQ,EAAE,IAAA,oBAAM,EAAC;QACf,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd,iBAAiB,EAAE,IAAA,2BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QAC1C,IAAI,EAAE,IAAA,2BAAa,EACjB,IAAA,oBAAM,EAAC;YACL,EAAE,EAAE,IAAA,oBAAM,GAAE;SACb,CAAC,CACH;QACD,YAAY,EAAE,IAAA,2BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QACrC,UAAU,EAAE,IAAA,oBAAM,GAAE;QACpB,OAAO,EAAE,IAAA,oBAAM,EAAC;YACd,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,2B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AAE,mCAA2B;IACtD,CAAC,GAAG,4BAAc,CAAC,OAAO,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;IAC/D,CAAC,GAAG,4BAAc,CAAC,GAAG,EAAE,CAAC,EAAE,mCAA2B;IACtD,CAAC,GAAG,4BAAc,CAAC,OAAO,EAAE,CAAC,EAAE,gCAAwB;CACxD,CAAC;AAaW,QAAA,qBAAqB,GAAG,IAAA,oBAAM,EAAC;IAC1C,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["// FIXME: eslint is complaning about our account union even if those accounts\n// types should all be different, so we disable this for now:\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 TrxAccountType,\n TrxEoaAccountStruct,\n XlmAccountType,\n XlmAccountStruct,\n} from '@metamask/keyring-api';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { exactOptional, object, string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType\n | TrxAccountType\n | XlmAccountType;\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 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 const InternalTrxEoaAccountStruct = object({\n ...TrxEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalXlmAccountStruct = object({\n ...XlmAccountStruct.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 type InternalTrxEoaAccount = Infer<typeof InternalTrxEoaAccountStruct>;\n\nexport type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;\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 | Struct<InternalTrxEoaAccount>\n | Struct<InternalXlmAccount>\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 [`${TrxAccountType.Eoa}`]: InternalTrxEoaAccountStruct,\n [`${XlmAccountType.Account}`]: InternalXlmAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount\n | InternalTrxEoaAccount\n | InternalXlmAccount;\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
@@ -28,13 +28,13 @@ export declare const InternalAccountMetadataStruct: Struct<{
28
28
  lastSelected?: number;
29
29
  }, {
30
30
  name: Struct<string, null>;
31
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
32
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
31
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
32
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
33
33
  id: string;
34
34
  }, {
35
35
  id: Struct<string, null>;
36
36
  }>;
37
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
37
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
38
38
  importTime: Struct<number, null>;
39
39
  keyring: Struct<{
40
40
  type: string;
@@ -88,13 +88,13 @@ export declare const InternalEthEoaAccountStruct: Struct<{
88
88
  lastSelected?: number;
89
89
  }, {
90
90
  name: Struct<string, null>;
91
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
92
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
91
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
92
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
93
93
  id: string;
94
94
  }, {
95
95
  id: Struct<string, null>;
96
96
  }>;
97
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
97
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
98
98
  importTime: Struct<number, null>;
99
99
  keyring: Struct<{
100
100
  type: string;
@@ -173,13 +173,13 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
173
173
  lastSelected?: number;
174
174
  }, {
175
175
  name: Struct<string, null>;
176
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
177
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
176
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
177
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
178
178
  id: string;
179
179
  }, {
180
180
  id: Struct<string, null>;
181
181
  }>;
182
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
182
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
183
183
  importTime: Struct<number, null>;
184
184
  keyring: Struct<{
185
185
  type: string;
@@ -260,13 +260,13 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
260
260
  lastSelected?: number;
261
261
  }, {
262
262
  name: Struct<string, null>;
263
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
264
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
263
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
264
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
265
265
  id: string;
266
266
  }, {
267
267
  id: Struct<string, null>;
268
268
  }>;
269
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
269
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
270
270
  importTime: Struct<number, null>;
271
271
  keyring: Struct<{
272
272
  type: string;
@@ -348,13 +348,13 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
348
348
  lastSelected?: number;
349
349
  }, {
350
350
  name: Struct<string, null>;
351
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
352
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
351
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
352
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
353
353
  id: string;
354
354
  }, {
355
355
  id: Struct<string, null>;
356
356
  }>;
357
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
357
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
358
358
  importTime: Struct<number, null>;
359
359
  keyring: Struct<{
360
360
  type: string;
@@ -376,7 +376,12 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
376
376
  publicDescriptor: import("@metamask/keyring-api").BtcMethod.PublicDescriptor;
377
377
  signMessage: import("@metamask/keyring-api").BtcMethod.SignMessage;
378
378
  }>>;
379
- id: Struct<string, null>;
379
+ id: Struct<string, null>; /**
380
+ * Internal account representation.
381
+ *
382
+ * This type is used internally by MetaMask to add additional metadata to the
383
+ * account object. It's should not be used by external applications.
384
+ */
380
385
  options: Struct<Record<string, import("@metamask/utils").Json> & {
381
386
  entropy?: {
382
387
  type: "mnemonic";
@@ -436,13 +441,13 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
436
441
  lastSelected?: number;
437
442
  }, {
438
443
  name: Struct<string, null>;
439
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
440
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
444
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
445
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
441
446
  id: string;
442
447
  }, {
443
448
  id: Struct<string, null>;
444
449
  }>;
445
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
450
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
446
451
  importTime: Struct<number, null>;
447
452
  keyring: Struct<{
448
453
  type: string;
@@ -524,13 +529,13 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
524
529
  lastSelected?: number;
525
530
  }, {
526
531
  name: Struct<string, null>;
527
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
528
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
532
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
533
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
529
534
  id: string;
530
535
  }, {
531
536
  id: Struct<string, null>;
532
537
  }>;
533
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
538
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
534
539
  importTime: Struct<number, null>;
535
540
  keyring: Struct<{
536
541
  type: string;
@@ -612,13 +617,13 @@ export declare const InternalSolDataAccountStruct: Struct<{
612
617
  lastSelected?: number;
613
618
  }, {
614
619
  name: Struct<string, null>;
615
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
616
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
620
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
621
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
617
622
  id: string;
618
623
  }, {
619
624
  id: Struct<string, null>;
620
625
  }>;
621
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
626
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
622
627
  importTime: Struct<number, null>;
623
628
  keyring: Struct<{
624
629
  type: string;
@@ -696,13 +701,13 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
696
701
  lastSelected?: number;
697
702
  }, {
698
703
  name: Struct<string, null>;
699
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
700
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
704
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
705
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
701
706
  id: string;
702
707
  }, {
703
708
  id: Struct<string, null>;
704
709
  }>;
705
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
710
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
706
711
  importTime: Struct<number, null>;
707
712
  keyring: Struct<{
708
713
  type: string;
@@ -779,13 +784,13 @@ export declare const InternalXlmAccountStruct: Struct<{
779
784
  lastSelected?: number;
780
785
  }, {
781
786
  name: Struct<string, null>;
782
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
783
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
787
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
788
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
784
789
  id: string;
785
790
  }, {
786
791
  id: Struct<string, null>;
787
792
  }>;
788
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
793
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
789
794
  importTime: Struct<number, null>;
790
795
  keyring: Struct<{
791
796
  type: string;
@@ -872,13 +877,13 @@ export declare const InternalAccountStruct: Struct<{
872
877
  lastSelected?: number;
873
878
  }, {
874
879
  name: Struct<string, null>;
875
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
876
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
880
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
881
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
877
882
  id: string;
878
883
  }, {
879
884
  id: Struct<string, null>;
880
885
  }>;
881
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
886
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
882
887
  importTime: Struct<number, null>;
883
888
  keyring: Struct<{
884
889
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,cAAc,EAEd,cAAc,EAQd,cAAc,EAEd,cAAc,EAEf,8BAA8B;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAG3D,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAexC,CAAC;AAEH,eAAO,MAAM,2BA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,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAExE,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,GAC9B,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,kBAAkB,CAAC,CAW7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/dist/types.d.mts CHANGED
@@ -28,13 +28,13 @@ export declare const InternalAccountMetadataStruct: Struct<{
28
28
  lastSelected?: number;
29
29
  }, {
30
30
  name: Struct<string, null>;
31
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
32
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
31
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
32
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
33
33
  id: string;
34
34
  }, {
35
35
  id: Struct<string, null>;
36
36
  }>;
37
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
37
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
38
38
  importTime: Struct<number, null>;
39
39
  keyring: Struct<{
40
40
  type: string;
@@ -88,13 +88,13 @@ export declare const InternalEthEoaAccountStruct: Struct<{
88
88
  lastSelected?: number;
89
89
  }, {
90
90
  name: Struct<string, null>;
91
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
92
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
91
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
92
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
93
93
  id: string;
94
94
  }, {
95
95
  id: Struct<string, null>;
96
96
  }>;
97
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
97
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
98
98
  importTime: Struct<number, null>;
99
99
  keyring: Struct<{
100
100
  type: string;
@@ -173,13 +173,13 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
173
173
  lastSelected?: number;
174
174
  }, {
175
175
  name: Struct<string, null>;
176
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
177
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
176
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
177
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
178
178
  id: string;
179
179
  }, {
180
180
  id: Struct<string, null>;
181
181
  }>;
182
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
182
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
183
183
  importTime: Struct<number, null>;
184
184
  keyring: Struct<{
185
185
  type: string;
@@ -260,13 +260,13 @@ export declare const InternalBtcP2pkhAccountStruct: Struct<{
260
260
  lastSelected?: number;
261
261
  }, {
262
262
  name: Struct<string, null>;
263
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
264
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
263
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
264
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
265
265
  id: string;
266
266
  }, {
267
267
  id: Struct<string, null>;
268
268
  }>;
269
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
269
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
270
270
  importTime: Struct<number, null>;
271
271
  keyring: Struct<{
272
272
  type: string;
@@ -348,13 +348,13 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
348
348
  lastSelected?: number;
349
349
  }, {
350
350
  name: Struct<string, null>;
351
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
352
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
351
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
352
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
353
353
  id: string;
354
354
  }, {
355
355
  id: Struct<string, null>;
356
356
  }>;
357
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
357
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
358
358
  importTime: Struct<number, null>;
359
359
  keyring: Struct<{
360
360
  type: string;
@@ -376,7 +376,12 @@ export declare const InternalBtcP2shAccountStruct: Struct<{
376
376
  publicDescriptor: import("@metamask/keyring-api").BtcMethod.PublicDescriptor;
377
377
  signMessage: import("@metamask/keyring-api").BtcMethod.SignMessage;
378
378
  }>>;
379
- id: Struct<string, null>;
379
+ id: Struct<string, null>; /**
380
+ * Internal account representation.
381
+ *
382
+ * This type is used internally by MetaMask to add additional metadata to the
383
+ * account object. It's should not be used by external applications.
384
+ */
380
385
  options: Struct<Record<string, import("@metamask/utils").Json> & {
381
386
  entropy?: {
382
387
  type: "mnemonic";
@@ -436,13 +441,13 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
436
441
  lastSelected?: number;
437
442
  }, {
438
443
  name: Struct<string, null>;
439
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
440
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
444
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
445
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
441
446
  id: string;
442
447
  }, {
443
448
  id: Struct<string, null>;
444
449
  }>;
445
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
450
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
446
451
  importTime: Struct<number, null>;
447
452
  keyring: Struct<{
448
453
  type: string;
@@ -524,13 +529,13 @@ export declare const InternalBtcP2trAccountStruct: Struct<{
524
529
  lastSelected?: number;
525
530
  }, {
526
531
  name: Struct<string, null>;
527
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
528
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
532
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
533
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
529
534
  id: string;
530
535
  }, {
531
536
  id: Struct<string, null>;
532
537
  }>;
533
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
538
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
534
539
  importTime: Struct<number, null>;
535
540
  keyring: Struct<{
536
541
  type: string;
@@ -612,13 +617,13 @@ export declare const InternalSolDataAccountStruct: Struct<{
612
617
  lastSelected?: number;
613
618
  }, {
614
619
  name: Struct<string, null>;
615
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
616
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
620
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
621
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
617
622
  id: string;
618
623
  }, {
619
624
  id: Struct<string, null>;
620
625
  }>;
621
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
626
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
622
627
  importTime: Struct<number, null>;
623
628
  keyring: Struct<{
624
629
  type: string;
@@ -696,13 +701,13 @@ export declare const InternalTrxEoaAccountStruct: Struct<{
696
701
  lastSelected?: number;
697
702
  }, {
698
703
  name: Struct<string, null>;
699
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
700
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
704
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
705
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
701
706
  id: string;
702
707
  }, {
703
708
  id: Struct<string, null>;
704
709
  }>;
705
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
710
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
706
711
  importTime: Struct<number, null>;
707
712
  keyring: Struct<{
708
713
  type: string;
@@ -779,13 +784,13 @@ export declare const InternalXlmAccountStruct: Struct<{
779
784
  lastSelected?: number;
780
785
  }, {
781
786
  name: Struct<string, null>;
782
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
783
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
787
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
788
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
784
789
  id: string;
785
790
  }, {
786
791
  id: Struct<string, null>;
787
792
  }>;
788
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
793
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
789
794
  importTime: Struct<number, null>;
790
795
  keyring: Struct<{
791
796
  type: string;
@@ -872,13 +877,13 @@ export declare const InternalAccountStruct: Struct<{
872
877
  lastSelected?: number;
873
878
  }, {
874
879
  name: Struct<string, null>;
875
- nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
876
- snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
880
+ nameLastUpdatedAt: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
881
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
877
882
  id: string;
878
883
  }, {
879
884
  id: Struct<string, null>;
880
885
  }>;
881
- lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
886
+ lastSelected: import("@metamask/superstruct").ExactOptionalStruct<number, null>;
882
887
  importTime: Struct<number, null>;
883
888
  keyring: Struct<{
884
889
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,cAAc,EAEd,cAAc,EAQd,cAAc,EAEd,cAAc,EAEf,8BAA8B;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAG3D,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAexC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;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CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,kBAAkB,CAAC,CAW7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/dist/types.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  // FIXME: eslint is complaning about our account union even if those accounts
2
2
  // types should all be different, so we disable this for now:
3
3
  import { BtcAccountType, EthAccountType, KeyringAccountStruct, SolAccountType, BtcP2pkhAccountStruct, BtcP2shAccountStruct, BtcP2wpkhAccountStruct, BtcP2trAccountStruct, EthEoaAccountStruct, EthErc4337AccountStruct, SolDataAccountStruct, TrxAccountType, TrxEoaAccountStruct, XlmAccountType, XlmAccountStruct } from "@metamask/keyring-api";
4
- import { exactOptional, object } from "@metamask/keyring-utils";
5
- import { string, number } from "@metamask/superstruct";
4
+ import { exactOptional, object, string, number } from "@metamask/superstruct";
6
5
  export const InternalAccountMetadataStruct = object({
7
6
  metadata: object({
8
7
  name: string(),
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6DAA6D;AAE7D,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,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AAG,MAAM,CAAC;IAC1C,GAAG,oBAAoB,CAAC,MAAM;IAC9B,GAAG,6BAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["// FIXME: eslint is complaning about our account union even if those accounts\n// types should all be different, so we disable this for now:\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 TrxAccountType,\n TrxEoaAccountStruct,\n XlmAccountType,\n XlmAccountStruct,\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 | TrxAccountType\n | XlmAccountType;\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 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 const InternalTrxEoaAccountStruct = object({\n ...TrxEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalXlmAccountStruct = object({\n ...XlmAccountStruct.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 type InternalTrxEoaAccount = Infer<typeof InternalTrxEoaAccountStruct>;\n\nexport type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;\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 | Struct<InternalTrxEoaAccount>\n | Struct<InternalXlmAccount>\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 [`${TrxAccountType.Eoa}`]: InternalTrxEoaAccountStruct,\n [`${XlmAccountType.Account}`]: InternalXlmAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount\n | InternalTrxEoaAccount\n | InternalXlmAccount;\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,6EAA6E;AAC7E,6DAA6D;AAE7D,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACjB,8BAA8B;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAS9E,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;SACb,CAAC,CACH;QACD,YAAY,EAAE,aAAa,CAAC,MAAM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C,MAAM,wBAAwB,GAAG,MAAM,CAAC;IAC7C,GAAG,gBAAgB,CAAC,MAAM;IAC1B,GAAG,6BAA6B,CAAC,MAAM;CACxC,CAAC,CAAC;AA0BH,MAAM,CAAC,MAAM,sBAAsB,GAW/B;IACF,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,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;IAC/D,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC,EAAE,2BAA2B;IACtD,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAwB;CACxD,CAAC;AAaF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;IAC1C,GAAG,oBAAoB,CAAC,MAAM;IAC9B,GAAG,6BAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["// FIXME: eslint is complaning about our account union even if those accounts\n// types should all be different, so we disable this for now:\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 TrxAccountType,\n TrxEoaAccountStruct,\n XlmAccountType,\n XlmAccountStruct,\n} from '@metamask/keyring-api';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { exactOptional, object, string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType\n | TrxAccountType\n | XlmAccountType;\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 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 const InternalTrxEoaAccountStruct = object({\n ...TrxEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalXlmAccountStruct = object({\n ...XlmAccountStruct.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 type InternalTrxEoaAccount = Infer<typeof InternalTrxEoaAccountStruct>;\n\nexport type InternalXlmAccount = Infer<typeof InternalXlmAccountStruct>;\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 | Struct<InternalTrxEoaAccount>\n | Struct<InternalXlmAccount>\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 [`${TrxAccountType.Eoa}`]: InternalTrxEoaAccountStruct,\n [`${XlmAccountType.Account}`]: InternalXlmAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2pkhAccount\n | InternalBtcP2shAccount\n | InternalBtcP2wpkhAccount\n | InternalBtcP2trAccount\n | InternalSolDataAccount\n | InternalTrxEoaAccount\n | InternalXlmAccount;\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": "11.0.1-4bf3baf",
3
+ "version": "11.0.1-5951828",
4
4
  "description": "MetaMask Keyring Internal API",
5
5
  "keywords": [
6
6
  "keyring",
@@ -55,9 +55,9 @@
55
55
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
56
56
  },
57
57
  "dependencies": {
58
- "@metamask/keyring-api": "23.1.0",
58
+ "@metamask/keyring-api": "23.4.0",
59
59
  "@metamask/keyring-utils": "3.3.1",
60
- "@metamask/superstruct": "^3.1.0"
60
+ "@metamask/superstruct": "^3.3.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@lavamoat/allow-scripts": "^3.2.1",