@metamask/keyring-sdk 2.1.1 → 2.2.0

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 (40) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/dist/eth/eth-4337-keyring.cjs +3 -0
  3. package/dist/eth/eth-4337-keyring.cjs.map +1 -0
  4. package/dist/eth/eth-4337-keyring.d.cts +35 -0
  5. package/dist/eth/eth-4337-keyring.d.cts.map +1 -0
  6. package/dist/eth/eth-4337-keyring.d.mts +35 -0
  7. package/dist/eth/eth-4337-keyring.d.mts.map +1 -0
  8. package/dist/eth/eth-4337-keyring.mjs +2 -0
  9. package/dist/eth/eth-4337-keyring.mjs.map +1 -0
  10. package/dist/eth/index.cjs.map +1 -1
  11. package/dist/eth/index.d.cts +1 -0
  12. package/dist/eth/index.d.cts.map +1 -1
  13. package/dist/eth/index.d.mts +1 -0
  14. package/dist/eth/index.d.mts.map +1 -1
  15. package/dist/eth/index.mjs.map +1 -1
  16. package/dist/v2/eth/eth-keyring-v1-adapter.cjs +320 -0
  17. package/dist/v2/eth/eth-keyring-v1-adapter.cjs.map +1 -0
  18. package/dist/v2/eth/eth-keyring-v1-adapter.d.cts +156 -0
  19. package/dist/v2/eth/eth-keyring-v1-adapter.d.cts.map +1 -0
  20. package/dist/v2/eth/eth-keyring-v1-adapter.d.mts +156 -0
  21. package/dist/v2/eth/eth-keyring-v1-adapter.d.mts.map +1 -0
  22. package/dist/v2/eth/eth-keyring-v1-adapter.mjs +314 -0
  23. package/dist/v2/eth/eth-keyring-v1-adapter.mjs.map +1 -0
  24. package/dist/v2/eth/index.cjs +1 -0
  25. package/dist/v2/eth/index.cjs.map +1 -1
  26. package/dist/v2/eth/index.d.cts +1 -0
  27. package/dist/v2/eth/index.d.cts.map +1 -1
  28. package/dist/v2/eth/index.d.mts +1 -0
  29. package/dist/v2/eth/index.d.mts.map +1 -1
  30. package/dist/v2/eth/index.mjs +1 -0
  31. package/dist/v2/eth/index.mjs.map +1 -1
  32. package/dist/v2/keyring-v1-adapter.cjs +5 -19
  33. package/dist/v2/keyring-v1-adapter.cjs.map +1 -1
  34. package/dist/v2/keyring-v1-adapter.d.cts +1 -1
  35. package/dist/v2/keyring-v1-adapter.d.cts.map +1 -1
  36. package/dist/v2/keyring-v1-adapter.d.mts +1 -1
  37. package/dist/v2/keyring-v1-adapter.d.mts.map +1 -1
  38. package/dist/v2/keyring-v1-adapter.mjs +5 -19
  39. package/dist/v2/keyring-v1-adapter.mjs.map +1 -1
  40. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eth-keyring-v1-adapter.mjs","sourceRoot":"","sources":["../../../src/v2/eth/eth-keyring-v1-adapter.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB;AAEpD,OAAO,EAAE,SAAS,IAAI,YAAY,EAAE,+BAA+B;AACnE,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,2BAA2B,EAC5B,8BAA8B;AAW/B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,iCAAiC;AAElC,OAAO,EAAE,UAAU,EAAE,gCAAgC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,8BAA8B;AAErD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACd,wBAAwB;AACzB,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,aAAa;AAGlC,OAAO,EAAE,gBAAgB,EAAE,kCAA8B;AACzD,OAAO,EAAE,gBAAgB,EAAE,kCAA8B;AAEzD,MAAM,eAAe,GAAG,UAAU,CAAC;AAenC;;;;;;;;;;;;;GAaG;AACH,SAAS,MAAM,CAA2B,KAAc;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAS,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa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ACV,MAAM,EAAE,eAAe;QACvB,KAAK;QACL,OAAO,EAAE,OAAO,CAAC,EAAE;QACnB,OAAO,EAAE;YACP,MAAM;YACN,MAAM;SACP;KACF,CAAC,CAAW,CAAC;AAChB,CAAC","sourcesContent":["import type { TypedTransaction } from '@ethereumjs/tx';\nimport { TransactionFactory } from '@ethereumjs/tx';\nimport type { SignTypedDataVersion } from '@metamask/eth-sig-util';\nimport { normalize as ethNormalize } from '@metamask/eth-sig-util';\nimport {\n EthBaseUserOperationStruct,\n EthBytesStrictStruct,\n EthBytesStruct,\n EthMethod,\n EthUserOperationPatchStruct,\n} from '@metamask/keyring-api';\nimport type {\n EthBaseTransaction,\n EthBaseUserOperation,\n EthUserOperation,\n EthUserOperationPatch,\n KeyringAccount,\n KeyringExecutionContext,\n KeyringRequest,\n} from '@metamask/keyring-api';\nimport type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';\nimport {\n AccountExportType,\n PrivateKeyEncoding,\n} from '@metamask/keyring-api/v2';\nimport type { BaseKeyring, EthKeyring } from '@metamask/keyring-utils';\nimport { strictMask } from '@metamask/keyring-utils';\nimport { mask, object } from '@metamask/superstruct';\nimport type { Hex, Json } from '@metamask/utils';\nimport {\n bigIntToHex,\n KnownCaipNamespace,\n remove0x,\n toCaipChainId,\n} from '@metamask/utils';\nimport { v4 as uuid } from 'uuid';\n\nimport type { Eth4337Keyring } from '../../eth';\nimport { KeyringV1Adapter } from '../keyring-v1-adapter';\nimport { EthKeyringMethod } from './eth-keyring-wrapper';\n\nconst METAMASK_ORIGIN = 'metamask';\n\ntype RequestParams = NonNullable<KeyringRequest['request']['params']>;\n\ntype ResolvedAccount = {\n account: KeyringAccount;\n normalizedAddress: Hex;\n};\n\ntype TypedDataWithDomain = {\n domain?: {\n chainId?: string | number;\n };\n};\n\n/**\n * Convert a value to a valid JSON object.\n *\n * The function chains JSON.stringify and JSON.parse to ensure that the result\n * is a valid JSON object.\n *\n * We assume that the input value is JSON-serializable.\n *\n * However, some transformations can occur like: in objects, undefined values\n * are removed, and in arrays, they are replaced with null.\n *\n * @param value - Value to convert to JSON - Assumed to be JSON-serializable.\n * @returns JSON representation of the value.\n */\nfunction toJson<Type extends Json = Json>(value: unknown): Type {\n return JSON.parse(JSON.stringify(value)) as Type;\n}\n\n/**\n * Convert a chain ID (number or hex) to an EIP-155 CAIP chain ID string for keyring request scoping.\n *\n * @param chainId - The chain ID to convert.\n * @returns The EIP-155 CAIP chain ID string.\n */\nfunction toEip155Scope(chainId: string | number | bigint): string {\n return toCaipChainId(KnownCaipNamespace.Eip155, BigInt(chainId).toString());\n}\n\n/**\n * Legacy ETH keyring API surface exposed by {@link EthKeyringV1Adapter}.\n */\nexport type BaseEthKeyring = BaseKeyring &\n // Only pick account-related methods (signing and exporting).\n Pick<\n EthKeyring,\n | 'exportAccount'\n | 'signMessage'\n | 'signEip7702Authorization'\n | 'signPersonalMessage'\n | 'signTypedData'\n | 'signTransaction'\n > &\n Eth4337Keyring;\n\n/**\n * Error thrown when an account cannot be resolved from the requested address.\n */\nexport class EthKeyringV1AccountNotFoundError extends Error {\n readonly address: string;\n\n constructor(address: string) {\n super(`Account not found for address: ${address}`);\n this.name = 'EthKeyringV1AccountNotFoundError';\n this.address = address;\n Object.setPrototypeOf(this, EthKeyringV1AccountNotFoundError.prototype);\n }\n}\n\n/**\n * Error thrown when a resolved account does not support a requested method.\n */\nexport class EthKeyringV1MethodNotSupportedError extends Error {\n readonly address: string;\n\n readonly method: string;\n\n constructor(method: string, address: string) {\n super(`Account ${address} does not support method: ${method}`);\n this.name = 'EthKeyringV1MethodNotSupportedError';\n this.address = address;\n this.method = method;\n Object.setPrototypeOf(this, EthKeyringV1MethodNotSupportedError.prototype);\n }\n}\n\n/**\n * Adapts a `KeyringV2` instance to the subset of the legacy ETH keyring API\n * used by existing ETH export and signing flows.\n *\n * The adapter is account-agnostic: each method resolves the requested address\n * against the wrapped v2 keyring's accounts, verifies that the resolved account\n * supports the requested method, then forwards the request through the v2\n * `submitRequest` or `exportAccount` APIs.\n */\nexport class EthKeyringV1Adapter<InnerKeyring extends KeyringV2 = KeyringV2>\n extends KeyringV1Adapter<InnerKeyring>\n implements BaseEthKeyring\n{\n /**\n * Gets the private data associated with the given address so\n * that it may be exported.\n *\n * Used by the UI to export an account.\n *\n * @param address - Address of the account to export.\n * @returns A promise that resolves to the exported private key.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n */\n async exportAccount(address: Hex): Promise<string> {\n const { account } = await this.#getAccount(address);\n\n if (!this.inner.exportAccount) {\n throw new Error('Keyring does not support exportAccount');\n }\n\n const exportedAccount = await this.inner.exportAccount(account.id, {\n type: AccountExportType.PrivateKey,\n encoding: PrivateKeyEncoding.Hexadecimal,\n });\n\n return remove0x(exportedAccount.privateKey);\n }\n\n /**\n * Sign a transaction.\n *\n * @param address - Sender's address.\n * @param transaction - Transaction.\n * @returns A promise that resolves to the signed transaction.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support transaction signing.\n */\n async signTransaction(\n address: Hex,\n transaction: TypedTransaction,\n ): Promise<TypedTransaction> {\n const { account, normalizedAddress } = await this.#getAccountForMethod(\n address,\n EthMethod.SignTransaction,\n );\n\n const chainId = transaction.common.chainId();\n const tx = toJson({\n ...transaction.toJSON(),\n from: normalizedAddress,\n type: `0x${transaction.type.toString(16)}`,\n chainId: bigIntToHex(chainId),\n });\n\n const signedTx = await this.#submitRequest(\n account,\n EthMethod.SignTransaction,\n toJson<Json[]>([tx]),\n toEip155Scope(chainId),\n );\n\n // Only take the signature fields from the keyring response. This prevents\n // the keyring from overwriting the transaction payload we submitted.\n const signature = mask(\n signedTx,\n object({\n r: EthBytesStrictStruct,\n s: EthBytesStrictStruct,\n v: EthBytesStrictStruct,\n }),\n );\n\n return TransactionFactory.fromTxData({\n ...(tx as Record<string, Json>),\n r: signature.r,\n s: signature.s,\n v: signature.v,\n });\n }\n\n /**\n * Sign a message.\n *\n * @param address - Signer's address.\n * @param data - Data to sign.\n * @returns A promise that resolves to the signature.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support message signing.\n */\n async signMessage(address: Hex, data: string): Promise<string> {\n const { account, normalizedAddress } = await this.#getAccountForMethod(\n address,\n EthMethod.Sign,\n );\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthMethod.Sign,\n toJson<Json[]>([normalizedAddress, data]),\n '',\n ),\n EthBytesStruct,\n );\n }\n\n /**\n * Sign an EIP-7702 authorization.\n *\n * @param address - Signer's address.\n * @param authorization - Authorization tuple to sign.\n * @returns A promise that resolves to the signature.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support EIP-7702 authorization signing.\n */\n async signEip7702Authorization(\n address: Hex,\n authorization: [chainId: number, contractAddress: Hex, nonce: number],\n ): Promise<string> {\n const { account } = await this.#getAccountForMethod(\n address,\n EthKeyringMethod.SignEip7702Authorization,\n );\n\n const [chainId] = authorization;\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthKeyringMethod.SignEip7702Authorization,\n [authorization],\n toEip155Scope(chainId),\n ),\n EthBytesStruct,\n );\n }\n\n /**\n * Sign a personal message.\n *\n * Note: KeyringController says this should return a Buffer but it actually\n * expects a string.\n *\n * @param address - Signer's address.\n * @param message - Data to sign.\n * @returns A promise that resolves to the signature.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support personal message signing.\n */\n async signPersonalMessage(address: Hex, message: Hex): Promise<string> {\n const { account, normalizedAddress } = await this.#getAccountForMethod(\n address,\n EthMethod.PersonalSign,\n );\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthMethod.PersonalSign,\n toJson<Json[]>([message, normalizedAddress]),\n '',\n ),\n EthBytesStruct,\n );\n }\n\n /**\n * Sign a typed data message.\n *\n * @param address - Signer's address.\n * @param typedData - Typed data to sign.\n * @param options - Signing options.\n * @param options.version - The typed data version to use.\n * @returns A promise that resolves to the signature.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support the requested typed data signing method.\n */\n async signTypedData(\n address: Hex,\n typedData: unknown[] | Record<string, unknown>,\n options?: Record<string, unknown>,\n ): Promise<string> {\n const version = options?.version as SignTypedDataVersion | undefined;\n const method = this.#getSignTypedDataMethod(version);\n const { account, normalizedAddress } = await this.#getAccountForMethod(\n address,\n method,\n );\n\n // Extract chain ID as if it was a typed message (as defined by EIP-712), if\n // input is not a typed message, then chain ID will be undefined!\n const chainId = (typedData as TypedDataWithDomain).domain?.chainId;\n\n return strictMask(\n await this.#submitRequest(\n account,\n method,\n toJson<Json[]>([normalizedAddress, typedData]),\n chainId === undefined ? '' : toEip155Scope(chainId),\n ),\n EthBytesStruct,\n );\n }\n\n /**\n * Convert base transactions 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 one.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support UserOperation preparation.\n */\n async prepareUserOperation(\n address: string,\n transactions: EthBaseTransaction[],\n context: KeyringExecutionContext,\n ): Promise<EthBaseUserOperation> {\n const { account } = await this.#getAccountForMethod(\n address,\n EthMethod.PrepareUserOperation,\n );\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthMethod.PrepareUserOperation,\n // NOTE: This is inconsistent with the other methods. We are not wrapping `transactions` in an array.\n // Which means the receiver of the `submitRequest` call would see individual transactions spread as\n // separate params rather than a single transactions array as the first param, which doesn't match\n // the method signature of `prepareUserOperation(address, transactions, context)`.\n // This was already implemented like this in the legacy Snap keyring, so we keep the same logic here\n // too!\n toJson<Json[]>(transactions),\n toEip155Scope(context.chainId),\n ),\n EthBaseUserOperationStruct,\n );\n }\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 userOperation - UserOperation to patch.\n * @param context - Keyring execution context.\n * @returns A patch to apply to the UserOperation.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support UserOperation patching.\n */\n async patchUserOperation(\n address: string,\n userOperation: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<EthUserOperationPatch> {\n const { account } = await this.#getAccountForMethod(\n address,\n EthMethod.PatchUserOperation,\n );\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthMethod.PatchUserOperation,\n toJson<Json[]>([userOperation]),\n toEip155Scope(context.chainId),\n ),\n EthUserOperationPatchStruct,\n );\n }\n\n /**\n * Signs a UserOperation.\n *\n * @param address - Address of the sender.\n * @param userOperation - UserOperation to sign.\n * @param context - Keyring execution context.\n * @returns The signature of the UserOperation.\n * @throws {@link EthKeyringV1AccountNotFoundError} if no account matches the\n * address.\n * @throws {@link EthKeyringV1MethodNotSupportedError} if the account does\n * not support UserOperation signing.\n */\n async signUserOperation(\n address: string,\n userOperation: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<string> {\n const { account } = await this.#getAccountForMethod(\n address,\n EthMethod.SignUserOperation,\n );\n\n return strictMask(\n await this.#submitRequest(\n account,\n EthMethod.SignUserOperation,\n toJson<Json[]>([userOperation]),\n toEip155Scope(context.chainId),\n ),\n EthBytesStruct,\n );\n }\n\n async #getAccount(address: string): Promise<ResolvedAccount> {\n const normalizedAddress = ethNormalize(address);\n const normalizedAddressLowerCase = normalizedAddress?.toLowerCase();\n\n if (!normalizedAddress || !normalizedAddressLowerCase) {\n throw new EthKeyringV1AccountNotFoundError(address);\n }\n\n const accounts = await this.inner.getAccounts();\n const account = accounts.find((keyringAccount) => {\n const accountAddress = ethNormalize(keyringAccount.address);\n return accountAddress?.toLowerCase() === normalizedAddressLowerCase;\n });\n\n if (!account) {\n throw new EthKeyringV1AccountNotFoundError(address);\n }\n\n return {\n account,\n normalizedAddress: normalizedAddress as Hex,\n };\n }\n\n async #getAccountForMethod(\n address: string,\n method: string,\n ): Promise<ResolvedAccount> {\n const resolvedAccount = await this.#getAccount(address);\n\n if (!resolvedAccount.account.methods.includes(method)) {\n throw new EthKeyringV1MethodNotSupportedError(method, address);\n }\n\n return resolvedAccount;\n }\n\n #getSignTypedDataMethod(\n version: SignTypedDataVersion | undefined,\n ): EthMethod {\n switch (version) {\n case 'V3':\n return EthMethod.SignTypedDataV3;\n case 'V4':\n return EthMethod.SignTypedDataV4;\n case 'V1':\n default:\n // Use 'V1' by default to match other keyring implementations. V1 will be\n // used if the version is not specified or not supported.\n return EthMethod.SignTypedDataV1;\n }\n }\n\n async #submitRequest<Result extends Json = Json>(\n account: KeyringAccount,\n method: string,\n params: RequestParams,\n scope: string,\n ): Promise<Result> {\n return (await this.inner.submitRequest({\n id: uuid(),\n origin: METAMASK_ORIGIN,\n scope,\n account: account.id,\n request: {\n method,\n params,\n },\n })) as Result;\n }\n}\n"]}
@@ -14,5 +14,6 @@ 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("./eth-keyring-v1-adapter.cjs"), exports);
17
18
  __exportStar(require("./eth-keyring-wrapper.cjs"), exports);
18
19
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAsC","sourcesContent":["export * from './eth-keyring-wrapper';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAAyC;AACzC,4DAAsC","sourcesContent":["export * from './eth-keyring-v1-adapter';\nexport * from './eth-keyring-wrapper';\n"]}
@@ -1,2 +1,3 @@
1
+ export * from "./eth-keyring-v1-adapter.cjs";
1
2
  export * from "./eth-keyring-wrapper.cjs";
2
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,0CAAsC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,0CAAsC"}
@@ -1,2 +1,3 @@
1
+ export * from "./eth-keyring-v1-adapter.mjs";
1
2
  export * from "./eth-keyring-wrapper.mjs";
2
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,0CAAsC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,0CAAsC"}
@@ -1,2 +1,3 @@
1
+ export * from "./eth-keyring-v1-adapter.mjs";
1
2
  export * from "./eth-keyring-wrapper.mjs";
2
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,0CAAsC","sourcesContent":["export * from './eth-keyring-wrapper';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/v2/eth/index.ts"],"names":[],"mappings":"AAAA,6CAAyC;AACzC,0CAAsC","sourcesContent":["export * from './eth-keyring-v1-adapter';\nexport * from './eth-keyring-wrapper';\n"]}
@@ -1,16 +1,4 @@
1
1
  "use strict";
2
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
- if (kind === "m") throw new TypeError("Private method is not writable");
4
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
- };
8
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
- };
13
- var _KeyringV1Adapter_inner;
14
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
3
  exports.KeyringV1Adapter = void 0;
16
4
  /**
@@ -44,8 +32,7 @@ exports.KeyringV1Adapter = void 0;
44
32
  */
45
33
  class KeyringV1Adapter {
46
34
  constructor(inner) {
47
- _KeyringV1Adapter_inner.set(this, void 0);
48
- __classPrivateFieldSet(this, _KeyringV1Adapter_inner, inner, "f");
35
+ this.inner = inner;
49
36
  this.type = inner.type;
50
37
  }
51
38
  /**
@@ -57,7 +44,7 @@ class KeyringV1Adapter {
57
44
  * @returns The inner v2 keyring instance.
58
45
  */
59
46
  unwrap() {
60
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f");
47
+ return this.inner;
61
48
  }
62
49
  /**
63
50
  * Returns the addresses of all accounts in this keyring.
@@ -68,7 +55,7 @@ class KeyringV1Adapter {
68
55
  * @returns A promise resolving to the list of account addresses.
69
56
  */
70
57
  async getAccounts() {
71
- const accounts = await __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").getAccounts();
58
+ const accounts = await this.inner.getAccounts();
72
59
  return accounts.map((account) => account.address);
73
60
  }
74
61
  /**
@@ -79,7 +66,7 @@ class KeyringV1Adapter {
79
66
  * @returns A promise resolving to the serialized state.
80
67
  */
81
68
  async serialize() {
82
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").serialize();
69
+ return this.inner.serialize();
83
70
  }
84
71
  /**
85
72
  * Restores keyring state from a serialized snapshot.
@@ -90,9 +77,8 @@ class KeyringV1Adapter {
90
77
  * @returns A promise that resolves when deserialization is complete.
91
78
  */
92
79
  async deserialize(state) {
93
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").deserialize(state);
80
+ return this.inner.deserialize(state);
94
81
  }
95
82
  }
96
83
  exports.KeyringV1Adapter = KeyringV1Adapter;
97
- _KeyringV1Adapter_inner = new WeakMap();
98
84
  //# sourceMappingURL=keyring-v1-adapter.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-v1-adapter.cjs","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,gBAAgB;IAU3B,YAAY,KAAmB;QAFtB,0CAAqB;QAG5B,uBAAA,IAAI,2BAAU,KAAK,MAAA,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM;QACJ,OAAO,uBAAA,IAAI,+BAAO,CAAC;IACrB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,uBAAA,IAAI,+BAAO,CAAC,WAAW,EAAE,CAAC;QACjD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,uBAAA,IAAI,+BAAO,CAAC,SAAS,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,KAAW;QAC3B,OAAO,uBAAA,IAAI,+BAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACF;AA9DD,4CA8DC","sourcesContent":["import type { KeyringAccount } from '@metamask/keyring-api';\nimport type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';\nimport type { BaseKeyring } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\n/**\n * Generic adapter that wraps a v2 {@link KeyringV2} instance and exposes it\n * through the v1 {@link BaseKeyring} interface expected by `KeyringController`.\n *\n * ## Why this exists\n *\n * `KeyringController` interacts with all keyrings via the v1 `BaseKeyring`\n * interface — notably `getAccounts()` which must return `Promise<string[]>`\n * (addresses). The v2 `Keyring` interface returns `Promise<KeyringAccount[]>`\n * from `getAccounts()`, an incompatible signature.\n *\n * ## Architecture\n *\n * This class holds a v2 `Keyring` instance and exposes it via {@link unwrap}.\n * `KeyringController` stores this adapter as the v1 keyring entry; its\n * `KeyringV2Builder` calls `unwrap()` to retrieve the same inner instance for\n * the v2 entry — no state duplication.\n *\n * ```\n * KeyringEntry {\n * keyring: KeyringV1Adapter ← v1 face (this class)\n * keyringV2: InnerKeyring ← v2 face (same instance via unwrap())\n * }\n * ```\n *\n * @typeParam InnerKeyring - The concrete v2 keyring type being wrapped.\n * Defaults to the base {@link KeyringV2} interface. Specifying a concrete\n * subtype preserves full type information through {@link unwrap}.\n */\nexport class KeyringV1Adapter<\n InnerKeyring extends KeyringV2 = KeyringV2,\n> implements BaseKeyring {\n /**\n * Keyring type identifier, mirroring the inner v2 instance's type.\n */\n readonly type: string;\n\n readonly #inner: InnerKeyring;\n\n constructor(inner: InnerKeyring) {\n this.#inner = inner;\n this.type = inner.type;\n }\n\n /**\n * Returns the inner v2 {@link KeyringV2} instance.\n *\n * Intended for use by `KeyringController`'s `KeyringV2Builder` so that both\n * the v1 and v2 keyring entries in a `KeyringEntry` share the same object.\n *\n * @returns The inner v2 keyring instance.\n */\n unwrap(): InnerKeyring {\n return this.#inner;\n }\n\n /**\n * Returns the addresses of all accounts in this keyring.\n *\n * Adapts the v2 `getAccounts()` (which returns `KeyringAccount[]`) to the\n * v1 `BaseKeyring` interface (`string[]`).\n *\n * @returns A promise resolving to the list of account addresses.\n */\n async getAccounts(): Promise<string[]> {\n const accounts = await this.#inner.getAccounts();\n return accounts.map((account: KeyringAccount) => account.address);\n }\n\n /**\n * Serializes the keyring state.\n *\n * Delegates to the inner v2 instance.\n *\n * @returns A promise resolving to the serialized state.\n */\n async serialize(): Promise<Json> {\n return this.#inner.serialize();\n }\n\n /**\n * Restores keyring state from a serialized snapshot.\n *\n * Delegates to the inner v2 instance.\n *\n * @param state - The serialized state to restore.\n * @returns A promise that resolves when deserialization is complete.\n */\n async deserialize(state: Json): Promise<void> {\n return this.#inner.deserialize(state);\n }\n}\n"]}
1
+ {"version":3,"file":"keyring-v1-adapter.cjs","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,gBAAgB;IAU3B,YAAY,KAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,KAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF;AA9DD,4CA8DC","sourcesContent":["import type { KeyringAccount } from '@metamask/keyring-api';\nimport type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';\nimport type { BaseKeyring } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\n/**\n * Generic adapter that wraps a v2 {@link KeyringV2} instance and exposes it\n * through the v1 {@link BaseKeyring} interface expected by `KeyringController`.\n *\n * ## Why this exists\n *\n * `KeyringController` interacts with all keyrings via the v1 `BaseKeyring`\n * interface — notably `getAccounts()` which must return `Promise<string[]>`\n * (addresses). The v2 `Keyring` interface returns `Promise<KeyringAccount[]>`\n * from `getAccounts()`, an incompatible signature.\n *\n * ## Architecture\n *\n * This class holds a v2 `Keyring` instance and exposes it via {@link unwrap}.\n * `KeyringController` stores this adapter as the v1 keyring entry; its\n * `KeyringV2Builder` calls `unwrap()` to retrieve the same inner instance for\n * the v2 entry — no state duplication.\n *\n * ```\n * KeyringEntry {\n * keyring: KeyringV1Adapter ← v1 face (this class)\n * keyringV2: InnerKeyring ← v2 face (same instance via unwrap())\n * }\n * ```\n *\n * @typeParam InnerKeyring - The concrete v2 keyring type being wrapped.\n * Defaults to the base {@link KeyringV2} interface. Specifying a concrete\n * subtype preserves full type information through {@link unwrap}.\n */\nexport class KeyringV1Adapter<\n InnerKeyring extends KeyringV2 = KeyringV2,\n> implements BaseKeyring {\n /**\n * Keyring type identifier, mirroring the inner v2 instance's type.\n */\n readonly type: string;\n\n protected readonly inner: InnerKeyring;\n\n constructor(inner: InnerKeyring) {\n this.inner = inner;\n this.type = inner.type;\n }\n\n /**\n * Returns the inner v2 {@link KeyringV2} instance.\n *\n * Intended for use by `KeyringController`'s `KeyringV2Builder` so that both\n * the v1 and v2 keyring entries in a `KeyringEntry` share the same object.\n *\n * @returns The inner v2 keyring instance.\n */\n unwrap(): InnerKeyring {\n return this.inner;\n }\n\n /**\n * Returns the addresses of all accounts in this keyring.\n *\n * Adapts the v2 `getAccounts()` (which returns `KeyringAccount[]`) to the\n * v1 `BaseKeyring` interface (`string[]`).\n *\n * @returns A promise resolving to the list of account addresses.\n */\n async getAccounts(): Promise<string[]> {\n const accounts = await this.inner.getAccounts();\n return accounts.map((account: KeyringAccount) => account.address);\n }\n\n /**\n * Serializes the keyring state.\n *\n * Delegates to the inner v2 instance.\n *\n * @returns A promise resolving to the serialized state.\n */\n async serialize(): Promise<Json> {\n return this.inner.serialize();\n }\n\n /**\n * Restores keyring state from a serialized snapshot.\n *\n * Delegates to the inner v2 instance.\n *\n * @param state - The serialized state to restore.\n * @returns A promise that resolves when deserialization is complete.\n */\n async deserialize(state: Json): Promise<void> {\n return this.inner.deserialize(state);\n }\n}\n"]}
@@ -31,11 +31,11 @@ import type { Json } from "@metamask/utils";
31
31
  * subtype preserves full type information through {@link unwrap}.
32
32
  */
33
33
  export declare class KeyringV1Adapter<InnerKeyring extends KeyringV2 = KeyringV2> implements BaseKeyring {
34
- #private;
35
34
  /**
36
35
  * Keyring type identifier, mirroring the inner v2 instance's type.
37
36
  */
38
37
  readonly type: string;
38
+ protected readonly inner: InnerKeyring;
39
39
  constructor(inner: InnerKeyring);
40
40
  /**
41
41
  * Returns the inner v2 {@link KeyringV2} instance.
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-v1-adapter.d.cts","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,SAAS,EAAE,iCAAiC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB;AAE5C;;;;;;;;;;;;;;;;;;;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from "@metamask/utils";
31
31
  * subtype preserves full type information through {@link unwrap}.
32
32
  */
33
33
  export declare class KeyringV1Adapter<InnerKeyring extends KeyringV2 = KeyringV2> implements BaseKeyring {
34
- #private;
35
34
  /**
36
35
  * Keyring type identifier, mirroring the inner v2 instance's type.
37
36
  */
38
37
  readonly type: string;
38
+ protected readonly inner: InnerKeyring;
39
39
  constructor(inner: InnerKeyring);
40
40
  /**
41
41
  * Returns the inner v2 {@link KeyringV2} instance.
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-v1-adapter.d.mts","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,SAAS,EAAE,iCAAiC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,gBAAgB,CAC3B,YAAY,SAAS,SAAS,GAAG,SAAS,CAC1C,YAAW,WAAW;;IACtB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAIV,KAAK,EAAE,YAAY;IAK/B;;;;;;;OAOG;IACH,MAAM,IAAI,YAAY;IAItB;;;;;;;OAOG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKtC;;;;;;OAMG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhC;;;;;;;OAOG;IACG,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9C"}
1
+ {"version":3,"file":"keyring-v1-adapter.d.mts","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,SAAS,EAAE,iCAAiC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,gBAAgB,CAC3B,YAAY,SAAS,SAAS,GAAG,SAAS,CAC1C,YAAW,WAAW;IACtB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;gBAE3B,KAAK,EAAE,YAAY;IAK/B;;;;;;;OAOG;IACH,MAAM,IAAI,YAAY;IAItB;;;;;;;OAOG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKtC;;;;;;OAMG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhC;;;;;;;OAOG;IACG,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9C"}
@@ -1,15 +1,3 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _KeyringV1Adapter_inner;
13
1
  /**
14
2
  * Generic adapter that wraps a v2 {@link KeyringV2} instance and exposes it
15
3
  * through the v1 {@link BaseKeyring} interface expected by `KeyringController`.
@@ -41,8 +29,7 @@ var _KeyringV1Adapter_inner;
41
29
  */
42
30
  export class KeyringV1Adapter {
43
31
  constructor(inner) {
44
- _KeyringV1Adapter_inner.set(this, void 0);
45
- __classPrivateFieldSet(this, _KeyringV1Adapter_inner, inner, "f");
32
+ this.inner = inner;
46
33
  this.type = inner.type;
47
34
  }
48
35
  /**
@@ -54,7 +41,7 @@ export class KeyringV1Adapter {
54
41
  * @returns The inner v2 keyring instance.
55
42
  */
56
43
  unwrap() {
57
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f");
44
+ return this.inner;
58
45
  }
59
46
  /**
60
47
  * Returns the addresses of all accounts in this keyring.
@@ -65,7 +52,7 @@ export class KeyringV1Adapter {
65
52
  * @returns A promise resolving to the list of account addresses.
66
53
  */
67
54
  async getAccounts() {
68
- const accounts = await __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").getAccounts();
55
+ const accounts = await this.inner.getAccounts();
69
56
  return accounts.map((account) => account.address);
70
57
  }
71
58
  /**
@@ -76,7 +63,7 @@ export class KeyringV1Adapter {
76
63
  * @returns A promise resolving to the serialized state.
77
64
  */
78
65
  async serialize() {
79
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").serialize();
66
+ return this.inner.serialize();
80
67
  }
81
68
  /**
82
69
  * Restores keyring state from a serialized snapshot.
@@ -87,8 +74,7 @@ export class KeyringV1Adapter {
87
74
  * @returns A promise that resolves when deserialization is complete.
88
75
  */
89
76
  async deserialize(state) {
90
- return __classPrivateFieldGet(this, _KeyringV1Adapter_inner, "f").deserialize(state);
77
+ return this.inner.deserialize(state);
91
78
  }
92
79
  }
93
- _KeyringV1Adapter_inner = new WeakMap();
94
80
  //# sourceMappingURL=keyring-v1-adapter.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-v1-adapter.mjs","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,gBAAgB;IAU3B,YAAY,KAAmB;QAFtB,0CAAqB;QAG5B,uBAAA,IAAI,2BAAU,KAAK,MAAA,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM;QACJ,OAAO,uBAAA,IAAI,+BAAO,CAAC;IACrB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,uBAAA,IAAI,+BAAO,CAAC,WAAW,EAAE,CAAC;QACjD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,uBAAA,IAAI,+BAAO,CAAC,SAAS,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,KAAW;QAC3B,OAAO,uBAAA,IAAI,+BAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import type { KeyringAccount } from '@metamask/keyring-api';\nimport type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';\nimport type { BaseKeyring } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\n/**\n * Generic adapter that wraps a v2 {@link KeyringV2} instance and exposes it\n * through the v1 {@link BaseKeyring} interface expected by `KeyringController`.\n *\n * ## Why this exists\n *\n * `KeyringController` interacts with all keyrings via the v1 `BaseKeyring`\n * interface — notably `getAccounts()` which must return `Promise<string[]>`\n * (addresses). The v2 `Keyring` interface returns `Promise<KeyringAccount[]>`\n * from `getAccounts()`, an incompatible signature.\n *\n * ## Architecture\n *\n * This class holds a v2 `Keyring` instance and exposes it via {@link unwrap}.\n * `KeyringController` stores this adapter as the v1 keyring entry; its\n * `KeyringV2Builder` calls `unwrap()` to retrieve the same inner instance for\n * the v2 entry — no state duplication.\n *\n * ```\n * KeyringEntry {\n * keyring: KeyringV1Adapter ← v1 face (this class)\n * keyringV2: InnerKeyring ← v2 face (same instance via unwrap())\n * }\n * ```\n *\n * @typeParam InnerKeyring - The concrete v2 keyring type being wrapped.\n * Defaults to the base {@link KeyringV2} interface. Specifying a concrete\n * subtype preserves full type information through {@link unwrap}.\n */\nexport class KeyringV1Adapter<\n InnerKeyring extends KeyringV2 = KeyringV2,\n> implements BaseKeyring {\n /**\n * Keyring type identifier, mirroring the inner v2 instance's type.\n */\n readonly type: string;\n\n readonly #inner: InnerKeyring;\n\n constructor(inner: InnerKeyring) {\n this.#inner = inner;\n this.type = inner.type;\n }\n\n /**\n * Returns the inner v2 {@link KeyringV2} instance.\n *\n * Intended for use by `KeyringController`'s `KeyringV2Builder` so that both\n * the v1 and v2 keyring entries in a `KeyringEntry` share the same object.\n *\n * @returns The inner v2 keyring instance.\n */\n unwrap(): InnerKeyring {\n return this.#inner;\n }\n\n /**\n * Returns the addresses of all accounts in this keyring.\n *\n * Adapts the v2 `getAccounts()` (which returns `KeyringAccount[]`) to the\n * v1 `BaseKeyring` interface (`string[]`).\n *\n * @returns A promise resolving to the list of account addresses.\n */\n async getAccounts(): Promise<string[]> {\n const accounts = await this.#inner.getAccounts();\n return accounts.map((account: KeyringAccount) => account.address);\n }\n\n /**\n * Serializes the keyring state.\n *\n * Delegates to the inner v2 instance.\n *\n * @returns A promise resolving to the serialized state.\n */\n async serialize(): Promise<Json> {\n return this.#inner.serialize();\n }\n\n /**\n * Restores keyring state from a serialized snapshot.\n *\n * Delegates to the inner v2 instance.\n *\n * @param state - The serialized state to restore.\n * @returns A promise that resolves when deserialization is complete.\n */\n async deserialize(state: Json): Promise<void> {\n return this.#inner.deserialize(state);\n }\n}\n"]}
1
+ {"version":3,"file":"keyring-v1-adapter.mjs","sourceRoot":"","sources":["../../src/v2/keyring-v1-adapter.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,gBAAgB;IAU3B,YAAY,KAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,KAAW;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["import type { KeyringAccount } from '@metamask/keyring-api';\nimport type { Keyring as KeyringV2 } from '@metamask/keyring-api/v2';\nimport type { BaseKeyring } from '@metamask/keyring-utils';\nimport type { Json } from '@metamask/utils';\n\n/**\n * Generic adapter that wraps a v2 {@link KeyringV2} instance and exposes it\n * through the v1 {@link BaseKeyring} interface expected by `KeyringController`.\n *\n * ## Why this exists\n *\n * `KeyringController` interacts with all keyrings via the v1 `BaseKeyring`\n * interface — notably `getAccounts()` which must return `Promise<string[]>`\n * (addresses). The v2 `Keyring` interface returns `Promise<KeyringAccount[]>`\n * from `getAccounts()`, an incompatible signature.\n *\n * ## Architecture\n *\n * This class holds a v2 `Keyring` instance and exposes it via {@link unwrap}.\n * `KeyringController` stores this adapter as the v1 keyring entry; its\n * `KeyringV2Builder` calls `unwrap()` to retrieve the same inner instance for\n * the v2 entry — no state duplication.\n *\n * ```\n * KeyringEntry {\n * keyring: KeyringV1Adapter ← v1 face (this class)\n * keyringV2: InnerKeyring ← v2 face (same instance via unwrap())\n * }\n * ```\n *\n * @typeParam InnerKeyring - The concrete v2 keyring type being wrapped.\n * Defaults to the base {@link KeyringV2} interface. Specifying a concrete\n * subtype preserves full type information through {@link unwrap}.\n */\nexport class KeyringV1Adapter<\n InnerKeyring extends KeyringV2 = KeyringV2,\n> implements BaseKeyring {\n /**\n * Keyring type identifier, mirroring the inner v2 instance's type.\n */\n readonly type: string;\n\n protected readonly inner: InnerKeyring;\n\n constructor(inner: InnerKeyring) {\n this.inner = inner;\n this.type = inner.type;\n }\n\n /**\n * Returns the inner v2 {@link KeyringV2} instance.\n *\n * Intended for use by `KeyringController`'s `KeyringV2Builder` so that both\n * the v1 and v2 keyring entries in a `KeyringEntry` share the same object.\n *\n * @returns The inner v2 keyring instance.\n */\n unwrap(): InnerKeyring {\n return this.inner;\n }\n\n /**\n * Returns the addresses of all accounts in this keyring.\n *\n * Adapts the v2 `getAccounts()` (which returns `KeyringAccount[]`) to the\n * v1 `BaseKeyring` interface (`string[]`).\n *\n * @returns A promise resolving to the list of account addresses.\n */\n async getAccounts(): Promise<string[]> {\n const accounts = await this.inner.getAccounts();\n return accounts.map((account: KeyringAccount) => account.address);\n }\n\n /**\n * Serializes the keyring state.\n *\n * Delegates to the inner v2 instance.\n *\n * @returns A promise resolving to the serialized state.\n */\n async serialize(): Promise<Json> {\n return this.inner.serialize();\n }\n\n /**\n * Restores keyring state from a serialized snapshot.\n *\n * Delegates to the inner v2 instance.\n *\n * @param state - The serialized state to restore.\n * @returns A promise that resolves when deserialization is complete.\n */\n async deserialize(state: Json): Promise<void> {\n return this.inner.deserialize(state);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/keyring-sdk",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "MetaMask Keyring SDK",
5
5
  "keywords": [
6
6
  "keyring",
@@ -68,7 +68,7 @@
68
68
  "dependencies": {
69
69
  "@ethereumjs/tx": "^5.4.0",
70
70
  "@metamask/eth-sig-util": "^8.2.0",
71
- "@metamask/keyring-api": "^23.1.0",
71
+ "@metamask/keyring-api": "^23.2.0",
72
72
  "@metamask/keyring-utils": "^3.3.1",
73
73
  "@metamask/scure-bip39": "^2.1.1",
74
74
  "@metamask/superstruct": "^3.1.0",