@metamask-previews/eth-snap-keyring 9.0.0-2939d28 → 9.0.0-30e933c

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.
@@ -19,7 +19,7 @@ export declare const KeyringAccountV1Struct: import("@metamask/superstruct").Str
19
19
  "solana:data-account": "solana:data-account";
20
20
  }>;
21
21
  address: import("@metamask/superstruct").Struct<string, null>;
22
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
22
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
23
23
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
24
24
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
25
25
  }, "scopes">>;
@@ -19,7 +19,7 @@ export declare const KeyringAccountV1Struct: import("@metamask/superstruct").Str
19
19
  "solana:data-account": "solana:data-account";
20
20
  }>;
21
21
  address: import("@metamask/superstruct").Struct<string, null>;
22
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
22
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
23
23
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
24
24
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
25
25
  }, "scopes">>;
package/dist/events.d.cts CHANGED
@@ -6,7 +6,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
6
6
  id: string;
7
7
  options: Record<string, import("@metamask/utils").Json>;
8
8
  address: string;
9
- scopes: string[];
9
+ scopes: `${string}:${string}`[];
10
10
  methods: string[];
11
11
  } | {
12
12
  id: string;
@@ -26,7 +26,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
26
26
  id: string;
27
27
  options: Record<string, import("@metamask/utils").Json>;
28
28
  address: string;
29
- scopes: string[];
29
+ scopes: `${string}:${string}`[];
30
30
  methods: string[];
31
31
  } | {
32
32
  id: string;
@@ -43,7 +43,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
43
43
  id: string;
44
44
  options: Record<string, import("@metamask/utils").Json>;
45
45
  address: string;
46
- scopes: string[];
46
+ scopes: `${string}:${string}`[];
47
47
  methods: string[];
48
48
  } | {
49
49
  id: string;
@@ -64,7 +64,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
64
64
  id: string;
65
65
  options: Record<string, import("@metamask/utils").Json>;
66
66
  address: string;
67
- scopes: string[];
67
+ scopes: `${string}:${string}`[];
68
68
  methods: string[];
69
69
  } | {
70
70
  id: string;
@@ -82,7 +82,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
82
82
  id: string;
83
83
  options: Record<string, import("@metamask/utils").Json>;
84
84
  address: string;
85
- scopes: string[];
85
+ scopes: `${string}:${string}`[];
86
86
  methods: string[];
87
87
  } | {
88
88
  id: string;
@@ -97,7 +97,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
97
97
  id: string;
98
98
  options: Record<string, import("@metamask/utils").Json>;
99
99
  address: string;
100
- scopes: string[];
100
+ scopes: `${string}:${string}`[];
101
101
  methods: string[];
102
102
  } | {
103
103
  id: string;
package/dist/events.d.mts CHANGED
@@ -6,7 +6,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
6
6
  id: string;
7
7
  options: Record<string, import("@metamask/utils").Json>;
8
8
  address: string;
9
- scopes: string[];
9
+ scopes: `${string}:${string}`[];
10
10
  methods: string[];
11
11
  } | {
12
12
  id: string;
@@ -26,7 +26,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
26
26
  id: string;
27
27
  options: Record<string, import("@metamask/utils").Json>;
28
28
  address: string;
29
- scopes: string[];
29
+ scopes: `${string}:${string}`[];
30
30
  methods: string[];
31
31
  } | {
32
32
  id: string;
@@ -43,7 +43,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
43
43
  id: string;
44
44
  options: Record<string, import("@metamask/utils").Json>;
45
45
  address: string;
46
- scopes: string[];
46
+ scopes: `${string}:${string}`[];
47
47
  methods: string[];
48
48
  } | {
49
49
  id: string;
@@ -64,7 +64,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
64
64
  id: string;
65
65
  options: Record<string, import("@metamask/utils").Json>;
66
66
  address: string;
67
- scopes: string[];
67
+ scopes: `${string}:${string}`[];
68
68
  methods: string[];
69
69
  } | {
70
70
  id: string;
@@ -82,7 +82,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
82
82
  id: string;
83
83
  options: Record<string, import("@metamask/utils").Json>;
84
84
  address: string;
85
- scopes: string[];
85
+ scopes: `${string}:${string}`[];
86
86
  methods: string[];
87
87
  } | {
88
88
  id: string;
@@ -97,7 +97,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
97
97
  id: string;
98
98
  options: Record<string, import("@metamask/utils").Json>;
99
99
  address: string;
100
- scopes: string[];
100
+ scopes: `${string}:${string}`[];
101
101
  methods: string[];
102
102
  } | {
103
103
  id: string;
@@ -28,9 +28,11 @@ account) {
28
28
  function getScopesForAccountV1(accountV1) {
29
29
  switch (accountV1.type) {
30
30
  case keyring_api_1.EthAccountType.Eoa: {
31
- // EVM EOA account are compatible with any EVM networks, and we use CAIP-2
32
- // namespaces when the scope relates to ALL chains (from that namespace).
33
- return [keyring_api_1.EthScopes.Namespace];
31
+ // EVM EOA account are compatible with any EVM networks, we use the
32
+ // 'eip155:0' scope as defined in the EVM CAIP-10 namespaces.
33
+ //
34
+ // See: https://namespaces.chainagnostic.org/eip155/caip10
35
+ return [keyring_api_1.EthScope.Eoa];
34
36
  }
35
37
  case keyring_api_1.EthAccountType.Erc4337: {
36
38
  // EVM Erc4337 account
@@ -38,23 +40,23 @@ function getScopesForAccountV1(accountV1) {
38
40
  // to testnet since we cannot really "guess" it from here.
39
41
  // Also, there's no official Snap as of today that uses this account type. So this case should never happen
40
42
  // in production.
41
- return [keyring_api_1.EthScopes.Testnet];
43
+ return [keyring_api_1.EthScope.Testnet];
42
44
  }
43
45
  case keyring_api_1.BtcAccountType.P2wpkh: {
44
46
  // Bitcoin uses different accounts for testnet and mainnet
45
47
  return [
46
48
  (0, keyring_utils_1.isBtcMainnetAddress)(accountV1.address)
47
- ? keyring_api_1.BtcScopes.Mainnet
48
- : keyring_api_1.BtcScopes.Testnet,
49
+ ? keyring_api_1.BtcScope.Mainnet
50
+ : keyring_api_1.BtcScope.Testnet,
49
51
  ];
50
52
  }
51
53
  case keyring_api_1.SolAccountType.DataAccount: {
52
54
  // Solana account supports multiple chains.
53
- return [keyring_api_1.SolScopes.Mainnet, keyring_api_1.SolScopes.Testnet, keyring_api_1.SolScopes.Devnet];
55
+ return [keyring_api_1.SolScope.Mainnet, keyring_api_1.SolScope.Testnet, keyring_api_1.SolScope.Devnet];
54
56
  }
55
57
  default:
56
58
  // We re-use EOA scopes if we don't know what to do for now.
57
- return [keyring_api_1.EthScopes.Namespace];
59
+ return [keyring_api_1.EthScope.Eoa];
58
60
  }
59
61
  }
60
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"v1.cjs","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":";;AAwBA,kCAKC;AAQD,sDA+BC;AAWD,gDAmBC;AAUD,4CAUC;AAtHD,uDAQ+B;AAC/B,2DAA8D;AAC9D,uDAA2C;AAE3C,4CAIoB;AAEpB;;;;;GAKG;AACH,SAAgB,WAAW;AACzB,6EAA6E;AAC7E,OAA0C;IAE1C,OAAO,IAAA,gBAAE,EAAC,OAAO,EAAE,gCAAsB,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,SAA2B;IAC/D,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,KAAK,4BAAc,CAAC,G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gB,gBAAgB,CAAC,SAA2B;IAC1D,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,8BAA8B;QAC9B,OAAO,SAA2B,CAAC;IACrC,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import {\n BtcAccountType,\n BtcScopes,\n EthAccountType,\n EthScopes,\n SolAccountType,\n SolScopes,\n type KeyringAccount,\n} from '@metamask/keyring-api';\nimport { isBtcMainnetAddress } from '@metamask/keyring-utils';\nimport { is } from '@metamask/superstruct';\n\nimport {\n assertKeyringAccount,\n KeyringAccountV1Struct,\n type KeyringAccountV1,\n} from '../account';\n\n/**\n * Checks if an account is an `KeyringAccount` v1.\n *\n * @param account - A v1 account to check.\n * @returns True if the account is v1, false otherwise.\n */\nexport function isAccountV1(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n account: KeyringAccountV1 | KeyringAccount,\n): boolean {\n return is(account, KeyringAccountV1Struct);\n}\n\n/**\n * Gets default scopes for a v1 account.\n *\n * @param accountV1 - A v1 account.\n * @returns The list of scopes for that accounts.\n */\nexport function getScopesForAccountV1(accountV1: KeyringAccountV1): string[] {\n switch (accountV1.type) {\n case EthAccountType.Eoa: {\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n return [EthScopes.Namespace];\n }\n case EthAccountType.Erc4337: {\n // EVM Erc4337 account\n // NOTE: A Smart Contract account might not be compatible with every chain, in this case we just default\n // to testnet since we cannot really \"guess\" it from here.\n // Also, there's no official Snap as of today that uses this account type. So this case should never happen\n // in production.\n return [EthScopes.Testnet];\n }\n case BtcAccountType.P2wpkh: {\n // Bitcoin uses different accounts for testnet and mainnet\n return [\n isBtcMainnetAddress(accountV1.address)\n ? BtcScopes.Mainnet\n : BtcScopes.Testnet,\n ];\n }\n case SolAccountType.DataAccount: {\n // Solana account supports multiple chains.\n return [SolScopes.Mainnet, SolScopes.Testnet, SolScopes.Devnet];\n }\n default:\n // We re-use EOA scopes if we don't know what to do for now.\n return [EthScopes.Namespace];\n }\n}\n\n/**\n * Transform an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * default values.\n *\n * @param accountV1 - A v1 account to transform.\n * @throws An error if the v1 account cannot be transformed.\n * @returns A valid KeyringAccount.\n */\nexport function transformAccountV1(\n accountV1: KeyringAccountV1,\n): KeyringAccount {\n const { type } = accountV1;\n\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n // So we can automatically inject a valid `scopes` for this, but not for\n // other kind of accounts.\n if (type === EthAccountType.Eoa) {\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n }\n\n // For all other non-EVM and ERC4337 Snap accounts, the `scopes` is required, and\n // each `*AccountStruct` should assert that automatically.\n return assertKeyringAccount(accountV1);\n}\n\n/**\n * Migrate an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * meaningful default values.\n *\n * @param accountV1 - The account to migrate.\n * @returns A valid KeyringAccount.\n */\nexport function migrateAccountV1(accountV1: KeyringAccountV1): KeyringAccount {\n if (!isAccountV1(accountV1)) {\n // Nothing to do in this case.\n return accountV1 as KeyringAccount;\n }\n\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n}\n"]}
1
+ {"version":3,"file":"v1.cjs","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":";;AAyBA,kCAKC;AAQD,sDAmCC;AAWD,gDAmBC;AAUD,4CAUC;AA3HD,uDAQ+B;AAC/B,2DAA8D;AAC9D,uDAA2C;AAG3C,4CAIoB;AAEpB;;;;;GAKG;AACH,SAAgB,WAAW;AACzB,6EAA6E;AAC7E,OAA0C;IAE1C,OAAO,IAAA,gBAAE,EAAC,OAAO,EAAE,gCAAsB,CAAC,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M,EAAE,qBAAqB,CAAC,SAAS,CAAC;SACzC,CAAC;IACJ,CAAC;IAED,iFAAiF;IACjF,0DAA0D;IAC1D,OAAO,IAAA,8BAAoB,EAAC,SAAS,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,SAA2B;IAC1D,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,8BAA8B;QAC9B,OAAO,SAA2B,CAAC;IACrC,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import {\n BtcAccountType,\n BtcScope,\n EthAccountType,\n EthScope,\n SolAccountType,\n SolScope,\n type KeyringAccount,\n} from '@metamask/keyring-api';\nimport { isBtcMainnetAddress } from '@metamask/keyring-utils';\nimport { is } from '@metamask/superstruct';\nimport type { CaipChainId } from '@metamask/utils';\n\nimport {\n assertKeyringAccount,\n KeyringAccountV1Struct,\n type KeyringAccountV1,\n} from '../account';\n\n/**\n * Checks if an account is an `KeyringAccount` v1.\n *\n * @param account - A v1 account to check.\n * @returns True if the account is v1, false otherwise.\n */\nexport function isAccountV1(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n account: KeyringAccountV1 | KeyringAccount,\n): boolean {\n return is(account, KeyringAccountV1Struct);\n}\n\n/**\n * Gets default scopes for a v1 account.\n *\n * @param accountV1 - A v1 account.\n * @returns The list of scopes for that accounts.\n */\nexport function getScopesForAccountV1(\n accountV1: KeyringAccountV1,\n): CaipChainId[] {\n switch (accountV1.type) {\n case EthAccountType.Eoa: {\n // EVM EOA account are compatible with any EVM networks, we use the\n // 'eip155:0' scope as defined in the EVM CAIP-10 namespaces.\n //\n // See: https://namespaces.chainagnostic.org/eip155/caip10\n return [EthScope.Eoa];\n }\n case EthAccountType.Erc4337: {\n // EVM Erc4337 account\n // NOTE: A Smart Contract account might not be compatible with every chain, in this case we just default\n // to testnet since we cannot really \"guess\" it from here.\n // Also, there's no official Snap as of today that uses this account type. So this case should never happen\n // in production.\n return [EthScope.Testnet];\n }\n case BtcAccountType.P2wpkh: {\n // Bitcoin uses different accounts for testnet and mainnet\n return [\n isBtcMainnetAddress(accountV1.address)\n ? BtcScope.Mainnet\n : BtcScope.Testnet,\n ];\n }\n case SolAccountType.DataAccount: {\n // Solana account supports multiple chains.\n return [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet];\n }\n default:\n // We re-use EOA scopes if we don't know what to do for now.\n return [EthScope.Eoa];\n }\n}\n\n/**\n * Transform an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * default values.\n *\n * @param accountV1 - A v1 account to transform.\n * @throws An error if the v1 account cannot be transformed.\n * @returns A valid KeyringAccount.\n */\nexport function transformAccountV1(\n accountV1: KeyringAccountV1,\n): KeyringAccount {\n const { type } = accountV1;\n\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n // So we can automatically inject a valid `scopes` for this, but not for\n // other kind of accounts.\n if (type === EthAccountType.Eoa) {\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n }\n\n // For all other non-EVM and ERC4337 Snap accounts, the `scopes` is required, and\n // each `*AccountStruct` should assert that automatically.\n return assertKeyringAccount(accountV1);\n}\n\n/**\n * Migrate an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * meaningful default values.\n *\n * @param accountV1 - The account to migrate.\n * @returns A valid KeyringAccount.\n */\nexport function migrateAccountV1(accountV1: KeyringAccountV1): KeyringAccount {\n if (!isAccountV1(accountV1)) {\n // Nothing to do in this case.\n return accountV1 as KeyringAccount;\n }\n\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { type KeyringAccount } from "@metamask/keyring-api";
2
+ import type { CaipChainId } from "@metamask/utils";
2
3
  import { type KeyringAccountV1 } from "../account.cjs";
3
4
  /**
4
5
  * Checks if an account is an `KeyringAccount` v1.
@@ -13,7 +14,7 @@ export declare function isAccountV1(account: KeyringAccountV1 | KeyringAccount):
13
14
  * @param accountV1 - A v1 account.
14
15
  * @returns The list of scopes for that accounts.
15
16
  */
16
- export declare function getScopesForAccountV1(accountV1: KeyringAccountV1): string[];
17
+ export declare function getScopesForAccountV1(accountV1: KeyringAccountV1): CaipChainId[];
17
18
  /**
18
19
  * Transform an account v1. This account might have optional fields that are now required by
19
20
  * the Keyring API. This function will automatically provides the missing fields with some
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.cts","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,8BAA8B;AAI/B,OAAO,EAGL,KAAK,gBAAgB,EACtB,uBAAmB;AAEpB;;;;;GAKG;AACH,wBAAgB,WAAW,CAEzB,OAAO,EAAE,gBAAgB,GAAG,cAAc,GACzC,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CA+B3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CAiBhB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,GAAG,cAAc,CAU5E"}
1
+ {"version":3,"file":"v1.d.cts","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,8BAA8B;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAEnD,OAAO,EAGL,KAAK,gBAAgB,EACtB,uBAAmB;AAEpB;;;;;GAKG;AACH,wBAAgB,WAAW,CAEzB,OAAO,EAAE,gBAAgB,GAAG,cAAc,GACzC,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,gBAAgB,GAC1B,WAAW,EAAE,CAiCf;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CAiBhB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,GAAG,cAAc,CAU5E"}
@@ -1,4 +1,5 @@
1
1
  import { type KeyringAccount } from "@metamask/keyring-api";
2
+ import type { CaipChainId } from "@metamask/utils";
2
3
  import { type KeyringAccountV1 } from "../account.mjs";
3
4
  /**
4
5
  * Checks if an account is an `KeyringAccount` v1.
@@ -13,7 +14,7 @@ export declare function isAccountV1(account: KeyringAccountV1 | KeyringAccount):
13
14
  * @param accountV1 - A v1 account.
14
15
  * @returns The list of scopes for that accounts.
15
16
  */
16
- export declare function getScopesForAccountV1(accountV1: KeyringAccountV1): string[];
17
+ export declare function getScopesForAccountV1(accountV1: KeyringAccountV1): CaipChainId[];
17
18
  /**
18
19
  * Transform an account v1. This account might have optional fields that are now required by
19
20
  * the Keyring API. This function will automatically provides the missing fields with some
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,8BAA8B;AAI/B,OAAO,EAGL,KAAK,gBAAgB,EACtB,uBAAmB;AAEpB;;;;;GAKG;AACH,wBAAgB,WAAW,CAEzB,OAAO,EAAE,gBAAgB,GAAG,cAAc,GACzC,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CA+B3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CAiBhB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,GAAG,cAAc,CAU5E"}
1
+ {"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACpB,8BAA8B;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAEnD,OAAO,EAGL,KAAK,gBAAgB,EACtB,uBAAmB;AAEpB;;;;;GAKG;AACH,wBAAgB,WAAW,CAEzB,OAAO,EAAE,gBAAgB,GAAG,cAAc,GACzC,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,gBAAgB,GAC1B,WAAW,EAAE,CAiCf;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CAiBhB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,GAAG,cAAc,CAU5E"}
@@ -1,4 +1,4 @@
1
- import { BtcAccountType, BtcScopes, EthAccountType, EthScopes, SolAccountType, SolScopes } from "@metamask/keyring-api";
1
+ import { BtcAccountType, BtcScope, EthAccountType, EthScope, SolAccountType, SolScope } from "@metamask/keyring-api";
2
2
  import { isBtcMainnetAddress } from "@metamask/keyring-utils";
3
3
  import { is } from "@metamask/superstruct";
4
4
  import { assertKeyringAccount, KeyringAccountV1Struct } from "../account.mjs";
@@ -22,9 +22,11 @@ account) {
22
22
  export function getScopesForAccountV1(accountV1) {
23
23
  switch (accountV1.type) {
24
24
  case EthAccountType.Eoa: {
25
- // EVM EOA account are compatible with any EVM networks, and we use CAIP-2
26
- // namespaces when the scope relates to ALL chains (from that namespace).
27
- return [EthScopes.Namespace];
25
+ // EVM EOA account are compatible with any EVM networks, we use the
26
+ // 'eip155:0' scope as defined in the EVM CAIP-10 namespaces.
27
+ //
28
+ // See: https://namespaces.chainagnostic.org/eip155/caip10
29
+ return [EthScope.Eoa];
28
30
  }
29
31
  case EthAccountType.Erc4337: {
30
32
  // EVM Erc4337 account
@@ -32,23 +34,23 @@ export function getScopesForAccountV1(accountV1) {
32
34
  // to testnet since we cannot really "guess" it from here.
33
35
  // Also, there's no official Snap as of today that uses this account type. So this case should never happen
34
36
  // in production.
35
- return [EthScopes.Testnet];
37
+ return [EthScope.Testnet];
36
38
  }
37
39
  case BtcAccountType.P2wpkh: {
38
40
  // Bitcoin uses different accounts for testnet and mainnet
39
41
  return [
40
42
  isBtcMainnetAddress(accountV1.address)
41
- ? BtcScopes.Mainnet
42
- : BtcScopes.Testnet,
43
+ ? BtcScope.Mainnet
44
+ : BtcScope.Testnet,
43
45
  ];
44
46
  }
45
47
  case SolAccountType.DataAccount: {
46
48
  // Solana account supports multiple chains.
47
- return [SolScopes.Mainnet, SolScopes.Testnet, SolScopes.Devnet];
49
+ return [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet];
48
50
  }
49
51
  default:
50
52
  // We re-use EOA scopes if we don't know what to do for now.
51
- return [EthScopes.Namespace];
53
+ return [EthScope.Eoa];
52
54
  }
53
55
  }
54
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,SAAS,EAEV,8BAA8B;AAC/B,OAAO,EAAE,mBAAmB,EAAE,gCAAgC;AAC9D,OAAO,EAAE,EAAE,EAAE,8BAA8B;AAE3C,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EAEvB,uBAAmB;AAEpB;;;;;GAKG;AACH,MAAM,UAAU,WAAW;AACzB,6EAA6E;AAC7E,OAA0C;IAE1C,OAAO,EAAE,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAA2B;IAC/D,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,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UAAU,gBAAgB,CAAC,SAA2B;IAC1D,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,8BAA8B;QAC9B,OAAO,SAA2B,CAAC;IACrC,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import {\n BtcAccountType,\n BtcScopes,\n EthAccountType,\n EthScopes,\n SolAccountType,\n SolScopes,\n type KeyringAccount,\n} from '@metamask/keyring-api';\nimport { isBtcMainnetAddress } from '@metamask/keyring-utils';\nimport { is } from '@metamask/superstruct';\n\nimport {\n assertKeyringAccount,\n KeyringAccountV1Struct,\n type KeyringAccountV1,\n} from '../account';\n\n/**\n * Checks if an account is an `KeyringAccount` v1.\n *\n * @param account - A v1 account to check.\n * @returns True if the account is v1, false otherwise.\n */\nexport function isAccountV1(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n account: KeyringAccountV1 | KeyringAccount,\n): boolean {\n return is(account, KeyringAccountV1Struct);\n}\n\n/**\n * Gets default scopes for a v1 account.\n *\n * @param accountV1 - A v1 account.\n * @returns The list of scopes for that accounts.\n */\nexport function getScopesForAccountV1(accountV1: KeyringAccountV1): string[] {\n switch (accountV1.type) {\n case EthAccountType.Eoa: {\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n return [EthScopes.Namespace];\n }\n case EthAccountType.Erc4337: {\n // EVM Erc4337 account\n // NOTE: A Smart Contract account might not be compatible with every chain, in this case we just default\n // to testnet since we cannot really \"guess\" it from here.\n // Also, there's no official Snap as of today that uses this account type. So this case should never happen\n // in production.\n return [EthScopes.Testnet];\n }\n case BtcAccountType.P2wpkh: {\n // Bitcoin uses different accounts for testnet and mainnet\n return [\n isBtcMainnetAddress(accountV1.address)\n ? BtcScopes.Mainnet\n : BtcScopes.Testnet,\n ];\n }\n case SolAccountType.DataAccount: {\n // Solana account supports multiple chains.\n return [SolScopes.Mainnet, SolScopes.Testnet, SolScopes.Devnet];\n }\n default:\n // We re-use EOA scopes if we don't know what to do for now.\n return [EthScopes.Namespace];\n }\n}\n\n/**\n * Transform an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * default values.\n *\n * @param accountV1 - A v1 account to transform.\n * @throws An error if the v1 account cannot be transformed.\n * @returns A valid KeyringAccount.\n */\nexport function transformAccountV1(\n accountV1: KeyringAccountV1,\n): KeyringAccount {\n const { type } = accountV1;\n\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n // So we can automatically inject a valid `scopes` for this, but not for\n // other kind of accounts.\n if (type === EthAccountType.Eoa) {\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n }\n\n // For all other non-EVM and ERC4337 Snap accounts, the `scopes` is required, and\n // each `*AccountStruct` should assert that automatically.\n return assertKeyringAccount(accountV1);\n}\n\n/**\n * Migrate an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * meaningful default values.\n *\n * @param accountV1 - The account to migrate.\n * @returns A valid KeyringAccount.\n */\nexport function migrateAccountV1(accountV1: KeyringAccountV1): KeyringAccount {\n if (!isAccountV1(accountV1)) {\n // Nothing to do in this case.\n return accountV1 as KeyringAccount;\n }\n\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n}\n"]}
1
+ {"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/migrations/v1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,cAAc,EACd,QAAQ,EAET,8BAA8B;AAC/B,OAAO,EAAE,mBAAmB,EAAE,gCAAgC;AAC9D,OAAO,EAAE,EAAE,EAAE,8BAA8B;AAG3C,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EAEvB,uBAAmB;AAEpB;;;;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A0B;IAC1B,IAAI,IAAI,KAAK,cAAc,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO;YACL,GAAG,SAAS;YACZ,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC;SACzC,CAAC;IACJ,CAAC;IAED,iFAAiF;IACjF,0DAA0D;IAC1D,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAA2B;IAC1D,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,8BAA8B;QAC9B,OAAO,SAA2B,CAAC;IACrC,CAAC;IAED,OAAO;QACL,GAAG,SAAS;QACZ,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import {\n BtcAccountType,\n BtcScope,\n EthAccountType,\n EthScope,\n SolAccountType,\n SolScope,\n type KeyringAccount,\n} from '@metamask/keyring-api';\nimport { isBtcMainnetAddress } from '@metamask/keyring-utils';\nimport { is } from '@metamask/superstruct';\nimport type { CaipChainId } from '@metamask/utils';\n\nimport {\n assertKeyringAccount,\n KeyringAccountV1Struct,\n type KeyringAccountV1,\n} from '../account';\n\n/**\n * Checks if an account is an `KeyringAccount` v1.\n *\n * @param account - A v1 account to check.\n * @returns True if the account is v1, false otherwise.\n */\nexport function isAccountV1(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n account: KeyringAccountV1 | KeyringAccount,\n): boolean {\n return is(account, KeyringAccountV1Struct);\n}\n\n/**\n * Gets default scopes for a v1 account.\n *\n * @param accountV1 - A v1 account.\n * @returns The list of scopes for that accounts.\n */\nexport function getScopesForAccountV1(\n accountV1: KeyringAccountV1,\n): CaipChainId[] {\n switch (accountV1.type) {\n case EthAccountType.Eoa: {\n // EVM EOA account are compatible with any EVM networks, we use the\n // 'eip155:0' scope as defined in the EVM CAIP-10 namespaces.\n //\n // See: https://namespaces.chainagnostic.org/eip155/caip10\n return [EthScope.Eoa];\n }\n case EthAccountType.Erc4337: {\n // EVM Erc4337 account\n // NOTE: A Smart Contract account might not be compatible with every chain, in this case we just default\n // to testnet since we cannot really \"guess\" it from here.\n // Also, there's no official Snap as of today that uses this account type. So this case should never happen\n // in production.\n return [EthScope.Testnet];\n }\n case BtcAccountType.P2wpkh: {\n // Bitcoin uses different accounts for testnet and mainnet\n return [\n isBtcMainnetAddress(accountV1.address)\n ? BtcScope.Mainnet\n : BtcScope.Testnet,\n ];\n }\n case SolAccountType.DataAccount: {\n // Solana account supports multiple chains.\n return [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet];\n }\n default:\n // We re-use EOA scopes if we don't know what to do for now.\n return [EthScope.Eoa];\n }\n}\n\n/**\n * Transform an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * default values.\n *\n * @param accountV1 - A v1 account to transform.\n * @throws An error if the v1 account cannot be transformed.\n * @returns A valid KeyringAccount.\n */\nexport function transformAccountV1(\n accountV1: KeyringAccountV1,\n): KeyringAccount {\n const { type } = accountV1;\n\n // EVM EOA account are compatible with any EVM networks, and we use CAIP-2\n // namespaces when the scope relates to ALL chains (from that namespace).\n // So we can automatically inject a valid `scopes` for this, but not for\n // other kind of accounts.\n if (type === EthAccountType.Eoa) {\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n }\n\n // For all other non-EVM and ERC4337 Snap accounts, the `scopes` is required, and\n // each `*AccountStruct` should assert that automatically.\n return assertKeyringAccount(accountV1);\n}\n\n/**\n * Migrate an account v1. This account might have optional fields that are now required by\n * the Keyring API. This function will automatically provides the missing fields with some\n * meaningful default values.\n *\n * @param accountV1 - The account to migrate.\n * @returns A valid KeyringAccount.\n */\nexport function migrateAccountV1(accountV1: KeyringAccountV1): KeyringAccount {\n if (!isAccountV1(accountV1)) {\n // Nothing to do in this case.\n return accountV1 as KeyringAccount;\n }\n\n return {\n ...accountV1,\n scopes: getScopesForAccountV1(accountV1),\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/eth-snap-keyring",
3
- "version": "9.0.0-2939d28",
3
+ "version": "9.0.0-30e933c",
4
4
  "description": "Snaps keyring bridge.",
5
5
  "repository": {
6
6
  "type": "git",