@metamask-previews/keyring-api 15.0.0-3d5158c → 15.0.0-9c70d70

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.
Files changed (45) hide show
  1. package/dist/api/account.cjs +1 -1
  2. package/dist/api/account.cjs.map +1 -1
  3. package/dist/api/account.d.cts +2 -2
  4. package/dist/api/account.d.cts.map +1 -1
  5. package/dist/api/account.d.mts +2 -2
  6. package/dist/api/account.d.mts.map +1 -1
  7. package/dist/api/account.mjs +3 -3
  8. package/dist/api/account.mjs.map +1 -1
  9. package/dist/btc/constants.cjs +9 -10
  10. package/dist/btc/constants.cjs.map +1 -1
  11. package/dist/btc/constants.d.cts +1 -2
  12. package/dist/btc/constants.d.cts.map +1 -1
  13. package/dist/btc/constants.d.mts +1 -2
  14. package/dist/btc/constants.d.mts.map +1 -1
  15. package/dist/btc/constants.mjs +8 -9
  16. package/dist/btc/constants.mjs.map +1 -1
  17. package/dist/eth/constants.cjs +7 -7
  18. package/dist/eth/constants.cjs.map +1 -1
  19. package/dist/eth/constants.d.cts +2 -2
  20. package/dist/eth/constants.d.cts.map +1 -1
  21. package/dist/eth/constants.d.mts +2 -2
  22. package/dist/eth/constants.d.mts.map +1 -1
  23. package/dist/eth/constants.mjs +6 -6
  24. package/dist/eth/constants.mjs.map +1 -1
  25. package/dist/eth/types.cjs +2 -2
  26. package/dist/eth/types.cjs.map +1 -1
  27. package/dist/eth/types.d.cts +4 -4
  28. package/dist/eth/types.d.cts.map +1 -1
  29. package/dist/eth/types.d.mts +4 -4
  30. package/dist/eth/types.d.mts.map +1 -1
  31. package/dist/eth/types.mjs +3 -3
  32. package/dist/eth/types.mjs.map +1 -1
  33. package/dist/events.d.cts +8 -8
  34. package/dist/events.d.mts +8 -8
  35. package/dist/rpc.d.cts +11 -11
  36. package/dist/rpc.d.mts +11 -11
  37. package/dist/sol/constants.cjs +7 -8
  38. package/dist/sol/constants.cjs.map +1 -1
  39. package/dist/sol/constants.d.cts +1 -2
  40. package/dist/sol/constants.d.cts.map +1 -1
  41. package/dist/sol/constants.d.mts +1 -2
  42. package/dist/sol/constants.d.mts.map +1 -1
  43. package/dist/sol/constants.mjs +6 -7
  44. package/dist/sol/constants.mjs.map +1 -1
  45. package/package.json +1 -1
@@ -54,7 +54,7 @@ exports.KeyringAccountStruct = (0, keyring_utils_1.object)({
54
54
  /**
55
55
  * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).
56
56
  */
57
- scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)((0, superstruct_1.union)([utils_1.CaipNamespaceStruct, utils_1.CaipChainIdStruct]))),
57
+ scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)(utils_1.CaipChainIdStruct)),
58
58
  /**
59
59
  * Account options.
60
60
  */
@@ -1 +1 @@
1
- {"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;AAAA,2DAAkE;AAElE,uDAO+B;AAC/B,2CAIyB;AAEzB;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACU,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC;;OAEG;IACH,EAAE,EAAE,+BAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,GAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,CAAC,2BAAmB,EAAE,yBAAiB,CAAC,CAAC,CAAC,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,oBAAM,GAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n nonempty,\n array,\n enums,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport {\n CaipChainIdStruct,\n CaipNamespaceStruct,\n JsonStruct,\n} from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).\n */\n scopes: nonempty(array(union([CaipNamespaceStruct, CaipChainIdStruct]))),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
1
+ {"version":3,"file":"account.cjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":";;;AAAA,2DAAkE;AAElE,uDAA+E;AAC/E,2CAAgE;AAEhE;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED;;GAEG;AACH,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACU,QAAA,oBAAoB,GAAG,IAAA,sBAAM,EAAC;IACzC;;OAEG;IACH,EAAE,EAAE,+BAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,IAAA,mBAAK,EAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,GAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,yBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,oBAAM,GAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, record, string } from '@metamask/superstruct';\nimport { CaipChainIdStruct, JsonStruct } from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
@@ -34,7 +34,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
34
34
  id: string;
35
35
  options: Record<string, import("@metamask/utils").Json>;
36
36
  address: string;
37
- scopes: string[];
37
+ scopes: `${string}:${string}`[];
38
38
  methods: string[];
39
39
  }, {
40
40
  /**
@@ -57,7 +57,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
57
57
  /**
58
58
  * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).
59
59
  */
60
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
60
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
61
61
  /**
62
62
  * Account options.
63
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.cts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAenD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"account.d.cts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -34,7 +34,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
34
34
  id: string;
35
35
  options: Record<string, import("@metamask/utils").Json>;
36
36
  address: string;
37
- scopes: string[];
37
+ scopes: `${string}:${string}`[];
38
38
  methods: string[];
39
39
  }, {
40
40
  /**
@@ -57,7 +57,7 @@ export declare const KeyringAccountStruct: import("@metamask/superstruct").Struc
57
57
  /**
58
58
  * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).
59
59
  */
60
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
60
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
61
61
  /**
62
62
  * Account options.
63
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAenD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,oBAAY,cAAc;IACxB,GAAG,eAAe;IAClB,OAAO,mBAAmB;CAC3B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,MAAM,kBAAkB;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,WAAW,wBAAwB;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,GAAG,cAAc,CAAC,GAAG,EAAE,GACvB,GAAG,cAAc,CAAC,OAAO,EAAE,GAC3B,GAAG,cAAc,CAAC,MAAM,EAAE,GAC1B,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;IAC/B;;OAEG;;IAGH;;OAEG;;;;;;;IAQH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { AccountIdStruct, object } from "@metamask/keyring-utils";
2
- import { nonempty, array, enums, record, string, union } from "@metamask/superstruct";
3
- import { CaipChainIdStruct, CaipNamespaceStruct, JsonStruct } from "@metamask/utils";
2
+ import { nonempty, array, enums, record, string } from "@metamask/superstruct";
3
+ import { CaipChainIdStruct, JsonStruct } from "@metamask/utils";
4
4
  /**
5
5
  * Supported Ethereum account types.
6
6
  */
@@ -51,7 +51,7 @@ export const KeyringAccountStruct = object({
51
51
  /**
52
52
  * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).
53
53
  */
54
- scopes: nonempty(array(union([CaipNamespaceStruct, CaipChainIdStruct]))),
54
+ scopes: nonempty(array(CaipChainIdStruct)),
55
55
  /**
56
56
  * Account options.
57
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gCAAgC;AAElE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACN,8BAA8B;AAC/B,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACX,wBAAwB;AAEzB;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,EAAE,EAAE,eAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport {\n nonempty,\n array,\n enums,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport {\n CaipChainIdStruct,\n CaipNamespaceStruct,\n JsonStruct,\n} from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).\n */\n scopes: nonempty(array(union([CaipNamespaceStruct, CaipChainIdStruct]))),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
1
+ {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,gCAAgC;AAElE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAC/E,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,wBAAwB;AAEhE;;GAEG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,4CAA0B,CAAA;AAC5B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,0CAAwB,CAAA;AAC1B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,qDAAmC,CAAA;AACrC,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,EAAE,EAAE,eAAe;IAEnB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;QACV,GAAG,cAAc,CAAC,GAAG,EAAE;QACvB,GAAG,cAAc,CAAC,OAAO,EAAE;QAC3B,GAAG,cAAc,CAAC,MAAM,EAAE;QAC1B,GAAG,cAAc,CAAC,WAAW,EAAE;KAChC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE;IAEjB;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;IAErC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { AccountIdStruct, object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, record, string } from '@metamask/superstruct';\nimport { CaipChainIdStruct, JsonStruct } from '@metamask/utils';\n\n/**\n * Supported Ethereum account types.\n */\nexport enum EthAccountType {\n Eoa = 'eip155:eoa',\n Erc4337 = 'eip155:erc4337',\n}\n\n/**\n * Supported Bitcoin account types.\n */\nexport enum BtcAccountType {\n P2wpkh = 'bip122:p2wpkh',\n}\n\n/**\n * Supported Solana account types.\n */\nexport enum SolAccountType {\n DataAccount = 'solana:data-account',\n}\n\n/**\n * Supported account types.\n */\nexport type KeyringAccountType =\n | `${EthAccountType.Eoa}`\n | `${EthAccountType.Erc4337}`\n | `${BtcAccountType.P2wpkh}`\n | `${SolAccountType.DataAccount}`;\n\n/**\n * A struct which represents a Keyring account object. It is abstract enough to\n * be used with any blockchain. Specific blockchain account types should extend\n * this struct.\n *\n * See {@link KeyringAccount}.\n */\nexport const KeyringAccountStruct = object({\n /**\n * Account ID (UUIDv4).\n */\n id: AccountIdStruct,\n\n /**\n * Account type.\n */\n type: enums([\n `${EthAccountType.Eoa}`,\n `${EthAccountType.Erc4337}`,\n `${BtcAccountType.P2wpkh}`,\n `${SolAccountType.DataAccount}`,\n ]),\n\n /**\n * Account main address.\n */\n address: string(),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs or CAIP-2 namespaces).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account options.\n */\n options: record(string(), JsonStruct),\n\n /**\n * Account supported methods.\n */\n methods: array(string()),\n});\n\n/**\n * Keyring Account type represents an account and its properties from the\n * point of view of the keyring.\n */\nexport type KeyringAccount = Infer<typeof KeyringAccountStruct>;\n"]}
@@ -1,17 +1,16 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.BtcScopes = void 0;
4
+ exports.BtcScope = void 0;
5
5
  /**
6
6
  * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.
7
7
  */
8
- var BtcScopes;
9
- (function (BtcScopes) {
10
- BtcScopes["Namespace"] = "bip122";
11
- BtcScopes["Mainnet"] = "bip122:000000000019d6689c085ae165831e93";
12
- BtcScopes["Testnet"] = "bip122:000000000933ea01ad0ee984209779ba";
13
- BtcScopes["Testnet4"] = "bip122:00000000da84f2bafbbc53dee25a72ae";
14
- BtcScopes["Signet"] = "bip122:00000008819873e925422c1ff0f99f7c";
15
- BtcScopes["Regtest"] = "bip122:regtest";
16
- })(BtcScopes || (exports.BtcScopes = BtcScopes = {}));
8
+ var BtcScope;
9
+ (function (BtcScope) {
10
+ BtcScope["Mainnet"] = "bip122:000000000019d6689c085ae165831e93";
11
+ BtcScope["Testnet"] = "bip122:000000000933ea01ad0ee984209779ba";
12
+ BtcScope["Testnet4"] = "bip122:00000000da84f2bafbbc53dee25a72ae";
13
+ BtcScope["Signet"] = "bip122:00000008819873e925422c1ff0f99f7c";
14
+ BtcScope["Regtest"] = "bip122:regtest";
15
+ })(BtcScope || (exports.BtcScope = BtcScope = {}));
17
16
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,gEAAmD,CAAA;IACnD,gEAAmD,CAAA;IACnD,iEAAoD,CAAA;IACpD,+DAAkD,CAAA;IAClD,uCAA0B,CAAA;AAC5B,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.\n */\nexport enum BtcScopes {\n Namespace = 'bip122',\n Mainnet = 'bip122:000000000019d6689c085ae165831e93',\n Testnet = 'bip122:000000000933ea01ad0ee984209779ba',\n Testnet4 = 'bip122:00000000da84f2bafbbc53dee25a72ae',\n Signet = 'bip122:00000008819873e925422c1ff0f99f7c',\n Regtest = 'bip122:regtest',\n}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;IACnD,gEAAoD,CAAA;IACpD,8DAAkD,CAAA;IAClD,sCAA0B,CAAA;AAC5B,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.\n */\nexport enum BtcScope {\n Mainnet = 'bip122:000000000019d6689c085ae165831e93',\n Testnet = 'bip122:000000000933ea01ad0ee984209779ba',\n Testnet4 = 'bip122:00000000da84f2bafbbc53dee25a72ae',\n Signet = 'bip122:00000008819873e925422c1ff0f99f7c',\n Regtest = 'bip122:regtest',\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum BtcScopes {
5
- Namespace = "bip122",
4
+ export declare enum BtcScope {
6
5
  Mainnet = "bip122:000000000019d6689c085ae165831e93",
7
6
  Testnet = "bip122:000000000933ea01ad0ee984209779ba",
8
7
  Testnet4 = "bip122:00000000da84f2bafbbc53dee25a72ae",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;IACnD,QAAQ,4CAA4C;IACpD,MAAM,4CAA4C;IAClD,OAAO,mBAAmB;CAC3B"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;IACnD,QAAQ,4CAA4C;IACpD,MAAM,4CAA4C;IAClD,OAAO,mBAAmB;CAC3B"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum BtcScopes {
5
- Namespace = "bip122",
4
+ export declare enum BtcScope {
6
5
  Mainnet = "bip122:000000000019d6689c085ae165831e93",
7
6
  Testnet = "bip122:000000000933ea01ad0ee984209779ba",
8
7
  Testnet4 = "bip122:00000000da84f2bafbbc53dee25a72ae",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;IACnD,QAAQ,4CAA4C;IACpD,MAAM,4CAA4C;IAClD,OAAO,mBAAmB;CAC3B"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;IACnD,QAAQ,4CAA4C;IACpD,MAAM,4CAA4C;IAClD,OAAO,mBAAmB;CAC3B"}
@@ -2,13 +2,12 @@
2
2
  /**
3
3
  * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.
4
4
  */
5
- export var BtcScopes;
6
- (function (BtcScopes) {
7
- BtcScopes["Namespace"] = "bip122";
8
- BtcScopes["Mainnet"] = "bip122:000000000019d6689c085ae165831e93";
9
- BtcScopes["Testnet"] = "bip122:000000000933ea01ad0ee984209779ba";
10
- BtcScopes["Testnet4"] = "bip122:00000000da84f2bafbbc53dee25a72ae";
11
- BtcScopes["Signet"] = "bip122:00000008819873e925422c1ff0f99f7c";
12
- BtcScopes["Regtest"] = "bip122:regtest";
13
- })(BtcScopes || (BtcScopes = {}));
5
+ export var BtcScope;
6
+ (function (BtcScope) {
7
+ BtcScope["Mainnet"] = "bip122:000000000019d6689c085ae165831e93";
8
+ BtcScope["Testnet"] = "bip122:000000000933ea01ad0ee984209779ba";
9
+ BtcScope["Testnet4"] = "bip122:00000000da84f2bafbbc53dee25a72ae";
10
+ BtcScope["Signet"] = "bip122:00000008819873e925422c1ff0f99f7c";
11
+ BtcScope["Regtest"] = "bip122:regtest";
12
+ })(BtcScope || (BtcScope = {}));
14
13
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,gEAAmD,CAAA;IACnD,gEAAmD,CAAA;IACnD,iEAAoD,CAAA;IACpD,+DAAkD,CAAA;IAClD,uCAA0B,CAAA;AAC5B,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.\n */\nexport enum BtcScopes {\n Namespace = 'bip122',\n Mainnet = 'bip122:000000000019d6689c085ae165831e93',\n Testnet = 'bip122:000000000933ea01ad0ee984209779ba',\n Testnet4 = 'bip122:00000000da84f2bafbbc53dee25a72ae',\n Signet = 'bip122:00000008819873e925422c1ff0f99f7c',\n Regtest = 'bip122:regtest',\n}\n"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/btc/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;IACnD,gEAAoD,CAAA;IACpD,8DAAkD,CAAA;IAClD,sCAA0B,CAAA;AAC5B,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Bitcoin account type. See {@link KeyringAccount.scopes}.\n */\nexport enum BtcScope {\n Mainnet = 'bip122:000000000019d6689c085ae165831e93',\n Testnet = 'bip122:000000000933ea01ad0ee984209779ba',\n Testnet4 = 'bip122:00000000da84f2bafbbc53dee25a72ae',\n Signet = 'bip122:00000008819873e925422c1ff0f99f7c',\n Regtest = 'bip122:regtest',\n}\n"]}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.EthScopes = void 0;
4
+ exports.EthScope = void 0;
5
5
  /**
6
6
  * Scopes for EVM account type. See {@link KeyringAccount.scopes}.
7
7
  */
8
- var EthScopes;
9
- (function (EthScopes) {
10
- EthScopes["Namespace"] = "eip155";
11
- EthScopes["Mainnet"] = "eip155:1";
12
- EthScopes["Testnet"] = "eip155:11155111";
13
- })(EthScopes || (exports.EthScopes = EthScopes = {}));
8
+ var EthScope;
9
+ (function (EthScope) {
10
+ EthScope["Eoa"] = "eip155:0";
11
+ EthScope["Mainnet"] = "eip155:1";
12
+ EthScope["Testnet"] = "eip155:11155111";
13
+ })(EthScope || (exports.EthScope = EthScope = {}));
14
14
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,iCAAoB,CAAA;IACpB,wCAA2B,CAAA;AAC7B,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for EVM account type. See {@link KeyringAccount.scopes}.\n */\nexport enum EthScopes {\n Namespace = 'eip155',\n Mainnet = 'eip155:1',\n Testnet = 'eip155:11155111',\n}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,4BAAgB,CAAA;IAChB,gCAAoB,CAAA;IACpB,uCAA2B,CAAA;AAC7B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for EVM account type. See {@link KeyringAccount.scopes}.\n */\nexport enum EthScope {\n Eoa = 'eip155:0',\n Mainnet = 'eip155:1',\n Testnet = 'eip155:11155111',\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Scopes for EVM account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum EthScopes {
5
- Namespace = "eip155",
4
+ export declare enum EthScope {
5
+ Eoa = "eip155:0",
6
6
  Mainnet = "eip155:1",
7
7
  Testnet = "eip155:11155111"
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,OAAO,aAAa;IACpB,OAAO,oBAAoB;CAC5B"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,GAAG,aAAa;IAChB,OAAO,aAAa;IACpB,OAAO,oBAAoB;CAC5B"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Scopes for EVM account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum EthScopes {
5
- Namespace = "eip155",
4
+ export declare enum EthScope {
5
+ Eoa = "eip155:0",
6
6
  Mainnet = "eip155:1",
7
7
  Testnet = "eip155:11155111"
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,OAAO,aAAa;IACpB,OAAO,oBAAoB;CAC5B"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,GAAG,aAAa;IAChB,OAAO,aAAa;IACpB,OAAO,oBAAoB;CAC5B"}
@@ -2,10 +2,10 @@
2
2
  /**
3
3
  * Scopes for EVM account type. See {@link KeyringAccount.scopes}.
4
4
  */
5
- export var EthScopes;
6
- (function (EthScopes) {
7
- EthScopes["Namespace"] = "eip155";
8
- EthScopes["Mainnet"] = "eip155:1";
9
- EthScopes["Testnet"] = "eip155:11155111";
10
- })(EthScopes || (EthScopes = {}));
5
+ export var EthScope;
6
+ (function (EthScope) {
7
+ EthScope["Eoa"] = "eip155:0";
8
+ EthScope["Mainnet"] = "eip155:1";
9
+ EthScope["Testnet"] = "eip155:11155111";
10
+ })(EthScope || (EthScope = {}));
11
11
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,iCAAoB,CAAA;IACpB,wCAA2B,CAAA;AAC7B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for EVM account type. See {@link KeyringAccount.scopes}.\n */\nexport enum EthScopes {\n Namespace = 'eip155',\n Mainnet = 'eip155:1',\n Testnet = 'eip155:11155111',\n}\n"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/eth/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,4BAAgB,CAAA;IAChB,gCAAoB,CAAA;IACpB,uCAA2B,CAAA;AAC7B,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for EVM account type. See {@link KeyringAccount.scopes}.\n */\nexport enum EthScope {\n Eoa = 'eip155:0',\n Mainnet = 'eip155:1',\n Testnet = 'eip155:11155111',\n}\n"]}
@@ -37,9 +37,9 @@ exports.EthEoaAccountStruct = (0, keyring_utils_1.object)({
37
37
  */
38
38
  type: (0, superstruct_1.literal)(`${api_1.EthAccountType.Eoa}`),
39
39
  /**
40
- * Account scopes (must be ['eip155']).
40
+ * Account scopes (must be ['eip155:0']).
41
41
  */
42
- scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)((0, superstruct_1.literal)(_1.EthScopes.Namespace))),
42
+ scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)((0, superstruct_1.literal)(_1.EthScope.Eoa))),
43
43
  /**
44
44
  * Account supported methods.
45
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":";;;AAAA,2DAAgE;AAEhE,uDAAwE;AACxE,2CAAoD;AAEpD,kCAA8B;AAC9B,0CAA8D;AAEjD,QAAA,cAAc,GAAG,IAAA,6BAAa,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE9D,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAEY,QAAA,mBAAmB,GAAG,IAAA,sBAAM,EAAC;IACxC,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,IAAA,qBAAO,EAAC,YAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIU,QAAA,uBAAuB,GAAG,IAAA,sBAAM,EAAC;IAC5C,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,yBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, literal } from '@metamask/superstruct';\nimport { CaipChainIdStruct } from '@metamask/utils';\n\nimport { EthScopes } from '.';\nimport { EthAccountType, KeyringAccountStruct } from '../api';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account scopes (must be ['eip155']).\n */\n scopes: nonempty(array(literal(EthScopes.Namespace))),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":";;;AAAA,2DAAgE;AAEhE,uDAAwE;AACxE,2CAAoD;AAEpD,kCAA6B;AAC7B,0CAA8D;AAEjD,QAAA,cAAc,GAAG,IAAA,6BAAa,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE9D,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,6BAAa,EAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAEY,QAAA,mBAAmB,GAAG,IAAA,sBAAM,EAAC;IACxC,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,IAAA,qBAAO,EAAC,WAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIU,QAAA,uBAAuB,GAAG,IAAA,sBAAM,EAAC;IAC5C,GAAG,0BAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,yBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EACZ,IAAA,mBAAK,EAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, literal } from '@metamask/superstruct';\nimport { CaipChainIdStruct } from '@metamask/utils';\n\nimport { EthScope } from '.';\nimport { EthAccountType, KeyringAccountStruct } from '../api';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account scopes (must be ['eip155:0']).\n */\n scopes: nonempty(array(literal(EthScope.Eoa))),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { Infer } from "@metamask/superstruct";
2
- import { EthScopes } from "./index.cjs";
2
+ import { EthScope } from "./index.cjs";
3
3
  export declare const EthBytesStruct: import("@metamask/superstruct").Struct<string, null>;
4
4
  export declare const EthAddressStruct: import("@metamask/superstruct").Struct<string, null>;
5
5
  export declare const EthUint256Struct: import("@metamask/superstruct").Struct<string, null>;
@@ -22,7 +22,7 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
22
22
  id: string;
23
23
  options: Record<string, import("@metamask/utils").Json>;
24
24
  address: string;
25
- scopes: EthScopes.Namespace[];
25
+ scopes: EthScope.Eoa[];
26
26
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
27
27
  }, {
28
28
  /**
@@ -34,9 +34,9 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
34
34
  */
35
35
  type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
36
36
  /**
37
- * Account scopes (must be ['eip155']).
37
+ * Account scopes (must be ['eip155:0']).
38
38
  */
39
- scopes: import("@metamask/superstruct").Struct<EthScopes.Namespace[], import("@metamask/superstruct").Struct<EthScopes.Namespace, EthScopes.Namespace>>;
39
+ scopes: import("@metamask/superstruct").Struct<EthScope.Eoa[], import("@metamask/superstruct").Struct<EthScope.Eoa, EthScope.Eoa>>;
40
40
  /**
41
41
  * Account supported methods.
42
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,SAAS,EAAE,oBAAU;AAG9B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,QAAQ,EAAE,oBAAU;AAG7B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Infer } from "@metamask/superstruct";
2
- import { EthScopes } from "./index.mjs";
2
+ import { EthScope } from "./index.mjs";
3
3
  export declare const EthBytesStruct: import("@metamask/superstruct").Struct<string, null>;
4
4
  export declare const EthAddressStruct: import("@metamask/superstruct").Struct<string, null>;
5
5
  export declare const EthUint256Struct: import("@metamask/superstruct").Struct<string, null>;
@@ -22,7 +22,7 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
22
22
  id: string;
23
23
  options: Record<string, import("@metamask/utils").Json>;
24
24
  address: string;
25
- scopes: EthScopes.Namespace[];
25
+ scopes: EthScope.Eoa[];
26
26
  methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
27
27
  }, {
28
28
  /**
@@ -34,9 +34,9 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
34
34
  */
35
35
  type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
36
36
  /**
37
- * Account scopes (must be ['eip155']).
37
+ * Account scopes (must be ['eip155:0']).
38
38
  */
39
- scopes: import("@metamask/superstruct").Struct<EthScopes.Namespace[], import("@metamask/superstruct").Struct<EthScopes.Namespace, EthScopes.Namespace>>;
39
+ scopes: import("@metamask/superstruct").Struct<EthScope.Eoa[], import("@metamask/superstruct").Struct<EthScope.Eoa, EthScope.Eoa>>;
40
40
  /**
41
41
  * Account supported methods.
42
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,SAAS,EAAE,oBAAU;AAG9B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,QAAQ,EAAE,oBAAU;AAG7B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;IAG9B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;EAWH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;IAGlC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { object, definePattern } from "@metamask/keyring-utils";
2
2
  import { nonempty, array, enums, literal } from "@metamask/superstruct";
3
3
  import { CaipChainIdStruct } from "@metamask/utils";
4
- import { EthScopes } from "./index.mjs";
4
+ import { EthScope } from "./index.mjs";
5
5
  import { EthAccountType, KeyringAccountStruct } from "../api/index.mjs";
6
6
  export const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);
7
7
  export const EthAddressStruct = definePattern('EthAddress', /^0x[0-9a-f]{40}$/iu);
@@ -34,9 +34,9 @@ export const EthEoaAccountStruct = object({
34
34
  */
35
35
  type: literal(`${EthAccountType.Eoa}`),
36
36
  /**
37
- * Account scopes (must be ['eip155']).
37
+ * Account scopes (must be ['eip155:0']).
38
38
  */
39
- scopes: nonempty(array(literal(EthScopes.Namespace))),
39
+ scopes: nonempty(array(literal(EthScope.Eoa))),
40
40
  /**
41
41
  * Account supported methods.
42
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gCAAgC;AAEhE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,8BAA8B;AACxE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB;AAEpD,OAAO,EAAE,SAAS,EAAE,oBAAU;AAC9B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,yBAAe;AAE9D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;IAC5C,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, literal } from '@metamask/superstruct';\nimport { CaipChainIdStruct } from '@metamask/utils';\n\nimport { EthScopes } from '.';\nimport { EthAccountType, KeyringAccountStruct } from '../api';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account scopes (must be ['eip155']).\n */\n scopes: nonempty(array(literal(EthScopes.Namespace))),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gCAAgC;AAEhE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,8BAA8B;AACxE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB;AAEpD,OAAO,EAAE,QAAQ,EAAE,oBAAU;AAC7B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,yBAAe;AAE9D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,oBAAoB,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,6BAA6B,CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,0BAA0B;IAC1B,2CAA8B,CAAA;IAC9B,8BAAiB,CAAA;IACjB,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,mBAAmB;IACnB,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,wDAA2C,CAAA;AAC7C,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;KAC/B,CAAC,CACH;CACF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;IAC5C,GAAG,oBAAoB,CAAC,MAAM;IAE9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IAEzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;IAE1C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE1C;;OAEG;IACH,OAAO,EAAE,KAAK,CACZ,KAAK,CAAC;QACJ,GAAG,SAAS,CAAC,YAAY,EAAE;QAC3B,GAAG,SAAS,CAAC,IAAI,EAAE;QACnB,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,eAAe,EAAE;QAC9B,GAAG,SAAS,CAAC,oBAAoB,EAAE;QACnC,GAAG,SAAS,CAAC,kBAAkB,EAAE;QACjC,GAAG,SAAS,CAAC,iBAAiB,EAAE;KACjC,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import { object, definePattern } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { nonempty, array, enums, literal } from '@metamask/superstruct';\nimport { CaipChainIdStruct } from '@metamask/utils';\n\nimport { EthScope } from '.';\nimport { EthAccountType, KeyringAccountStruct } from '../api';\n\nexport const EthBytesStruct = definePattern('EthBytes', /^0x[0-9a-f]*$/iu);\n\nexport const EthAddressStruct = definePattern(\n 'EthAddress',\n /^0x[0-9a-f]{40}$/iu,\n);\n\nexport const EthUint256Struct = definePattern(\n 'EthUint256',\n /^0x([1-9a-f][0-9a-f]*|0)$/iu,\n);\n\n/**\n * Supported Ethereum methods.\n */\nexport enum EthMethod {\n // General signing methods\n PersonalSign = 'personal_sign',\n Sign = 'eth_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n // ERC-4337 methods\n PrepareUserOperation = 'eth_prepareUserOperation',\n PatchUserOperation = 'eth_patchUserOperation',\n SignUserOperation = 'eth_signUserOperation',\n}\n\nexport const EthEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Eoa}`),\n\n /**\n * Account scopes (must be ['eip155:0']).\n */\n scopes: nonempty(array(literal(EthScope.Eoa))),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTransaction}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n ]),\n ),\n});\n\nexport type EthEoaAccount = Infer<typeof EthEoaAccountStruct>;\n\nexport const EthErc4337AccountStruct = object({\n ...KeyringAccountStruct.schema,\n\n /**\n * Account address.\n */\n address: EthAddressStruct,\n\n /**\n * Account type.\n */\n type: literal(`${EthAccountType.Erc4337}`),\n\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n\n /**\n * Account supported methods.\n */\n methods: array(\n enums([\n `${EthMethod.PersonalSign}`,\n `${EthMethod.Sign}`,\n `${EthMethod.SignTypedDataV1}`,\n `${EthMethod.SignTypedDataV3}`,\n `${EthMethod.SignTypedDataV4}`,\n `${EthMethod.PrepareUserOperation}`,\n `${EthMethod.PatchUserOperation}`,\n `${EthMethod.SignUserOperation}`,\n ]),\n ),\n});\n\nexport type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>;\n"]}
package/dist/events.d.cts CHANGED
@@ -20,7 +20,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
20
20
  id: string;
21
21
  options: Record<string, import("@metamask/utils").Json>;
22
22
  address: string;
23
- scopes: string[];
23
+ scopes: `${string}:${string}`[];
24
24
  methods: string[];
25
25
  };
26
26
  accountNameSuggestion?: string;
@@ -34,7 +34,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
34
34
  id: string;
35
35
  options: Record<string, import("@metamask/utils").Json>;
36
36
  address: string;
37
- scopes: string[];
37
+ scopes: `${string}:${string}`[];
38
38
  methods: string[];
39
39
  };
40
40
  accountNameSuggestion?: string;
@@ -48,7 +48,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
48
48
  id: string;
49
49
  options: Record<string, import("@metamask/utils").Json>;
50
50
  address: string;
51
- scopes: string[];
51
+ scopes: `${string}:${string}`[];
52
52
  methods: string[];
53
53
  }, {
54
54
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -59,7 +59,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
59
59
  "solana:data-account": "solana:data-account";
60
60
  }>;
61
61
  address: import("@metamask/superstruct").Struct<string, null>;
62
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
62
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
63
63
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
64
64
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
65
65
  }>;
@@ -86,7 +86,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
86
86
  id: string;
87
87
  options: Record<string, import("@metamask/utils").Json>;
88
88
  address: string;
89
- scopes: string[];
89
+ scopes: `${string}:${string}`[];
90
90
  methods: string[];
91
91
  };
92
92
  };
@@ -98,7 +98,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
98
98
  id: string;
99
99
  options: Record<string, import("@metamask/utils").Json>;
100
100
  address: string;
101
- scopes: string[];
101
+ scopes: `${string}:${string}`[];
102
102
  methods: string[];
103
103
  };
104
104
  }, {
@@ -110,7 +110,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
110
110
  id: string;
111
111
  options: Record<string, import("@metamask/utils").Json>;
112
112
  address: string;
113
- scopes: string[];
113
+ scopes: `${string}:${string}`[];
114
114
  methods: string[];
115
115
  }, {
116
116
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -121,7 +121,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
121
121
  "solana:data-account": "solana:data-account";
122
122
  }>;
123
123
  address: import("@metamask/superstruct").Struct<string, null>;
124
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
124
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
125
125
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
126
126
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
127
127
  }>;
package/dist/events.d.mts CHANGED
@@ -20,7 +20,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
20
20
  id: string;
21
21
  options: Record<string, import("@metamask/utils").Json>;
22
22
  address: string;
23
- scopes: string[];
23
+ scopes: `${string}:${string}`[];
24
24
  methods: string[];
25
25
  };
26
26
  accountNameSuggestion?: string;
@@ -34,7 +34,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
34
34
  id: string;
35
35
  options: Record<string, import("@metamask/utils").Json>;
36
36
  address: string;
37
- scopes: string[];
37
+ scopes: `${string}:${string}`[];
38
38
  methods: string[];
39
39
  };
40
40
  accountNameSuggestion?: string;
@@ -48,7 +48,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
48
48
  id: string;
49
49
  options: Record<string, import("@metamask/utils").Json>;
50
50
  address: string;
51
- scopes: string[];
51
+ scopes: `${string}:${string}`[];
52
52
  methods: string[];
53
53
  }, {
54
54
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -59,7 +59,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
59
59
  "solana:data-account": "solana:data-account";
60
60
  }>;
61
61
  address: import("@metamask/superstruct").Struct<string, null>;
62
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
62
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
63
63
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
64
64
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
65
65
  }>;
@@ -86,7 +86,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
86
86
  id: string;
87
87
  options: Record<string, import("@metamask/utils").Json>;
88
88
  address: string;
89
- scopes: string[];
89
+ scopes: `${string}:${string}`[];
90
90
  methods: string[];
91
91
  };
92
92
  };
@@ -98,7 +98,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
98
98
  id: string;
99
99
  options: Record<string, import("@metamask/utils").Json>;
100
100
  address: string;
101
- scopes: string[];
101
+ scopes: `${string}:${string}`[];
102
102
  methods: string[];
103
103
  };
104
104
  }, {
@@ -110,7 +110,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
110
110
  id: string;
111
111
  options: Record<string, import("@metamask/utils").Json>;
112
112
  address: string;
113
- scopes: string[];
113
+ scopes: `${string}:${string}`[];
114
114
  methods: string[];
115
115
  }, {
116
116
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -121,7 +121,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
121
121
  "solana:data-account": "solana:data-account";
122
122
  }>;
123
123
  address: import("@metamask/superstruct").Struct<string, null>;
124
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
124
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
125
125
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
126
126
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
127
127
  }>;
package/dist/rpc.d.cts CHANGED
@@ -41,14 +41,14 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
41
41
  id: string;
42
42
  options: Record<string, import("@metamask/utils").Json>;
43
43
  address: string;
44
- scopes: string[];
44
+ scopes: `${string}:${string}`[];
45
45
  methods: string[];
46
46
  }[], import("@metamask/superstruct").Struct<{
47
47
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
48
48
  id: string;
49
49
  options: Record<string, import("@metamask/utils").Json>;
50
50
  address: string;
51
- scopes: string[];
51
+ scopes: `${string}:${string}`[];
52
52
  methods: string[];
53
53
  }, {
54
54
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -59,7 +59,7 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
59
59
  "solana:data-account": "solana:data-account";
60
60
  }>;
61
61
  address: import("@metamask/superstruct").Struct<string, null>;
62
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
62
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
63
63
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
64
64
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
65
65
  }>>;
@@ -87,7 +87,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
87
87
  id: string;
88
88
  options: Record<string, import("@metamask/utils").Json>;
89
89
  address: string;
90
- scopes: string[];
90
+ scopes: `${string}:${string}`[];
91
91
  methods: string[];
92
92
  }, {
93
93
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -98,7 +98,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
98
98
  "solana:data-account": "solana:data-account";
99
99
  }>;
100
100
  address: import("@metamask/superstruct").Struct<string, null>;
101
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
101
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
102
102
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
103
103
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
104
104
  }>;
@@ -126,7 +126,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
126
126
  id: string;
127
127
  options: Record<string, import("@metamask/utils").Json>;
128
128
  address: string;
129
- scopes: string[];
129
+ scopes: `${string}:${string}`[];
130
130
  methods: string[];
131
131
  }, {
132
132
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -137,7 +137,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
137
137
  "solana:data-account": "solana:data-account";
138
138
  }>;
139
139
  address: import("@metamask/superstruct").Struct<string, null>;
140
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
140
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
141
141
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
142
142
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
143
143
  }>;
@@ -538,7 +538,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
538
538
  id: string;
539
539
  options: Record<string, import("@metamask/utils").Json>;
540
540
  address: string;
541
- scopes: string[];
541
+ scopes: `${string}:${string}`[];
542
542
  methods: string[];
543
543
  };
544
544
  };
@@ -550,7 +550,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
550
550
  id: string;
551
551
  options: Record<string, import("@metamask/utils").Json>;
552
552
  address: string;
553
- scopes: string[];
553
+ scopes: `${string}:${string}`[];
554
554
  methods: string[];
555
555
  };
556
556
  }, {
@@ -559,7 +559,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
559
559
  id: string;
560
560
  options: Record<string, import("@metamask/utils").Json>;
561
561
  address: string;
562
- scopes: string[];
562
+ scopes: `${string}:${string}`[];
563
563
  methods: string[];
564
564
  }, {
565
565
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -570,7 +570,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
570
570
  "solana:data-account": "solana:data-account";
571
571
  }>;
572
572
  address: import("@metamask/superstruct").Struct<string, null>;
573
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
573
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
574
574
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
575
575
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
576
576
  }>;
package/dist/rpc.d.mts CHANGED
@@ -41,14 +41,14 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
41
41
  id: string;
42
42
  options: Record<string, import("@metamask/utils").Json>;
43
43
  address: string;
44
- scopes: string[];
44
+ scopes: `${string}:${string}`[];
45
45
  methods: string[];
46
46
  }[], import("@metamask/superstruct").Struct<{
47
47
  type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
48
48
  id: string;
49
49
  options: Record<string, import("@metamask/utils").Json>;
50
50
  address: string;
51
- scopes: string[];
51
+ scopes: `${string}:${string}`[];
52
52
  methods: string[];
53
53
  }, {
54
54
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -59,7 +59,7 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
59
59
  "solana:data-account": "solana:data-account";
60
60
  }>;
61
61
  address: import("@metamask/superstruct").Struct<string, null>;
62
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
62
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
63
63
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
64
64
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
65
65
  }>>;
@@ -87,7 +87,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
87
87
  id: string;
88
88
  options: Record<string, import("@metamask/utils").Json>;
89
89
  address: string;
90
- scopes: string[];
90
+ scopes: `${string}:${string}`[];
91
91
  methods: string[];
92
92
  }, {
93
93
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -98,7 +98,7 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
98
98
  "solana:data-account": "solana:data-account";
99
99
  }>;
100
100
  address: import("@metamask/superstruct").Struct<string, null>;
101
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
101
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
102
102
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
103
103
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
104
104
  }>;
@@ -126,7 +126,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
126
126
  id: string;
127
127
  options: Record<string, import("@metamask/utils").Json>;
128
128
  address: string;
129
- scopes: string[];
129
+ scopes: `${string}:${string}`[];
130
130
  methods: string[];
131
131
  }, {
132
132
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -137,7 +137,7 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
137
137
  "solana:data-account": "solana:data-account";
138
138
  }>;
139
139
  address: import("@metamask/superstruct").Struct<string, null>;
140
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
140
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
141
141
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
142
142
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
143
143
  }>;
@@ -538,7 +538,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
538
538
  id: string;
539
539
  options: Record<string, import("@metamask/utils").Json>;
540
540
  address: string;
541
- scopes: string[];
541
+ scopes: `${string}:${string}`[];
542
542
  methods: string[];
543
543
  };
544
544
  };
@@ -550,7 +550,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
550
550
  id: string;
551
551
  options: Record<string, import("@metamask/utils").Json>;
552
552
  address: string;
553
- scopes: string[];
553
+ scopes: `${string}:${string}`[];
554
554
  methods: string[];
555
555
  };
556
556
  }, {
@@ -559,7 +559,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
559
559
  id: string;
560
560
  options: Record<string, import("@metamask/utils").Json>;
561
561
  address: string;
562
- scopes: string[];
562
+ scopes: `${string}:${string}`[];
563
563
  methods: string[];
564
564
  }, {
565
565
  id: import("@metamask/superstruct").Struct<string, null>;
@@ -570,7 +570,7 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
570
570
  "solana:data-account": "solana:data-account";
571
571
  }>;
572
572
  address: import("@metamask/superstruct").Struct<string, null>;
573
- scopes: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
573
+ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>;
574
574
  options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
575
575
  methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
576
576
  }>;
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SolScopes = void 0;
4
+ exports.SolScope = void 0;
5
5
  /**
6
6
  * Scopes for Solana account type. See {@link KeyringAccount.scopes}.
7
7
  */
8
- var SolScopes;
9
- (function (SolScopes) {
10
- SolScopes["Namespace"] = "solana";
11
- SolScopes["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
12
- SolScopes["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
13
- SolScopes["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
14
- })(SolScopes || (exports.SolScopes = SolScopes = {}));
8
+ var SolScope;
9
+ (function (SolScope) {
10
+ SolScope["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
11
+ SolScope["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
12
+ SolScope["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
13
+ })(SolScope || (exports.SolScope = SolScope = {}));
15
14
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,+DAAkD,CAAA;IAClD,gEAAmD,CAAA;IACnD,gEAAmD,CAAA;AACrD,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScopes {\n Namespace = 'solana',\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B;;GAEG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,8DAAkD,CAAA;IAClD,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;AACrD,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScope {\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Scopes for Solana account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum SolScopes {
5
- Namespace = "solana",
4
+ export declare enum SolScope {
6
5
  Devnet = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
7
6
  Mainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
8
7
  Testnet = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * Scopes for Solana account type. See {@link KeyringAccount.scopes}.
3
3
  */
4
- export declare enum SolScopes {
5
- Namespace = "solana",
4
+ export declare enum SolScope {
6
5
  Devnet = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
7
6
  Mainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
8
7
  Testnet = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS;IACnB,SAAS,WAAW;IACpB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ;IAClB,MAAM,4CAA4C;IAClD,OAAO,4CAA4C;IACnD,OAAO,4CAA4C;CACpD"}
@@ -2,11 +2,10 @@
2
2
  /**
3
3
  * Scopes for Solana account type. See {@link KeyringAccount.scopes}.
4
4
  */
5
- export var SolScopes;
6
- (function (SolScopes) {
7
- SolScopes["Namespace"] = "solana";
8
- SolScopes["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
9
- SolScopes["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
10
- SolScopes["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
11
- })(SolScopes || (SolScopes = {}));
5
+ export var SolScope;
6
+ (function (SolScope) {
7
+ SolScope["Devnet"] = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
8
+ SolScope["Mainnet"] = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
9
+ SolScope["Testnet"] = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
10
+ })(SolScope || (SolScope = {}));
12
11
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,iCAAoB,CAAA;IACpB,+DAAkD,CAAA;IAClD,gEAAmD,CAAA;IACnD,gEAAmD,CAAA;AACrD,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScopes {\n Namespace = 'solana',\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sol/constants.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B;;GAEG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,8DAAkD,CAAA;IAClD,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;AACrD,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB","sourcesContent":["/* istanbul ignore file */\n\n/**\n * Scopes for Solana account type. See {@link KeyringAccount.scopes}.\n */\nexport enum SolScope {\n Devnet = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',\n Mainnet = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',\n Testnet = 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z',\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-api",
3
- "version": "15.0.0-3d5158c",
3
+ "version": "15.0.0-9c70d70",
4
4
  "description": "MetaMask Keyring API",
5
5
  "keywords": [
6
6
  "metamask",