@metamask-previews/keyring-internal-api 0.0.1-67f3b77 → 0.0.1-7befa45

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 (73) hide show
  1. package/dist/eth/EthKeyring.cjs +3 -0
  2. package/dist/eth/EthKeyring.cjs.map +1 -0
  3. package/dist/{internal/eth/EthKeyring.d.ts → eth/EthKeyring.d.cts} +4 -4
  4. package/dist/eth/EthKeyring.d.cts.map +1 -0
  5. package/dist/eth/EthKeyring.d.mts +33 -0
  6. package/dist/eth/EthKeyring.d.mts.map +1 -0
  7. package/dist/eth/EthKeyring.mjs +2 -0
  8. package/dist/eth/EthKeyring.mjs.map +1 -0
  9. package/dist/{internal/eth/EthKeyring.js → eth/index.cjs} +1 -1
  10. package/dist/eth/index.cjs.map +1 -0
  11. package/dist/eth/index.d.cts +2 -0
  12. package/dist/eth/index.d.cts.map +1 -0
  13. package/dist/eth/index.d.mts +2 -0
  14. package/dist/eth/index.d.mts.map +1 -0
  15. package/dist/eth/index.mjs +2 -0
  16. package/dist/eth/index.mjs.map +1 -0
  17. package/dist/{btc/index.js → index.cjs} +2 -2
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.cts +3 -0
  20. package/dist/index.d.cts.map +1 -0
  21. package/dist/index.d.mts +3 -0
  22. package/dist/index.d.mts.map +1 -0
  23. package/dist/index.mjs +2 -0
  24. package/dist/index.mjs.map +1 -0
  25. package/dist/{internal/types.js → types.cjs} +23 -19
  26. package/dist/types.cjs.map +1 -0
  27. package/dist/{internal/types.d.ts → types.d.cts} +131 -69
  28. package/dist/types.d.cts.map +1 -0
  29. package/dist/types.d.mts +392 -0
  30. package/dist/types.d.mts.map +1 -0
  31. package/dist/types.mjs +50 -0
  32. package/dist/types.mjs.map +1 -0
  33. package/package.json +31 -20
  34. package/dist/btc/index.d.ts +0 -1
  35. package/dist/btc/index.js.map +0 -1
  36. package/dist/btc/types.d.ts +0 -33
  37. package/dist/btc/types.js +0 -40
  38. package/dist/btc/types.js.map +0 -1
  39. package/dist/eth/erc4337/index.d.ts +0 -1
  40. package/dist/eth/erc4337/index.js +0 -18
  41. package/dist/eth/erc4337/index.js.map +0 -1
  42. package/dist/eth/erc4337/types.d.ts +0 -97
  43. package/dist/eth/erc4337/types.js +0 -61
  44. package/dist/eth/erc4337/types.js.map +0 -1
  45. package/dist/eth/index.d.ts +0 -3
  46. package/dist/eth/index.js +0 -20
  47. package/dist/eth/index.js.map +0 -1
  48. package/dist/eth/types.d.ts +0 -80
  49. package/dist/eth/types.js +0 -73
  50. package/dist/eth/types.js.map +0 -1
  51. package/dist/eth/utils.d.ts +0 -8
  52. package/dist/eth/utils.js +0 -15
  53. package/dist/eth/utils.js.map +0 -1
  54. package/dist/index.d.ts +0 -3
  55. package/dist/index.js +0 -20
  56. package/dist/index.js.map +0 -1
  57. package/dist/internal/api.d.ts +0 -415
  58. package/dist/internal/api.js +0 -138
  59. package/dist/internal/api.js.map +0 -1
  60. package/dist/internal/eth/EthKeyring.js.map +0 -1
  61. package/dist/internal/eth/index.d.ts +0 -1
  62. package/dist/internal/eth/index.js +0 -18
  63. package/dist/internal/eth/index.js.map +0 -1
  64. package/dist/internal/events.d.ts +0 -169
  65. package/dist/internal/events.js +0 -83
  66. package/dist/internal/events.js.map +0 -1
  67. package/dist/internal/index.d.ts +0 -5
  68. package/dist/internal/index.js +0 -22
  69. package/dist/internal/index.js.map +0 -1
  70. package/dist/internal/rpc.d.ts +0 -25
  71. package/dist/internal/rpc.js +0 -33
  72. package/dist/internal/rpc.js.map +0 -1
  73. package/dist/internal/types.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EthKeyring.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EthKeyring.cjs","sourceRoot":"","sources":["../../src/eth/EthKeyring.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n KeyringExecutionContext,\n EthBaseTransaction,\n EthBaseUserOperation,\n EthUserOperation,\n EthUserOperationPatch,\n} from '@metamask/keyring-api';\nimport type { Json, Keyring } from '@metamask/utils';\n\nexport type EthKeyring<State extends Json> = Keyring<State> & {\n /**\n * Convert a base transaction to a base UserOperation.\n *\n * @param address - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param context - Keyring execution context.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\n prepareUserOperation?(\n address: string,\n transactions: EthBaseTransaction[],\n context: KeyringExecutionContext,\n ): Promise<EthBaseUserOperation>;\n\n /**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param context - Keyring execution context.\n * @returns A patch to apply to the UserOperation.\n */\n patchUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<EthUserOperationPatch>;\n\n /**\n * Signs an UserOperation.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param context - Keyring execution context.\n * @returns The signature of the UserOperation.\n */\n signUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<string>;\n};\n"]}
@@ -1,7 +1,6 @@
1
- import type { KeyringExecutionContext } from '@metamask/keyring-api';
2
- import type { Json, Keyring } from '@metamask/utils';
3
- import type { EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch } from '../../eth';
4
- export declare type EthKeyring<State extends Json> = Keyring<State> & {
1
+ import type { KeyringExecutionContext, EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch } from "@metamask/keyring-api";
2
+ import type { Json, Keyring } from "@metamask/utils";
3
+ export type EthKeyring<State extends Json> = Keyring<State> & {
5
4
  /**
6
5
  * Convert a base transaction to a base UserOperation.
7
6
  *
@@ -31,3 +30,4 @@ export declare type EthKeyring<State extends Json> = Keyring<State> & {
31
30
  */
32
31
  signUserOperation?(address: string, userOp: EthUserOperation, context: KeyringExecutionContext): Promise<string>;
33
32
  };
33
+ //# sourceMappingURL=EthKeyring.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EthKeyring.d.cts","sourceRoot":"","sources":["../../src/eth/EthKeyring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACtB,8BAA8B;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB;AAErD,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG;IAC5D;;;;;;;OAOG;IACH,oBAAoB,CAAC,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,kBAAkB,EAAE,EAClC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;;;;OAQG;IACH,kBAAkB,CAAC,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { KeyringExecutionContext, EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch } from "@metamask/keyring-api";
2
+ import type { Json, Keyring } from "@metamask/utils";
3
+ export type EthKeyring<State extends Json> = Keyring<State> & {
4
+ /**
5
+ * Convert a base transaction to a base UserOperation.
6
+ *
7
+ * @param address - Address of the sender.
8
+ * @param transactions - Base transactions to include in the UserOperation.
9
+ * @param context - Keyring execution context.
10
+ * @returns A pseudo-UserOperation that can be used to construct a real.
11
+ */
12
+ prepareUserOperation?(address: string, transactions: EthBaseTransaction[], context: KeyringExecutionContext): Promise<EthBaseUserOperation>;
13
+ /**
14
+ * Patches properties of a UserOperation. Currently, only the
15
+ * `paymasterAndData` can be patched.
16
+ *
17
+ * @param address - Address of the sender.
18
+ * @param userOp - UserOperation to patch.
19
+ * @param context - Keyring execution context.
20
+ * @returns A patch to apply to the UserOperation.
21
+ */
22
+ patchUserOperation?(address: string, userOp: EthUserOperation, context: KeyringExecutionContext): Promise<EthUserOperationPatch>;
23
+ /**
24
+ * Signs an UserOperation.
25
+ *
26
+ * @param address - Address of the sender.
27
+ * @param userOp - UserOperation to sign.
28
+ * @param context - Keyring execution context.
29
+ * @returns The signature of the UserOperation.
30
+ */
31
+ signUserOperation?(address: string, userOp: EthUserOperation, context: KeyringExecutionContext): Promise<string>;
32
+ };
33
+ //# sourceMappingURL=EthKeyring.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EthKeyring.d.mts","sourceRoot":"","sources":["../../src/eth/EthKeyring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACtB,8BAA8B;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB;AAErD,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG;IAC5D;;;;;;;OAOG;IACH,oBAAoB,CAAC,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,kBAAkB,EAAE,EAClC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;;;;OAQG;IACH,kBAAkB,CAAC,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=EthKeyring.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EthKeyring.mjs","sourceRoot":"","sources":["../../src/eth/EthKeyring.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n KeyringExecutionContext,\n EthBaseTransaction,\n EthBaseUserOperation,\n EthUserOperation,\n EthUserOperationPatch,\n} from '@metamask/keyring-api';\nimport type { Json, Keyring } from '@metamask/utils';\n\nexport type EthKeyring<State extends Json> = Keyring<State> & {\n /**\n * Convert a base transaction to a base UserOperation.\n *\n * @param address - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param context - Keyring execution context.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\n prepareUserOperation?(\n address: string,\n transactions: EthBaseTransaction[],\n context: KeyringExecutionContext,\n ): Promise<EthBaseUserOperation>;\n\n /**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param context - Keyring execution context.\n * @returns A patch to apply to the UserOperation.\n */\n patchUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<EthUserOperationPatch>;\n\n /**\n * Signs an UserOperation.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param context - Keyring execution context.\n * @returns The signature of the UserOperation.\n */\n signUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<string>;\n};\n"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=EthKeyring.js.map
3
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/eth/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './EthKeyring';\n"]}
@@ -0,0 +1,2 @@
1
+ export type * from "./EthKeyring.cjs";
2
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/eth/index.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -0,0 +1,2 @@
1
+ export type * from "./EthKeyring.mjs";
2
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eth/index.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/eth/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './EthKeyring';\n"]}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- //# sourceMappingURL=index.js.map
17
+ __exportStar(require("./types.cjs"), exports);
18
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,8CAAwB","sourcesContent":["export type * from './eth';\nexport * from './types';\n"]}
@@ -0,0 +1,3 @@
1
+ export type * from "./eth/index.cjs";
2
+ export * from "./types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAA2B;AAC3B,4BAAwB"}
@@ -0,0 +1,3 @@
1
+ export type * from "./eth/index.mjs";
2
+ export * from "./types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAA2B;AAC3B,4BAAwB"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./types.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,4BAAwB","sourcesContent":["export type * from './eth';\nexport * from './types';\n"]}
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/no-redundant-type-constituents */
3
+ /* eslint-disable @typescript-eslint/no-duplicate-type-constituents */
4
+ // FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`
5
+ // and `InternalAccountTypes`.
2
6
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InternalAccountStruct = exports.InternalAccountStructs = exports.InternalBtcP2wpkhAccountStruct = exports.InternalEthErc4337AccountStruct = exports.InternalEthEoaAccountStruct = exports.InternalAccountMetadataStruct = void 0;
7
+ exports.InternalAccountStruct = exports.InternalAccountStructs = exports.InternalSolDataAccountStruct = exports.InternalBtcP2wpkhAccountStruct = exports.InternalEthErc4337AccountStruct = exports.InternalEthEoaAccountStruct = exports.InternalAccountMetadataStruct = void 0;
4
8
  const keyring_api_1 = require("@metamask/keyring-api");
5
9
  const keyring_utils_1 = require("@metamask/keyring-utils");
6
10
  const superstruct_1 = require("@metamask/superstruct");
7
- const types_1 = require("../btc/types");
8
- const types_2 = require("../eth/types");
9
11
  exports.InternalAccountMetadataStruct = (0, keyring_utils_1.object)({
10
12
  metadata: (0, keyring_utils_1.object)({
11
13
  name: (0, superstruct_1.string)(),
@@ -22,28 +24,30 @@ exports.InternalAccountMetadataStruct = (0, keyring_utils_1.object)({
22
24
  }),
23
25
  }),
24
26
  });
25
- /**
26
- * Creates an `InternalAccount` from an existing account `superstruct` object.
27
- *
28
- * @param accountStruct - An account `superstruct` object.
29
- * @returns The `InternalAccount` associated to `accountStruct`.
30
- */
31
- function asInternalAccountStruct(accountStruct) {
32
- return (0, keyring_utils_1.object)({
33
- ...accountStruct.schema,
34
- ...exports.InternalAccountMetadataStruct.schema,
35
- });
36
- }
37
- exports.InternalEthEoaAccountStruct = asInternalAccountStruct(types_2.EthEoaAccountStruct);
38
- exports.InternalEthErc4337AccountStruct = asInternalAccountStruct(types_2.EthErc4337AccountStruct);
39
- exports.InternalBtcP2wpkhAccountStruct = asInternalAccountStruct(types_1.BtcP2wpkhAccountStruct);
27
+ exports.InternalEthEoaAccountStruct = (0, keyring_utils_1.object)({
28
+ ...keyring_api_1.EthEoaAccountStruct.schema,
29
+ ...exports.InternalAccountMetadataStruct.schema,
30
+ });
31
+ exports.InternalEthErc4337AccountStruct = (0, keyring_utils_1.object)({
32
+ ...keyring_api_1.EthErc4337AccountStruct.schema,
33
+ ...exports.InternalAccountMetadataStruct.schema,
34
+ });
35
+ exports.InternalBtcP2wpkhAccountStruct = (0, keyring_utils_1.object)({
36
+ ...keyring_api_1.BtcP2wpkhAccountStruct.schema,
37
+ ...exports.InternalAccountMetadataStruct.schema,
38
+ });
39
+ exports.InternalSolDataAccountStruct = (0, keyring_utils_1.object)({
40
+ ...keyring_api_1.SolDataAccountStruct.schema,
41
+ ...exports.InternalAccountMetadataStruct.schema,
42
+ });
40
43
  exports.InternalAccountStructs = {
41
44
  [`${keyring_api_1.EthAccountType.Eoa}`]: exports.InternalEthEoaAccountStruct,
42
45
  [`${keyring_api_1.EthAccountType.Erc4337}`]: exports.InternalEthErc4337AccountStruct,
43
46
  [`${keyring_api_1.BtcAccountType.P2wpkh}`]: exports.InternalBtcP2wpkhAccountStruct,
47
+ [`${keyring_api_1.SolAccountType.DataAccount}`]: exports.InternalSolDataAccountStruct,
44
48
  };
45
49
  exports.InternalAccountStruct = (0, keyring_utils_1.object)({
46
50
  ...keyring_api_1.KeyringAccountStruct.schema,
47
51
  ...exports.InternalAccountMetadataStruct.schema,
48
52
  });
49
- //# sourceMappingURL=types.js.map
53
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4FAA4F;AAC5F,8BAA8B;;;AAE9B,uDAS+B;AAC/B,2DAAgE;AAEhE,uDAAgE;AAOnD,QAAA,6BAA6B,GAAG,IAAA,sBAAM,EAAC;IAClD,QAAQ,EAAE,IAAA,sBAAM,EAAC;QACf,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd,iBAAiB,EAAE,IAAA,6BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QAC1C,IAAI,EAAE,IAAA,6BAAa,EACjB,IAAA,sBAAM,EAAC;YACL,EAAE,EAAE,IAAA,oBAAM,GAAE;YACZ,OAAO,EAAE,IAAA,qBAAO,GAAE;YAClB,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC,CACH;QACD,YAAY,EAAE,IAAA,6BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QACrC,UAAU,EAAE,IAAA,oBAAM,GAAE;QACpB,OAAO,EAAE,IAAA,sBAAM,EAAC;YACd,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,IAAA,sBAAM,EAAC;IAChD,GAAG,iCAAmB,CAAC,MAAM;IAC7B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,IAAA,sBAAM,EAAC;IACpD,GAAG,qCAAuB,CAAC,MAAM;IACjC,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,IAAA,sBAAM,EAAC;IACnD,GAAG,oCAAsB,CAAC,MAAM;IAChC,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,IAAA,sBAAM,EAAC;IACjD,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC;AAcU,QAAA,sBAAsB,GAM/B;IACF,CAAC,GAAG,4BAAc,CAAC,GAAG,EAAE,CAAC,EAAE,mCAA2B;IACtD,CAAC,GAAG,4BAAc,CAAC,OAAO,EAAE,CAAC,EAAE,uCAA+B;IAC9D,CAAC,GAAG,4BAAc,CAAC,MAAM,EAAE,CAAC,EAAE,sCAA8B;IAC5D,CAAC,GAAG,4BAAc,CAAC,WAAW,EAAE,CAAC,EAAE,oCAA4B;CAChE,CAAC;AAQW,QAAA,qBAAqB,GAAG,IAAA,sBAAM,EAAC;IAC1C,GAAG,kCAAoB,CAAC,MAAM;IAC9B,GAAG,qCAA6B,CAAC,MAAM;CACxC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */\n// FIXME: Those rules seem to be triggering a false positive on the `InternalAccountStructs`\n// and `InternalAccountTypes`.\n\nimport {\n BtcAccountType,\n EthAccountType,\n KeyringAccountStruct,\n SolAccountType,\n BtcP2wpkhAccountStruct,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { exactOptional, object } from '@metamask/keyring-utils';\nimport type { Infer, Struct } from '@metamask/superstruct';\nimport { boolean, string, number } from '@metamask/superstruct';\n\nexport type InternalAccountType =\n | EthAccountType\n | BtcAccountType\n | SolAccountType;\n\nexport const InternalAccountMetadataStruct = object({\n metadata: object({\n name: string(),\n nameLastUpdatedAt: exactOptional(number()),\n snap: exactOptional(\n object({\n id: string(),\n enabled: boolean(),\n name: string(),\n }),\n ),\n lastSelected: exactOptional(number()),\n importTime: number(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\nexport const InternalEthEoaAccountStruct = object({\n ...EthEoaAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalEthErc4337AccountStruct = object({\n ...EthErc4337AccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalBtcP2wpkhAccountStruct = object({\n ...BtcP2wpkhAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport const InternalSolDataAccountStruct = object({\n ...SolDataAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\nexport type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;\n\nexport type InternalEthErc4337Account = Infer<\n typeof InternalEthErc4337AccountStruct\n>;\n\nexport type InternalBtcP2wpkhAccount = Infer<\n typeof InternalBtcP2wpkhAccountStruct\n>;\n\nexport type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;\n\nexport const InternalAccountStructs: Record<\n string,\n | Struct<InternalEthEoaAccount>\n | Struct<InternalEthErc4337Account>\n | Struct<InternalBtcP2wpkhAccount>\n | Struct<InternalSolDataAccount>\n> = {\n [`${EthAccountType.Eoa}`]: InternalEthEoaAccountStruct,\n [`${EthAccountType.Erc4337}`]: InternalEthErc4337AccountStruct,\n [`${BtcAccountType.P2wpkh}`]: InternalBtcP2wpkhAccountStruct,\n [`${SolAccountType.DataAccount}`]: InternalSolDataAccountStruct,\n};\n\nexport type InternalAccountTypes =\n | InternalEthEoaAccount\n | InternalEthErc4337Account\n | InternalBtcP2wpkhAccount\n | InternalSolDataAccount;\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n ...InternalAccountMetadataStruct.schema,\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
@@ -1,6 +1,6 @@
1
- import { BtcAccountType, EthAccountType } from '@metamask/keyring-api';
2
- import type { Infer, Struct } from '@metamask/superstruct';
3
- export declare type InternalAccountType = EthAccountType | BtcAccountType;
1
+ import { BtcAccountType, EthAccountType, SolAccountType } from "@metamask/keyring-api";
2
+ import type { Infer, Struct } from "@metamask/superstruct";
3
+ export type InternalAccountType = EthAccountType | BtcAccountType | SolAccountType;
4
4
  export declare const InternalAccountMetadataStruct: Struct<{
5
5
  metadata: {
6
6
  name: string;
@@ -10,8 +10,8 @@ export declare const InternalAccountMetadataStruct: Struct<{
10
10
  };
11
11
  nameLastUpdatedAt?: number;
12
12
  snap?: {
13
- id: string;
14
13
  name: string;
14
+ id: string;
15
15
  enabled: boolean;
16
16
  };
17
17
  lastSelected?: number;
@@ -25,8 +25,8 @@ export declare const InternalAccountMetadataStruct: Struct<{
25
25
  };
26
26
  nameLastUpdatedAt?: number;
27
27
  snap?: {
28
- id: string;
29
28
  name: string;
29
+ id: string;
30
30
  enabled: boolean;
31
31
  };
32
32
  lastSelected?: number;
@@ -34,8 +34,8 @@ export declare const InternalAccountMetadataStruct: Struct<{
34
34
  name: Struct<string, null>;
35
35
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
36
36
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
37
- id: string;
38
37
  name: string;
38
+ id: string;
39
39
  enabled: boolean;
40
40
  }, {
41
41
  id: Struct<string, null>;
@@ -52,11 +52,9 @@ export declare const InternalAccountMetadataStruct: Struct<{
52
52
  }>;
53
53
  }>;
54
54
  export declare const InternalEthEoaAccountStruct: Struct<{
55
+ type: "eip155:eoa";
55
56
  id: string;
56
57
  options: Record<string, import("@metamask/utils").Json>;
57
- address: string;
58
- type: "eip155:eoa";
59
- methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
60
58
  metadata: {
61
59
  name: string;
62
60
  importTime: number;
@@ -65,26 +63,15 @@ export declare const InternalEthEoaAccountStruct: Struct<{
65
63
  };
66
64
  nameLastUpdatedAt?: number;
67
65
  snap?: {
68
- id: string;
69
66
  name: string;
67
+ id: string;
70
68
  enabled: boolean;
71
69
  };
72
70
  lastSelected?: number;
73
71
  };
72
+ address: string;
73
+ methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
74
74
  }, {
75
- address: Struct<string, null>;
76
- type: Struct<"eip155:eoa", "eip155:eoa">;
77
- methods: Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
78
- personal_sign: "personal_sign";
79
- eth_sign: "eth_sign";
80
- eth_signTransaction: "eth_signTransaction";
81
- eth_signTypedData_v1: "eth_signTypedData_v1";
82
- eth_signTypedData_v3: "eth_signTypedData_v3";
83
- eth_signTypedData_v4: "eth_signTypedData_v4";
84
- }>>;
85
- id: Struct<string, null>;
86
- options: Struct<Record<string, import("@metamask/utils").Json>, null>;
87
- } & {
88
75
  metadata: Struct<{
89
76
  name: string;
90
77
  importTime: number;
@@ -93,8 +80,8 @@ export declare const InternalEthEoaAccountStruct: Struct<{
93
80
  };
94
81
  nameLastUpdatedAt?: number;
95
82
  snap?: {
96
- id: string;
97
83
  name: string;
84
+ id: string;
98
85
  enabled: boolean;
99
86
  };
100
87
  lastSelected?: number;
@@ -102,8 +89,8 @@ export declare const InternalEthEoaAccountStruct: Struct<{
102
89
  name: Struct<string, null>;
103
90
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
104
91
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
105
- id: string;
106
92
  name: string;
93
+ id: string;
107
94
  enabled: boolean;
108
95
  }, {
109
96
  id: Struct<string, null>;
@@ -118,13 +105,23 @@ export declare const InternalEthEoaAccountStruct: Struct<{
118
105
  type: Struct<string, null>;
119
106
  }>;
120
107
  }>;
108
+ address: import("@metamask/superstruct").Struct<string, null>;
109
+ type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">;
110
+ methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
111
+ personal_sign: "personal_sign";
112
+ eth_sign: "eth_sign";
113
+ eth_signTransaction: "eth_signTransaction";
114
+ eth_signTypedData_v1: "eth_signTypedData_v1";
115
+ eth_signTypedData_v3: "eth_signTypedData_v3";
116
+ eth_signTypedData_v4: "eth_signTypedData_v4";
117
+ }>>;
118
+ id: import("@metamask/superstruct").Struct<string, null>;
119
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
121
120
  }>;
122
121
  export declare const InternalEthErc4337AccountStruct: Struct<{
122
+ type: "eip155:erc4337";
123
123
  id: string;
124
124
  options: Record<string, import("@metamask/utils").Json>;
125
- address: string;
126
- type: "eip155:erc4337";
127
- methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
128
125
  metadata: {
129
126
  name: string;
130
127
  importTime: number;
@@ -133,16 +130,51 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
133
130
  };
134
131
  nameLastUpdatedAt?: number;
135
132
  snap?: {
136
- id: string;
137
133
  name: string;
134
+ id: string;
138
135
  enabled: boolean;
139
136
  };
140
137
  lastSelected?: number;
141
138
  };
139
+ address: string;
140
+ methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[];
142
141
  }, {
143
- address: Struct<string, null>;
144
- type: Struct<"eip155:erc4337", "eip155:erc4337">;
145
- methods: Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
142
+ metadata: Struct<{
143
+ name: string;
144
+ importTime: number;
145
+ keyring: {
146
+ type: string;
147
+ };
148
+ nameLastUpdatedAt?: number;
149
+ snap?: {
150
+ name: string;
151
+ id: string;
152
+ enabled: boolean;
153
+ };
154
+ lastSelected?: number;
155
+ }, {
156
+ name: Struct<string, null>;
157
+ nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
158
+ snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
159
+ name: string;
160
+ id: string;
161
+ enabled: boolean;
162
+ }, {
163
+ id: Struct<string, null>;
164
+ enabled: Struct<boolean, null>;
165
+ name: Struct<string, null>;
166
+ }>;
167
+ lastSelected: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
168
+ importTime: Struct<number, null>;
169
+ keyring: Struct<{
170
+ type: string;
171
+ }, {
172
+ type: Struct<string, null>;
173
+ }>;
174
+ }>;
175
+ address: import("@metamask/superstruct").Struct<string, null>;
176
+ type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">;
177
+ methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", {
146
178
  personal_sign: "personal_sign";
147
179
  eth_sign: "eth_sign";
148
180
  eth_signTypedData_v1: "eth_signTypedData_v1";
@@ -152,10 +184,14 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
152
184
  eth_patchUserOperation: "eth_patchUserOperation";
153
185
  eth_signUserOperation: "eth_signUserOperation";
154
186
  }>>;
155
- id: Struct<string, null>;
156
- options: Struct<Record<string, import("@metamask/utils").Json>, null>;
157
- } & {
158
- metadata: Struct<{
187
+ id: import("@metamask/superstruct").Struct<string, null>;
188
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
189
+ }>;
190
+ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
191
+ type: "bip122:p2wpkh";
192
+ id: string;
193
+ options: Record<string, import("@metamask/utils").Json>;
194
+ metadata: {
159
195
  name: string;
160
196
  importTime: number;
161
197
  keyring: {
@@ -163,8 +199,25 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
163
199
  };
164
200
  nameLastUpdatedAt?: number;
165
201
  snap?: {
202
+ name: string;
166
203
  id: string;
204
+ enabled: boolean;
205
+ };
206
+ lastSelected?: number;
207
+ };
208
+ address: string;
209
+ methods: "sendBitcoin"[];
210
+ }, {
211
+ metadata: Struct<{
212
+ name: string;
213
+ importTime: number;
214
+ keyring: {
215
+ type: string;
216
+ };
217
+ nameLastUpdatedAt?: number;
218
+ snap?: {
167
219
  name: string;
220
+ id: string;
168
221
  enabled: boolean;
169
222
  };
170
223
  lastSelected?: number;
@@ -172,8 +225,8 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
172
225
  name: Struct<string, null>;
173
226
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
174
227
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
175
- id: string;
176
228
  name: string;
229
+ id: string;
177
230
  enabled: boolean;
178
231
  }, {
179
232
  id: Struct<string, null>;
@@ -188,13 +241,18 @@ export declare const InternalEthErc4337AccountStruct: Struct<{
188
241
  type: Struct<string, null>;
189
242
  }>;
190
243
  }>;
244
+ address: import("@metamask/superstruct").Struct<string, null>;
245
+ type: import("@metamask/superstruct").Struct<"bip122:p2wpkh", "bip122:p2wpkh">;
246
+ methods: import("@metamask/superstruct").Struct<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
247
+ sendBitcoin: "sendBitcoin";
248
+ }>>;
249
+ id: import("@metamask/superstruct").Struct<string, null>;
250
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
191
251
  }>;
192
- export declare const InternalBtcP2wpkhAccountStruct: Struct<{
252
+ export declare const InternalSolDataAccountStruct: Struct<{
253
+ type: "solana:data-account";
193
254
  id: string;
194
255
  options: Record<string, import("@metamask/utils").Json>;
195
- address: string;
196
- type: "bip122:p2wpkh";
197
- methods: "btc_sendmany"[];
198
256
  metadata: {
199
257
  name: string;
200
258
  importTime: number;
@@ -203,21 +261,15 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
203
261
  };
204
262
  nameLastUpdatedAt?: number;
205
263
  snap?: {
206
- id: string;
207
264
  name: string;
265
+ id: string;
208
266
  enabled: boolean;
209
267
  };
210
268
  lastSelected?: number;
211
269
  };
270
+ address: string;
271
+ methods: "sendAndConfirmTransaction"[];
212
272
  }, {
213
- address: Struct<string, null>;
214
- type: Struct<"bip122:p2wpkh", "bip122:p2wpkh">;
215
- methods: Struct<"btc_sendmany"[], Struct<"btc_sendmany", {
216
- btc_sendmany: "btc_sendmany";
217
- }>>;
218
- id: Struct<string, null>;
219
- options: Struct<Record<string, import("@metamask/utils").Json>, null>;
220
- } & {
221
273
  metadata: Struct<{
222
274
  name: string;
223
275
  importTime: number;
@@ -226,8 +278,8 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
226
278
  };
227
279
  nameLastUpdatedAt?: number;
228
280
  snap?: {
229
- id: string;
230
281
  name: string;
282
+ id: string;
231
283
  enabled: boolean;
232
284
  };
233
285
  lastSelected?: number;
@@ -235,8 +287,8 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
235
287
  name: Struct<string, null>;
236
288
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
237
289
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
238
- id: string;
239
290
  name: string;
291
+ id: string;
240
292
  enabled: boolean;
241
293
  }, {
242
294
  id: Struct<string, null>;
@@ -251,18 +303,24 @@ export declare const InternalBtcP2wpkhAccountStruct: Struct<{
251
303
  type: Struct<string, null>;
252
304
  }>;
253
305
  }>;
306
+ address: import("@metamask/superstruct").Struct<string, null>;
307
+ type: import("@metamask/superstruct").Struct<"solana:data-account", "solana:data-account">;
308
+ methods: import("@metamask/superstruct").Struct<"sendAndConfirmTransaction"[], import("@metamask/superstruct").Struct<"sendAndConfirmTransaction", {
309
+ sendAndConfirmTransaction: "sendAndConfirmTransaction";
310
+ }>>;
311
+ id: import("@metamask/superstruct").Struct<string, null>;
312
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
254
313
  }>;
255
- export declare type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
256
- export declare type InternalEthErc4337Account = Infer<typeof InternalEthErc4337AccountStruct>;
257
- export declare type InternalBtcP2wpkhAccount = Infer<typeof InternalBtcP2wpkhAccountStruct>;
258
- export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2wpkhAccount>>;
259
- export declare type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2wpkhAccount;
314
+ export type InternalEthEoaAccount = Infer<typeof InternalEthEoaAccountStruct>;
315
+ export type InternalEthErc4337Account = Infer<typeof InternalEthErc4337AccountStruct>;
316
+ export type InternalBtcP2wpkhAccount = Infer<typeof InternalBtcP2wpkhAccountStruct>;
317
+ export type InternalSolDataAccount = Infer<typeof InternalSolDataAccountStruct>;
318
+ export declare const InternalAccountStructs: Record<string, Struct<InternalEthEoaAccount> | Struct<InternalEthErc4337Account> | Struct<InternalBtcP2wpkhAccount> | Struct<InternalSolDataAccount>>;
319
+ export type InternalAccountTypes = InternalEthEoaAccount | InternalEthErc4337Account | InternalBtcP2wpkhAccount | InternalSolDataAccount;
260
320
  export declare const InternalAccountStruct: Struct<{
321
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
261
322
  id: string;
262
323
  options: Record<string, import("@metamask/utils").Json>;
263
- address: string;
264
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
265
- methods: string[];
266
324
  metadata: {
267
325
  name: string;
268
326
  importTime: number;
@@ -271,12 +329,14 @@ export declare const InternalAccountStruct: Struct<{
271
329
  };
272
330
  nameLastUpdatedAt?: number;
273
331
  snap?: {
274
- id: string;
275
332
  name: string;
333
+ id: string;
276
334
  enabled: boolean;
277
335
  };
278
336
  lastSelected?: number;
279
337
  };
338
+ address: string;
339
+ methods: string[];
280
340
  }, {
281
341
  metadata: Struct<{
282
342
  name: string;
@@ -286,8 +346,8 @@ export declare const InternalAccountStruct: Struct<{
286
346
  };
287
347
  nameLastUpdatedAt?: number;
288
348
  snap?: {
289
- id: string;
290
349
  name: string;
350
+ id: string;
291
351
  enabled: boolean;
292
352
  };
293
353
  lastSelected?: number;
@@ -295,8 +355,8 @@ export declare const InternalAccountStruct: Struct<{
295
355
  name: Struct<string, null>;
296
356
  nameLastUpdatedAt: Struct<number | import("@metamask/keyring-utils").ExactOptionalTag, null>;
297
357
  snap: Struct<import("@metamask/keyring-utils").ExactOptionalTag | {
298
- id: string;
299
358
  name: string;
359
+ id: string;
300
360
  enabled: boolean;
301
361
  }, {
302
362
  id: Struct<string, null>;
@@ -311,15 +371,16 @@ export declare const InternalAccountStruct: Struct<{
311
371
  type: Struct<string, null>;
312
372
  }>;
313
373
  }>;
314
- id: Struct<string, null>;
315
- type: Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
374
+ id: import("@metamask/superstruct").Struct<string, null>;
375
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
316
376
  "eip155:eoa": "eip155:eoa";
317
377
  "eip155:erc4337": "eip155:erc4337";
318
378
  "bip122:p2wpkh": "bip122:p2wpkh";
379
+ "solana:data-account": "solana:data-account";
319
380
  }>;
320
- address: Struct<string, null>;
321
- options: Struct<Record<string, import("@metamask/utils").Json>, null>;
322
- methods: Struct<string[], Struct<string, null>>;
381
+ address: import("@metamask/superstruct").Struct<string, null>;
382
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
383
+ methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
323
384
  }>;
324
385
  /**
325
386
  * Internal account representation.
@@ -327,4 +388,5 @@ export declare const InternalAccountStruct: Struct<{
327
388
  * This type is used internally by MetaMask to add additional metadata to the
328
389
  * account object. It's should not be used by external applications.
329
390
  */
330
- export declare type InternalAccount = Infer<typeof InternalAccountStruct>;
391
+ export type InternalAccount = Infer<typeof InternalAccountStruct>;
392
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EACd,cAAc,EAEd,cAAc,EAKf,8BAA8B;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAG3D,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBxC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE9E,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAC1C,OAAO,8BAA8B,CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEhF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,MAAM,EACJ,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,yBAAyB,CAAC,GACjC,MAAM,CAAC,wBAAwB,CAAC,GAChC,MAAM,CAAC,sBAAsB,CAAC,CAMjC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,GACxB,sBAAsB,CAAC;AAE3B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}