@metamask-previews/keyring-internal-api 2.0.1-7fd7a95 → 3.0.0-0aca2ee

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
+ ## [3.0.0]
11
+
12
+ ### Changed
13
+
14
+ - **BREAKING:** Bump `@metamask/keyring-api` from `^14.0.0` to `^15.0.0` ([#160](https://github.com/MetaMask/accounts/pull/160))
15
+ - The `scopes` from each `*AccountStruct` types is now more strict which impact all `Internal*AccountStruct` types.
16
+
10
17
  ## [2.0.1]
11
18
 
12
19
  ### Changed
@@ -35,7 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
35
42
  - This new version fixes a bug with CJS re-exports.
36
43
  - Initial release ([#24](https://github.com/MetaMask/accounts/pull/24))
37
44
 
38
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@2.0.1...HEAD
45
+ [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@3.0.0...HEAD
46
+ [3.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@2.0.1...@metamask/keyring-internal-api@3.0.0
39
47
  [2.0.1]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@2.0.0...@metamask/keyring-internal-api@2.0.1
40
48
  [2.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@1.1.0...@metamask/keyring-internal-api@2.0.0
41
49
  [1.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-internal-api@1.0.0...@metamask/keyring-internal-api@1.1.0
package/dist/types.d.cts CHANGED
@@ -70,7 +70,7 @@ export declare const InternalEthEoaAccountStruct: Struct<{
70
70
  lastSelected?: number;
71
71
  };
72
72
  address: string;
73
- scopes: import("@metamask/keyring-api").EthScopes.Namespace[];
73
+ scopes: import("@metamask/keyring-api").EthScope.Namespace[];
74
74
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
75
75
  }, {
76
76
  metadata: Struct<{
@@ -108,7 +108,7 @@ export declare const InternalEthEoaAccountStruct: Struct<{
108
108
  }>;
109
109
  address: import("@metamask/superstruct").Struct<string, null>;
110
110
  type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
111
- scopes: import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScopes.Namespace[], import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScopes.Namespace, import("@metamask/keyring-api").EthScopes.Namespace>>;
111
+ scopes: import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScope.Namespace[], import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScope.Namespace, import("@metamask/keyring-api").EthScope.Namespace>>;
112
112
  methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
113
113
  personal_sign: "personal_sign";
114
114
  eth_sign: "eth_sign";
@@ -139,7 +139,7 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
139
139
  lastSelected?: number;
140
140
  };
141
141
  address: string;
142
- scopes: string[];
142
+ scopes: `${string}:${string}`[];
143
143
  methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
144
144
  }, {
145
145
  metadata: Struct<{
@@ -177,6 +177,7 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
177
177
  }>;
178
178
  address: import("@metamask/superstruct").Struct<string, null>;
179
179
  type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">;
180
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
180
181
  methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
181
182
  personal_sign: "personal_sign";
182
183
  eth_sign: "eth_sign";
@@ -188,7 +189,6 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
188
189
  eth_signUserOperation: "eth_signUserOperation";
189
190
  }>>;
190
191
  id: import("@metamask/superstruct").Struct<string, null>;
191
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
192
192
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
193
193
  }>;
194
194
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
@@ -210,7 +210,7 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
210
210
  lastSelected?: number;
211
211
  };
212
212
  address: string;
213
- scopes: string[];
213
+ scopes: `${string}:${string}`[];
214
214
  methods: "sendBitcoin"[];
215
215
  }, {
216
216
  metadata: Struct<{
@@ -248,11 +248,11 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
248
248
  }>;
249
249
  address: import("@metamask/superstruct").Struct<string, null>;
250
250
  type: import("@metamask/superstruct").Struct<"bip122:p2wpkh", "bip122:p2wpkh">;
251
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
251
252
  methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
252
253
  sendBitcoin: "sendBitcoin";
253
254
  }>>;
254
255
  id: import("@metamask/superstruct").Struct<string, null>;
255
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
256
256
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
257
257
  }>;
258
258
  export declare const InternalSolDataAccountStruct: Struct<{
@@ -274,7 +274,7 @@ export declare const InternalSolDataAccountStruct: Struct<{
274
274
  lastSelected?: number;
275
275
  };
276
276
  address: string;
277
- scopes: string[];
277
+ scopes: `${string}:${string}`[];
278
278
  methods: "sendAndConfirmTransaction"[];
279
279
  }, {
280
280
  metadata: Struct<{
@@ -312,11 +312,11 @@ export declare const InternalSolDataAccountStruct: Struct<{
312
312
  }>;
313
313
  address: import("@metamask/superstruct").Struct<string, null>;
314
314
  type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
315
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
315
316
  methods: import("@metamask/superstruct").Struct<"sendAndConfirmTransaction"[], import("@metamask/superstruct").Struct<"sendAndConfirmTransaction", {
316
317
  sendAndConfirmTransaction: "sendAndConfirmTransaction";
317
318
  }>>;
318
319
  id: import("@metamask/superstruct").Struct<string, null>;
319
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
320
320
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
321
321
  }>;
322
322
  export type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
package/dist/types.d.mts CHANGED
@@ -70,7 +70,7 @@ export declare const InternalEthEoaAccountStruct: Struct<{
70
70
  lastSelected?: number;
71
71
  };
72
72
  address: string;
73
- scopes: import("@metamask/keyring-api").EthScopes.Namespace[];
73
+ scopes: import("@metamask/keyring-api").EthScope.Namespace[];
74
74
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
75
75
  }, {
76
76
  metadata: Struct<{
@@ -108,7 +108,7 @@ export declare const InternalEthEoaAccountStruct: Struct<{
108
108
  }>;
109
109
  address: import("@metamask/superstruct").Struct<string, null>;
110
110
  type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
111
- scopes: import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScopes.Namespace[], import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScopes.Namespace, import("@metamask/keyring-api").EthScopes.Namespace>>;
111
+ scopes: import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScope.Namespace[], import("@metamask/superstruct").Struct<import("@metamask/keyring-api").EthScope.Namespace, import("@metamask/keyring-api").EthScope.Namespace>>;
112
112
  methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
113
113
  personal_sign: "personal_sign";
114
114
  eth_sign: "eth_sign";
@@ -139,7 +139,7 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
139
139
  lastSelected?: number;
140
140
  };
141
141
  address: string;
142
- scopes: string[];
142
+ scopes: `${string}:${string}`[];
143
143
  methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
144
144
  }, {
145
145
  metadata: Struct<{
@@ -177,6 +177,7 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
177
177
  }>;
178
178
  address: import("@metamask/superstruct").Struct<string, null>;
179
179
  type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">;
180
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
180
181
  methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
181
182
  personal_sign: "personal_sign";
182
183
  eth_sign: "eth_sign";
@@ -188,7 +189,6 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
188
189
  eth_signUserOperation: "eth_signUserOperation";
189
190
  }>>;
190
191
  id: import("@metamask/superstruct").Struct<string, null>;
191
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
192
192
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
193
193
  }>;
194
194
  export declare const InternalBtcP2wpkhAccountStruct: Struct<{
@@ -210,7 +210,7 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
210
210
  lastSelected?: number;
211
211
  };
212
212
  address: string;
213
- scopes: string[];
213
+ scopes: `${string}:${string}`[];
214
214
  methods: "sendBitcoin"[];
215
215
  }, {
216
216
  metadata: Struct<{
@@ -248,11 +248,11 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
248
248
  }>;
249
249
  address: import("@metamask/superstruct").Struct<string, null>;
250
250
  type: import("@metamask/superstruct").Struct<"bip122:p2wpkh", "bip122:p2wpkh">;
251
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
251
252
  methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
252
253
  sendBitcoin: "sendBitcoin";
253
254
  }>>;
254
255
  id: import("@metamask/superstruct").Struct<string, null>;
255
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
256
256
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
257
257
  }>;
258
258
  export declare const InternalSolDataAccountStruct: Struct<{
@@ -274,7 +274,7 @@ export declare const InternalSolDataAccountStruct: Struct<{
274
274
  lastSelected?: number;
275
275
  };
276
276
  address: string;
277
- scopes: string[];
277
+ scopes: `${string}:${string}`[];
278
278
  methods: "sendAndConfirmTransaction"[];
279
279
  }, {
280
280
  metadata: Struct<{
@@ -312,11 +312,11 @@ export declare const InternalSolDataAccountStruct: Struct<{
312
312
  }>;
313
313
  address: import("@metamask/superstruct").Struct<string, null>;
314
314
  type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
315
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
315
316
  methods: import("@metamask/superstruct").Struct<"sendAndConfirmTransaction"[], import("@metamask/superstruct").Struct<"sendAndConfirmTransaction", {
316
317
  sendAndConfirmTransaction: "sendAndConfirmTransaction";
317
318
  }>>;
318
319
  id: import("@metamask/superstruct").Struct<string, null>;
319
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
320
320
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
321
321
  }>;
322
322
  export type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-internal-api",
3
- "version": "2.0.1-7fd7a95",
3
+ "version": "3.0.0-0aca2ee",
4
4
  "description": "MetaMask Keyring Internal API",
5
5
  "keywords": [
6
6
  "metamask",
@@ -45,8 +45,8 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@metamask/keyring-api": "14.0.0",
49
- "@metamask/keyring-utils": "1.2.0",
48
+ "@metamask/keyring-api": "15.0.0",
49
+ "@metamask/keyring-utils": "1.3.0",
50
50
  "@metamask/superstruct": "^3.1.0",
51
51
  "@metamask/utils": "^11.0.1"
52
52
  },