@metamask-previews/keyring-utils 3.1.0-fc46964 → 3.2.0-fd40efd

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 (48) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/index.cjs +0 -4
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +0 -4
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.mts +0 -4
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +0 -4
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/keyring.cjs.map +1 -1
  11. package/dist/keyring.d.cts +5 -0
  12. package/dist/keyring.d.cts.map +1 -1
  13. package/dist/keyring.d.mts +5 -0
  14. package/dist/keyring.d.mts.map +1 -1
  15. package/dist/keyring.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/dist/hardware-error-codes.cjs +0 -80
  18. package/dist/hardware-error-codes.cjs.map +0 -1
  19. package/dist/hardware-error-codes.d.cts +0 -64
  20. package/dist/hardware-error-codes.d.cts.map +0 -1
  21. package/dist/hardware-error-codes.d.mts +0 -64
  22. package/dist/hardware-error-codes.d.mts.map +0 -1
  23. package/dist/hardware-error-codes.mjs +0 -76
  24. package/dist/hardware-error-codes.mjs.map +0 -1
  25. package/dist/hardware-error-mappings.cjs +0 -815
  26. package/dist/hardware-error-mappings.cjs.map +0 -1
  27. package/dist/hardware-error-mappings.d.cts +0 -791
  28. package/dist/hardware-error-mappings.d.cts.map +0 -1
  29. package/dist/hardware-error-mappings.d.mts +0 -791
  30. package/dist/hardware-error-mappings.d.mts.map +0 -1
  31. package/dist/hardware-error-mappings.mjs +0 -812
  32. package/dist/hardware-error-mappings.mjs.map +0 -1
  33. package/dist/hardware-error.cjs +0 -191
  34. package/dist/hardware-error.cjs.map +0 -1
  35. package/dist/hardware-error.d.cts +0 -86
  36. package/dist/hardware-error.d.cts.map +0 -1
  37. package/dist/hardware-error.d.mts +0 -86
  38. package/dist/hardware-error.d.mts.map +0 -1
  39. package/dist/hardware-error.mjs +0 -187
  40. package/dist/hardware-error.mjs.map +0 -1
  41. package/dist/hardware-errors-enums.cjs +0 -115
  42. package/dist/hardware-errors-enums.cjs.map +0 -1
  43. package/dist/hardware-errors-enums.d.cts +0 -91
  44. package/dist/hardware-errors-enums.d.cts.map +0 -1
  45. package/dist/hardware-errors-enums.d.mts +0 -91
  46. package/dist/hardware-errors-enums.d.mts.map +0 -1
  47. package/dist/hardware-errors-enums.mjs +0 -112
  48. package/dist/hardware-errors-enums.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.2.0]
11
+
12
+ ### Added
13
+
14
+ - Add `EthKeyring` alias export for the legacy `Keyring` type ([#404](https://github.com/MetaMask/accounts/pull/404))
15
+
10
16
  ## [3.1.0]
11
17
 
12
18
  ### Added
@@ -109,7 +115,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109
115
  - This new version fixes a bug with CJS re-exports.
110
116
  - Initial release ([#24](https://github.com/MetaMask/accounts/pull/24))
111
117
 
112
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@3.1.0...HEAD
118
+ [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@3.2.0...HEAD
119
+ [3.2.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@3.1.0...@metamask/keyring-utils@3.2.0
113
120
  [3.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@3.0.0...@metamask/keyring-utils@3.1.0
114
121
  [3.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@2.3.1...@metamask/keyring-utils@3.0.0
115
122
  [2.3.1]: https://github.com/MetaMask/accounts/compare/@metamask/keyring-utils@2.3.0...@metamask/keyring-utils@2.3.1
package/dist/index.cjs CHANGED
@@ -20,8 +20,4 @@ __exportStar(require("./typing.cjs"), exports);
20
20
  __exportStar(require("./scopes.cjs"), exports);
21
21
  __exportStar(require("./superstruct.cjs"), exports);
22
22
  __exportStar(require("./JsonRpcRequest.cjs"), exports);
23
- __exportStar(require("./hardware-errors-enums.cjs"), exports);
24
- __exportStar(require("./hardware-error-mappings.cjs"), exports);
25
- __exportStar(require("./hardware-error-codes.cjs"), exports);
26
- __exportStar(require("./hardware-error.cjs"), exports);
27
23
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAsB;AACtB,8CAAwB;AACxB,+CAAyB;AACzB,+CAAyB;AACzB,oDAA8B;AAC9B,uDAAiC;AAEjC,8DAAwC;AACxC,gEAA0C;AAC1C,6DAAuC;AACvC,uDAAiC","sourcesContent":["export * from './btc';\nexport * from './types';\nexport * from './typing';\nexport * from './scopes';\nexport * from './superstruct';\nexport * from './JsonRpcRequest';\nexport type * from './keyring';\nexport * from './hardware-errors-enums';\nexport * from './hardware-error-mappings';\nexport * from './hardware-error-codes';\nexport * from './hardware-error';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAsB;AACtB,8CAAwB;AACxB,+CAAyB;AACzB,+CAAyB;AACzB,oDAA8B;AAC9B,uDAAiC","sourcesContent":["export * from './btc';\nexport * from './types';\nexport * from './typing';\nexport * from './scopes';\nexport * from './superstruct';\nexport * from './JsonRpcRequest';\nexport type * from './keyring';\n"]}
package/dist/index.d.cts CHANGED
@@ -5,8 +5,4 @@ export * from "./scopes.cjs";
5
5
  export * from "./superstruct.cjs";
6
6
  export * from "./JsonRpcRequest.cjs";
7
7
  export type * from "./keyring.cjs";
8
- export * from "./hardware-errors-enums.cjs";
9
- export * from "./hardware-error-mappings.cjs";
10
- export * from "./hardware-error-codes.cjs";
11
- export * from "./hardware-error.cjs";
12
8
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC;AACjC,mCAA+B;AAC/B,4CAAwC;AACxC,8CAA0C;AAC1C,2CAAuC;AACvC,qCAAiC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC;AACjC,mCAA+B"}
package/dist/index.d.mts CHANGED
@@ -5,8 +5,4 @@ export * from "./scopes.mjs";
5
5
  export * from "./superstruct.mjs";
6
6
  export * from "./JsonRpcRequest.mjs";
7
7
  export type * from "./keyring.mjs";
8
- export * from "./hardware-errors-enums.mjs";
9
- export * from "./hardware-error-mappings.mjs";
10
- export * from "./hardware-error-codes.mjs";
11
- export * from "./hardware-error.mjs";
12
8
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC;AACjC,mCAA+B;AAC/B,4CAAwC;AACxC,8CAA0C;AAC1C,2CAAuC;AACvC,qCAAiC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC;AACjC,mCAA+B"}
package/dist/index.mjs CHANGED
@@ -4,8 +4,4 @@ export * from "./typing.mjs";
4
4
  export * from "./scopes.mjs";
5
5
  export * from "./superstruct.mjs";
6
6
  export * from "./JsonRpcRequest.mjs";
7
- export * from "./hardware-errors-enums.mjs";
8
- export * from "./hardware-error-mappings.mjs";
9
- export * from "./hardware-error-codes.mjs";
10
- export * from "./hardware-error.mjs";
11
7
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC;AAEjC,4CAAwC;AACxC,8CAA0C;AAC1C,2CAAuC;AACvC,qCAAiC","sourcesContent":["export * from './btc';\nexport * from './types';\nexport * from './typing';\nexport * from './scopes';\nexport * from './superstruct';\nexport * from './JsonRpcRequest';\nexport type * from './keyring';\nexport * from './hardware-errors-enums';\nexport * from './hardware-error-mappings';\nexport * from './hardware-error-codes';\nexport * from './hardware-error';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAsB;AACtB,4BAAwB;AACxB,6BAAyB;AACzB,6BAAyB;AACzB,kCAA8B;AAC9B,qCAAiC","sourcesContent":["export * from './btc';\nexport * from './types';\nexport * from './typing';\nexport * from './scopes';\nexport * from './superstruct';\nexport * from './JsonRpcRequest';\nexport type * from './keyring';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"keyring.cjs","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedTransaction, TypedTxData } from '@ethereumjs/tx';\nimport type { Eip1024EncryptedData, Hex, Json } from '@metamask/utils';\n\n/**\n * A Keyring class.\n *\n * This type is used to validate the constructor signature and the `type`\n * static property on Keyring classes. See the {@link Keyring} type for more\n * information.\n */\nexport type KeyringClass = {\n /**\n * The Keyring constructor. Takes a single parameter, an \"options\" object.\n * See the documentation for the specific keyring for more information about\n * what these options are.\n *\n * @param options - The constructor options. Differs between keyring\n * implementations.\n */\n new (options?: Record<string, unknown>): Keyring;\n\n /**\n * The name of this type of keyring. This must uniquely identify the\n * keyring type.\n */\n type: string;\n};\n\n/**\n * A keyring is something that can sign messages. Keyrings are used to add new\n * signing strategies; each strategy is a new keyring.\n *\n * Each keyring manages a collection of key pairs, which we call \"accounts\".\n * Each account is referred to by its \"address\", which is a unique identifier\n * derived from the public key. The address is always a \"0x\"-prefixed\n * hexidecimal string.\n *\n * The keyring might store the private key for each account as well, but it's\n * not guaranteed. Some keyrings delegate signing, so they don't need the\n * private key directly. The keyring (and in particular the keyring state)\n * should be treated with care though, just in case it does contain sensitive\n * material such as a private key.\n */\nexport type Keyring = {\n /**\n * The name of this type of keyring. This must match the `type` property of\n * the keyring class.\n */\n type: string;\n\n /**\n * Get the addresses for all accounts in this keyring.\n *\n * @returns A list of the account addresses for this keyring\n */\n getAccounts(): Promise<Hex[]>;\n\n /**\n * Add an account to the keyring.\n *\n * @param number - The number of accounts to add. Usually defaults to 1.\n * @returns A list of the newly added account addresses.\n */\n addAccounts(number: number): Promise<Hex[]>;\n\n /**\n * Serialize the keyring state as a JSON-serializable object.\n *\n * @returns A JSON-serializable representation of the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Deserialize the given keyring state, overwriting any existing state with\n * the serialized state provided.\n *\n * @param state - A JSON-serializable representation of the keyring state.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Method to include asynchronous configuration.\n */\n init?(): Promise<void>;\n\n /**\n * Remove an account from the keyring.\n *\n * @param address - The address of the account to remove.\n */\n removeAccount?(address: Hex): void;\n\n /**\n * Export the private key for one of the keyring accounts.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter is used to allow exporting a\n * private key that is derived from the given account, rather than exporting\n * that account's private key directly.\n *\n * @param address - The address of the account to export.\n * @param options - Export options; differs between keyrings.\n * @returns The non-prefixed, hex-encoded private key that was requested.\n */\n exportAccount?(\n address: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get the \"app key\" address for the given account and origin. An app key is\n * an application-specific key pair. See {@link https://eips.ethereum.org/EIPS/eip-1775|EIP-1775}\n * for more information. The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin|origin}\n * is used as the unique identifier for the application, and it's used as\n * part of the key derivation process.\n *\n * @param address - The address of the account the app key is derived from.\n * @param origin - The origin of the application.\n * @returns The address of the app key for the given account and origin.\n */\n getAppKeyAddress?(address: Hex, origin: string): Promise<Hex>;\n\n /**\n * Sign a transaction. This is equivalent to the `eth_signTransaction`\n * Ethereum JSON-RPC method. See the Ethereum JSON-RPC API documentation for\n * more details.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param transaction - The transaction to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed transaction.\n */\n signTransaction?(\n address: Hex,\n transaction: TypedTransaction,\n options?: Record<string, unknown>,\n ): Promise<TypedTxData>;\n\n /**\n * Sign a message. This is equivalent to an older version of the the\n * `eth_sign` Ethereum JSON-RPC method. The message is signed using ECDSA,\n * using the curve secp256k1 the Keccak-256 hash function.\n *\n * For more information about this method and why we still support it, see\n * the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signMessage?(\n address: Hex,\n message: string,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign an EIP-7702 authorization. This is a signing method for authorizing a\n * specific contract on a specific chain.\n *\n * @param address - The address of the account to use for signing.\n * @param authorization - An array containing the chain ID, contract address,\n * and nonce.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed authorization as a hex string.\n */\n signEip7702Authorization?(\n address: Hex,\n authorization: [chainId: number, contractAddress: Hex, nonce: number],\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_sign` Ethereum JSON-RPC\n * method, which is exposed by MetaMask as the method `personal_sign`. See\n * the Ethereum JSON-RPC API documentation for more details.\n *\n * For more information about this method and why we call it `personal_sign`,\n * see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signPersonalMessage?(\n address: Hex,\n message: Hex,\n options?: { version?: string } & Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_signTypedData` Ethereum\n * JSON-RPC method. See {@link https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md|EIP-712}\n * for more details.\n *\n * The \"version\" option dictates which version of `eth_signTypedData` is\n * used. The latest version reflects the specification most closely, whereas\n * earlier versions reflect earlier drafts of the specification that are\n * still supported for backwards-compatibility reasons. For more information\n * about why we support multiple versions, see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept additional options as well. See the documentation for\n * the specific keyring for more information about what these options are.\n * For some keyrings, the options parameter can even change which key is used\n * for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param typedData - The data to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signTypedData?(\n address: Hex,\n typedData: unknown[] | Record<string, unknown>,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get a public key to use for encryption. This is equivalent to the\n * ` eth_getEncryptionPublicKey` JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-getencryptionpublickey|MetaMask Docs}\n * for more information.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used (e.g. encrypting with app keys).\n *\n * @param account - The address of the account you want the encryption key for.\n * @param options - Options; differs between keyrings.\n */\n getEncryptionPublicKey?(\n account: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Decrypt an encrypted message. This is equivalent to the ` eth_decrypt`\n * JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-decrypt|MetaMask Docs}\n * for more information.\n *\n * @param account - The address of the account you want to use to decrypt\n * the message.\n * @param encryptedData - The encrypted data that you want to decrypt.\n * @returns The decrypted data.\n */\n decryptMessage?(\n account: Hex,\n encryptedData: Eip1024EncryptedData,\n ): Promise<string>;\n\n /**\n * Generates the properties for the keyring based on the given\n * BIP39-compliant mnemonic.\n *\n * @returns A promise resolving when the keyring has generated the properties.\n */\n generateRandomMnemonic?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n */\n destroy?(): Promise<void>;\n};\n"]}
1
+ {"version":3,"file":"keyring.cjs","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedTransaction, TypedTxData } from '@ethereumjs/tx';\nimport type { Eip1024EncryptedData, Hex, Json } from '@metamask/utils';\n\n/**\n * A Keyring class.\n *\n * This type is used to validate the constructor signature and the `type`\n * static property on Keyring classes. See the {@link Keyring} type for more\n * information.\n */\nexport type KeyringClass = {\n /**\n * The Keyring constructor. Takes a single parameter, an \"options\" object.\n * See the documentation for the specific keyring for more information about\n * what these options are.\n *\n * @param options - The constructor options. Differs between keyring\n * implementations.\n */\n new (options?: Record<string, unknown>): Keyring;\n\n /**\n * The name of this type of keyring. This must uniquely identify the\n * keyring type.\n */\n type: string;\n};\n\n/**\n * A keyring is something that can sign messages. Keyrings are used to add new\n * signing strategies; each strategy is a new keyring.\n *\n * Each keyring manages a collection of key pairs, which we call \"accounts\".\n * Each account is referred to by its \"address\", which is a unique identifier\n * derived from the public key. The address is always a \"0x\"-prefixed\n * hexidecimal string.\n *\n * The keyring might store the private key for each account as well, but it's\n * not guaranteed. Some keyrings delegate signing, so they don't need the\n * private key directly. The keyring (and in particular the keyring state)\n * should be treated with care though, just in case it does contain sensitive\n * material such as a private key.\n */\nexport type Keyring = {\n /**\n * The name of this type of keyring. This must match the `type` property of\n * the keyring class.\n */\n type: string;\n\n /**\n * Get the addresses for all accounts in this keyring.\n *\n * @returns A list of the account addresses for this keyring\n */\n getAccounts(): Promise<Hex[]>;\n\n /**\n * Add an account to the keyring.\n *\n * @param number - The number of accounts to add. Usually defaults to 1.\n * @returns A list of the newly added account addresses.\n */\n addAccounts(number: number): Promise<Hex[]>;\n\n /**\n * Serialize the keyring state as a JSON-serializable object.\n *\n * @returns A JSON-serializable representation of the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Deserialize the given keyring state, overwriting any existing state with\n * the serialized state provided.\n *\n * @param state - A JSON-serializable representation of the keyring state.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Method to include asynchronous configuration.\n */\n init?(): Promise<void>;\n\n /**\n * Remove an account from the keyring.\n *\n * @param address - The address of the account to remove.\n */\n removeAccount?(address: Hex): void;\n\n /**\n * Export the private key for one of the keyring accounts.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter is used to allow exporting a\n * private key that is derived from the given account, rather than exporting\n * that account's private key directly.\n *\n * @param address - The address of the account to export.\n * @param options - Export options; differs between keyrings.\n * @returns The non-prefixed, hex-encoded private key that was requested.\n */\n exportAccount?(\n address: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get the \"app key\" address for the given account and origin. An app key is\n * an application-specific key pair. See {@link https://eips.ethereum.org/EIPS/eip-1775|EIP-1775}\n * for more information. The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin|origin}\n * is used as the unique identifier for the application, and it's used as\n * part of the key derivation process.\n *\n * @param address - The address of the account the app key is derived from.\n * @param origin - The origin of the application.\n * @returns The address of the app key for the given account and origin.\n */\n getAppKeyAddress?(address: Hex, origin: string): Promise<Hex>;\n\n /**\n * Sign a transaction. This is equivalent to the `eth_signTransaction`\n * Ethereum JSON-RPC method. See the Ethereum JSON-RPC API documentation for\n * more details.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param transaction - The transaction to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed transaction.\n */\n signTransaction?(\n address: Hex,\n transaction: TypedTransaction,\n options?: Record<string, unknown>,\n ): Promise<TypedTxData>;\n\n /**\n * Sign a message. This is equivalent to an older version of the the\n * `eth_sign` Ethereum JSON-RPC method. The message is signed using ECDSA,\n * using the curve secp256k1 the Keccak-256 hash function.\n *\n * For more information about this method and why we still support it, see\n * the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signMessage?(\n address: Hex,\n message: string,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign an EIP-7702 authorization. This is a signing method for authorizing a\n * specific contract on a specific chain.\n *\n * @param address - The address of the account to use for signing.\n * @param authorization - An array containing the chain ID, contract address,\n * and nonce.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed authorization as a hex string.\n */\n signEip7702Authorization?(\n address: Hex,\n authorization: [chainId: number, contractAddress: Hex, nonce: number],\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_sign` Ethereum JSON-RPC\n * method, which is exposed by MetaMask as the method `personal_sign`. See\n * the Ethereum JSON-RPC API documentation for more details.\n *\n * For more information about this method and why we call it `personal_sign`,\n * see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signPersonalMessage?(\n address: Hex,\n message: Hex,\n options?: { version?: string } & Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_signTypedData` Ethereum\n * JSON-RPC method. See {@link https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md|EIP-712}\n * for more details.\n *\n * The \"version\" option dictates which version of `eth_signTypedData` is\n * used. The latest version reflects the specification most closely, whereas\n * earlier versions reflect earlier drafts of the specification that are\n * still supported for backwards-compatibility reasons. For more information\n * about why we support multiple versions, see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept additional options as well. See the documentation for\n * the specific keyring for more information about what these options are.\n * For some keyrings, the options parameter can even change which key is used\n * for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param typedData - The data to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signTypedData?(\n address: Hex,\n typedData: unknown[] | Record<string, unknown>,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get a public key to use for encryption. This is equivalent to the\n * ` eth_getEncryptionPublicKey` JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-getencryptionpublickey|MetaMask Docs}\n * for more information.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used (e.g. encrypting with app keys).\n *\n * @param account - The address of the account you want the encryption key for.\n * @param options - Options; differs between keyrings.\n */\n getEncryptionPublicKey?(\n account: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Decrypt an encrypted message. This is equivalent to the ` eth_decrypt`\n * JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-decrypt|MetaMask Docs}\n * for more information.\n *\n * @param account - The address of the account you want to use to decrypt\n * the message.\n * @param encryptedData - The encrypted data that you want to decrypt.\n * @returns The decrypted data.\n */\n decryptMessage?(\n account: Hex,\n encryptedData: Eip1024EncryptedData,\n ): Promise<string>;\n\n /**\n * Generates the properties for the keyring based on the given\n * BIP39-compliant mnemonic.\n *\n * @returns A promise resolving when the keyring has generated the properties.\n */\n generateRandomMnemonic?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n */\n destroy?(): Promise<void>;\n};\n\n/**\n * The legacy `Keyring` is Ethereum only, so we can alias it here for better\n * clarity.\n */\nexport type EthKeyring = Keyring;\n"]}
@@ -232,4 +232,9 @@ export type Keyring = {
232
232
  */
233
233
  destroy?(): Promise<void>;
234
234
  };
235
+ /**
236
+ * The legacy `Keyring` is Ethereum only, so we can alias it here for better
237
+ * clarity.
238
+ */
239
+ export type EthKeyring = Keyring;
235
240
  //# sourceMappingURL=keyring.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring.d.cts","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,uBAAuB;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,IAAI,EAAE,wBAAwB;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;;;OAOG;IACH,KAAK,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO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ACH,sBAAsB,CAAC,CACrB,OAAO,EAAE,GAAG,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;;;;OASG;IACH,cAAc,CAAC,CACb,OAAO,EAAE,GAAG,EACZ,aAAa,EAAE,oBAAoB,GAClC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,sBAAsB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC"}
@@ -232,4 +232,9 @@ export type Keyring = {
232
232
  */
233
233
  destroy?(): Promise<void>;
234
234
  };
235
+ /**
236
+ * The legacy `Keyring` is Ethereum only, so we can alias it here for better
237
+ * clarity.
238
+ */
239
+ export type EthKeyring = Keyring;
235
240
  //# sourceMappingURL=keyring.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring.d.mts","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,uBAAuB;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,IAAI,EAAE,wBAAwB;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;;;OAOG;IACH,KAAK,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IAEjD;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,WAAW,IAAI,OAAO,CAAC,GA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AClC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,sBAAsB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"keyring.mjs","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedTransaction, TypedTxData } from '@ethereumjs/tx';\nimport type { Eip1024EncryptedData, Hex, Json } from '@metamask/utils';\n\n/**\n * A Keyring class.\n *\n * This type is used to validate the constructor signature and the `type`\n * static property on Keyring classes. See the {@link Keyring} type for more\n * information.\n */\nexport type KeyringClass = {\n /**\n * The Keyring constructor. Takes a single parameter, an \"options\" object.\n * See the documentation for the specific keyring for more information about\n * what these options are.\n *\n * @param options - The constructor options. Differs between keyring\n * implementations.\n */\n new (options?: Record<string, unknown>): Keyring;\n\n /**\n * The name of this type of keyring. This must uniquely identify the\n * keyring type.\n */\n type: string;\n};\n\n/**\n * A keyring is something that can sign messages. Keyrings are used to add new\n * signing strategies; each strategy is a new keyring.\n *\n * Each keyring manages a collection of key pairs, which we call \"accounts\".\n * Each account is referred to by its \"address\", which is a unique identifier\n * derived from the public key. The address is always a \"0x\"-prefixed\n * hexidecimal string.\n *\n * The keyring might store the private key for each account as well, but it's\n * not guaranteed. Some keyrings delegate signing, so they don't need the\n * private key directly. The keyring (and in particular the keyring state)\n * should be treated with care though, just in case it does contain sensitive\n * material such as a private key.\n */\nexport type Keyring = {\n /**\n * The name of this type of keyring. This must match the `type` property of\n * the keyring class.\n */\n type: string;\n\n /**\n * Get the addresses for all accounts in this keyring.\n *\n * @returns A list of the account addresses for this keyring\n */\n getAccounts(): Promise<Hex[]>;\n\n /**\n * Add an account to the keyring.\n *\n * @param number - The number of accounts to add. Usually defaults to 1.\n * @returns A list of the newly added account addresses.\n */\n addAccounts(number: number): Promise<Hex[]>;\n\n /**\n * Serialize the keyring state as a JSON-serializable object.\n *\n * @returns A JSON-serializable representation of the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Deserialize the given keyring state, overwriting any existing state with\n * the serialized state provided.\n *\n * @param state - A JSON-serializable representation of the keyring state.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Method to include asynchronous configuration.\n */\n init?(): Promise<void>;\n\n /**\n * Remove an account from the keyring.\n *\n * @param address - The address of the account to remove.\n */\n removeAccount?(address: Hex): void;\n\n /**\n * Export the private key for one of the keyring accounts.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter is used to allow exporting a\n * private key that is derived from the given account, rather than exporting\n * that account's private key directly.\n *\n * @param address - The address of the account to export.\n * @param options - Export options; differs between keyrings.\n * @returns The non-prefixed, hex-encoded private key that was requested.\n */\n exportAccount?(\n address: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get the \"app key\" address for the given account and origin. An app key is\n * an application-specific key pair. See {@link https://eips.ethereum.org/EIPS/eip-1775|EIP-1775}\n * for more information. The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin|origin}\n * is used as the unique identifier for the application, and it's used as\n * part of the key derivation process.\n *\n * @param address - The address of the account the app key is derived from.\n * @param origin - The origin of the application.\n * @returns The address of the app key for the given account and origin.\n */\n getAppKeyAddress?(address: Hex, origin: string): Promise<Hex>;\n\n /**\n * Sign a transaction. This is equivalent to the `eth_signTransaction`\n * Ethereum JSON-RPC method. See the Ethereum JSON-RPC API documentation for\n * more details.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param transaction - The transaction to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed transaction.\n */\n signTransaction?(\n address: Hex,\n transaction: TypedTransaction,\n options?: Record<string, unknown>,\n ): Promise<TypedTxData>;\n\n /**\n * Sign a message. This is equivalent to an older version of the the\n * `eth_sign` Ethereum JSON-RPC method. The message is signed using ECDSA,\n * using the curve secp256k1 the Keccak-256 hash function.\n *\n * For more information about this method and why we still support it, see\n * the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signMessage?(\n address: Hex,\n message: string,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign an EIP-7702 authorization. This is a signing method for authorizing a\n * specific contract on a specific chain.\n *\n * @param address - The address of the account to use for signing.\n * @param authorization - An array containing the chain ID, contract address,\n * and nonce.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed authorization as a hex string.\n */\n signEip7702Authorization?(\n address: Hex,\n authorization: [chainId: number, contractAddress: Hex, nonce: number],\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_sign` Ethereum JSON-RPC\n * method, which is exposed by MetaMask as the method `personal_sign`. See\n * the Ethereum JSON-RPC API documentation for more details.\n *\n * For more information about this method and why we call it `personal_sign`,\n * see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signPersonalMessage?(\n address: Hex,\n message: Hex,\n options?: { version?: string } & Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_signTypedData` Ethereum\n * JSON-RPC method. See {@link https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md|EIP-712}\n * for more details.\n *\n * The \"version\" option dictates which version of `eth_signTypedData` is\n * used. The latest version reflects the specification most closely, whereas\n * earlier versions reflect earlier drafts of the specification that are\n * still supported for backwards-compatibility reasons. For more information\n * about why we support multiple versions, see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept additional options as well. See the documentation for\n * the specific keyring for more information about what these options are.\n * For some keyrings, the options parameter can even change which key is used\n * for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param typedData - The data to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signTypedData?(\n address: Hex,\n typedData: unknown[] | Record<string, unknown>,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get a public key to use for encryption. This is equivalent to the\n * ` eth_getEncryptionPublicKey` JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-getencryptionpublickey|MetaMask Docs}\n * for more information.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used (e.g. encrypting with app keys).\n *\n * @param account - The address of the account you want the encryption key for.\n * @param options - Options; differs between keyrings.\n */\n getEncryptionPublicKey?(\n account: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Decrypt an encrypted message. This is equivalent to the ` eth_decrypt`\n * JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-decrypt|MetaMask Docs}\n * for more information.\n *\n * @param account - The address of the account you want to use to decrypt\n * the message.\n * @param encryptedData - The encrypted data that you want to decrypt.\n * @returns The decrypted data.\n */\n decryptMessage?(\n account: Hex,\n encryptedData: Eip1024EncryptedData,\n ): Promise<string>;\n\n /**\n * Generates the properties for the keyring based on the given\n * BIP39-compliant mnemonic.\n *\n * @returns A promise resolving when the keyring has generated the properties.\n */\n generateRandomMnemonic?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n */\n destroy?(): Promise<void>;\n};\n"]}
1
+ {"version":3,"file":"keyring.mjs","sourceRoot":"","sources":["../src/keyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedTransaction, TypedTxData } from '@ethereumjs/tx';\nimport type { Eip1024EncryptedData, Hex, Json } from '@metamask/utils';\n\n/**\n * A Keyring class.\n *\n * This type is used to validate the constructor signature and the `type`\n * static property on Keyring classes. See the {@link Keyring} type for more\n * information.\n */\nexport type KeyringClass = {\n /**\n * The Keyring constructor. Takes a single parameter, an \"options\" object.\n * See the documentation for the specific keyring for more information about\n * what these options are.\n *\n * @param options - The constructor options. Differs between keyring\n * implementations.\n */\n new (options?: Record<string, unknown>): Keyring;\n\n /**\n * The name of this type of keyring. This must uniquely identify the\n * keyring type.\n */\n type: string;\n};\n\n/**\n * A keyring is something that can sign messages. Keyrings are used to add new\n * signing strategies; each strategy is a new keyring.\n *\n * Each keyring manages a collection of key pairs, which we call \"accounts\".\n * Each account is referred to by its \"address\", which is a unique identifier\n * derived from the public key. The address is always a \"0x\"-prefixed\n * hexidecimal string.\n *\n * The keyring might store the private key for each account as well, but it's\n * not guaranteed. Some keyrings delegate signing, so they don't need the\n * private key directly. The keyring (and in particular the keyring state)\n * should be treated with care though, just in case it does contain sensitive\n * material such as a private key.\n */\nexport type Keyring = {\n /**\n * The name of this type of keyring. This must match the `type` property of\n * the keyring class.\n */\n type: string;\n\n /**\n * Get the addresses for all accounts in this keyring.\n *\n * @returns A list of the account addresses for this keyring\n */\n getAccounts(): Promise<Hex[]>;\n\n /**\n * Add an account to the keyring.\n *\n * @param number - The number of accounts to add. Usually defaults to 1.\n * @returns A list of the newly added account addresses.\n */\n addAccounts(number: number): Promise<Hex[]>;\n\n /**\n * Serialize the keyring state as a JSON-serializable object.\n *\n * @returns A JSON-serializable representation of the keyring state.\n */\n serialize(): Promise<Json>;\n\n /**\n * Deserialize the given keyring state, overwriting any existing state with\n * the serialized state provided.\n *\n * @param state - A JSON-serializable representation of the keyring state.\n */\n deserialize(state: Json): Promise<void>;\n\n /**\n * Method to include asynchronous configuration.\n */\n init?(): Promise<void>;\n\n /**\n * Remove an account from the keyring.\n *\n * @param address - The address of the account to remove.\n */\n removeAccount?(address: Hex): void;\n\n /**\n * Export the private key for one of the keyring accounts.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter is used to allow exporting a\n * private key that is derived from the given account, rather than exporting\n * that account's private key directly.\n *\n * @param address - The address of the account to export.\n * @param options - Export options; differs between keyrings.\n * @returns The non-prefixed, hex-encoded private key that was requested.\n */\n exportAccount?(\n address: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get the \"app key\" address for the given account and origin. An app key is\n * an application-specific key pair. See {@link https://eips.ethereum.org/EIPS/eip-1775|EIP-1775}\n * for more information. The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin|origin}\n * is used as the unique identifier for the application, and it's used as\n * part of the key derivation process.\n *\n * @param address - The address of the account the app key is derived from.\n * @param origin - The origin of the application.\n * @returns The address of the app key for the given account and origin.\n */\n getAppKeyAddress?(address: Hex, origin: string): Promise<Hex>;\n\n /**\n * Sign a transaction. This is equivalent to the `eth_signTransaction`\n * Ethereum JSON-RPC method. See the Ethereum JSON-RPC API documentation for\n * more details.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param transaction - The transaction to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed transaction.\n */\n signTransaction?(\n address: Hex,\n transaction: TypedTransaction,\n options?: Record<string, unknown>,\n ): Promise<TypedTxData>;\n\n /**\n * Sign a message. This is equivalent to an older version of the the\n * `eth_sign` Ethereum JSON-RPC method. The message is signed using ECDSA,\n * using the curve secp256k1 the Keccak-256 hash function.\n *\n * For more information about this method and why we still support it, see\n * the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signMessage?(\n address: Hex,\n message: string,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign an EIP-7702 authorization. This is a signing method for authorizing a\n * specific contract on a specific chain.\n *\n * @param address - The address of the account to use for signing.\n * @param authorization - An array containing the chain ID, contract address,\n * and nonce.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed authorization as a hex string.\n */\n signEip7702Authorization?(\n address: Hex,\n authorization: [chainId: number, contractAddress: Hex, nonce: number],\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_sign` Ethereum JSON-RPC\n * method, which is exposed by MetaMask as the method `personal_sign`. See\n * the Ethereum JSON-RPC API documentation for more details.\n *\n * For more information about this method and why we call it `personal_sign`,\n * see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param message - The message to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signPersonalMessage?(\n address: Hex,\n message: Hex,\n options?: { version?: string } & Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Sign a message. This is equivalent to the `eth_signTypedData` Ethereum\n * JSON-RPC method. See {@link https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md|EIP-712}\n * for more details.\n *\n * The \"version\" option dictates which version of `eth_signTypedData` is\n * used. The latest version reflects the specification most closely, whereas\n * earlier versions reflect earlier drafts of the specification that are\n * still supported for backwards-compatibility reasons. For more information\n * about why we support multiple versions, see the {@link https://docs.metamask.io/guide/signing-data.html|MetaMask Docs}.\n *\n * Some keyrings accept additional options as well. See the documentation for\n * the specific keyring for more information about what these options are.\n * For some keyrings, the options parameter can even change which key is used\n * for signing (e.g. signing with app keys).\n *\n * @param address - The address of the account to use for signing.\n * @param typedData - The data to sign.\n * @param options - Signing options; differs between keyrings.\n * @returns The signed message.\n */\n signTypedData?(\n address: Hex,\n typedData: unknown[] | Record<string, unknown>,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Get a public key to use for encryption. This is equivalent to the\n * ` eth_getEncryptionPublicKey` JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-getencryptionpublickey|MetaMask Docs}\n * for more information.\n *\n * Some keyrings accept an \"options\" parameter as well. See the documentation\n * for the specific keyring for more information about what these options\n * are. For some keyrings, the options parameter can even change which key is\n * used (e.g. encrypting with app keys).\n *\n * @param account - The address of the account you want the encryption key for.\n * @param options - Options; differs between keyrings.\n */\n getEncryptionPublicKey?(\n account: Hex,\n options?: Record<string, unknown>,\n ): Promise<string>;\n\n /**\n * Decrypt an encrypted message. This is equivalent to the ` eth_decrypt`\n * JSON-RPC method. See the {@link https://docs.metamask.io/guide/rpc-api.html#eth-decrypt|MetaMask Docs}\n * for more information.\n *\n * @param account - The address of the account you want to use to decrypt\n * the message.\n * @param encryptedData - The encrypted data that you want to decrypt.\n * @returns The decrypted data.\n */\n decryptMessage?(\n account: Hex,\n encryptedData: Eip1024EncryptedData,\n ): Promise<string>;\n\n /**\n * Generates the properties for the keyring based on the given\n * BIP39-compliant mnemonic.\n *\n * @returns A promise resolving when the keyring has generated the properties.\n */\n generateRandomMnemonic?(): Promise<void>;\n\n /**\n * Destroy the keyring.\n */\n destroy?(): Promise<void>;\n};\n\n/**\n * The legacy `Keyring` is Ethereum only, so we can alias it here for better\n * clarity.\n */\nexport type EthKeyring = Keyring;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/keyring-utils",
3
- "version": "3.1.0-fc46964",
3
+ "version": "3.2.0-fd40efd",
4
4
  "description": "MetaMask Keyring utils",
5
5
  "keywords": [
6
6
  "metamask",
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROTO_CMD_001 = exports.SYS_FIRMWARE_002 = exports.SYS_FIRMWARE_001 = exports.SYS_LICENSE_001 = exports.SYS_FILE_002 = exports.SYS_FILE_001 = exports.SYS_MEMORY_002 = exports.SYS_MEMORY_001 = exports.SYS_INTERNAL_001 = exports.CRYPTO_ENTROPY_001 = exports.CRYPTO_KEY_001 = exports.CRYPTO_ALGO_001 = exports.CRYPTO_SIGN_001 = exports.DATA_NOTFOUND_003 = exports.DATA_NOTFOUND_002 = exports.DATA_NOTFOUND_001 = exports.DATA_VALIDATION_002 = exports.DATA_VALIDATION_001 = exports.DATA_MISSING_001 = exports.DATA_FORMAT_003 = exports.DATA_FORMAT_002 = exports.DATA_FORMAT_001 = exports.CONN_BLOCKED_001 = exports.CONN_TIMEOUT_001 = exports.CONN_SUITE_001 = exports.CONN_IFRAME_001 = exports.CONN_CLOSED_001 = exports.CONN_TRANSPORT_001 = exports.DEVICE_MODE_001 = exports.DEVICE_CAP_002 = exports.DEVICE_CAP_001 = exports.DEVICE_DETECT_001 = exports.DEVICE_STATE_005 = exports.DEVICE_STATE_004 = exports.DEVICE_STATE_003 = exports.DEVICE_STATE_002 = exports.DEVICE_STATE_001 = exports.USER_CONFIRM_001 = exports.USER_INPUT_001 = exports.USER_CANCEL_002 = exports.USER_CANCEL_001 = exports.AUTH_WIPE_001 = exports.AUTH_SEC_002 = exports.AUTH_SEC_001 = exports.AUTH_LOCK_002 = exports.AUTH_LOCK_001 = exports.AUTH_PIN_004 = exports.AUTH_PIN_003 = exports.AUTH_PIN_002 = exports.AUTH_PIN_001 = void 0;
4
- exports.UNKNOWN_001 = exports.SUCCESS_000 = exports.TX_FAIL_001 = exports.TX_FUNDS_001 = exports.CONFIG_METHOD_001 = exports.CONFIG_PERM_001 = exports.CONFIG_INIT_003 = exports.CONFIG_INIT_002 = exports.CONFIG_INIT_001 = exports.PROTO_PARAM_001 = exports.PROTO_MSG_001 = exports.PROTO_CMD_003 = exports.PROTO_CMD_002 = void 0;
5
- // Authentication & Security
6
- exports.AUTH_PIN_001 = 'PIN invalid';
7
- exports.AUTH_PIN_002 = 'PIN cancelled by user';
8
- exports.AUTH_PIN_003 = 'PIN attempts remaining';
9
- exports.AUTH_PIN_004 = 'PIN mismatch';
10
- exports.AUTH_LOCK_001 = 'Device is locked';
11
- exports.AUTH_LOCK_002 = 'Device blocked due to failed attempts';
12
- exports.AUTH_SEC_001 = 'Security conditions not satisfied';
13
- exports.AUTH_SEC_002 = 'Access rights insufficient';
14
- exports.AUTH_WIPE_001 = 'Wipe code mismatch';
15
- // User Action
16
- exports.USER_CANCEL_001 = 'User rejected action on device';
17
- exports.USER_CANCEL_002 = 'User cancelled operation';
18
- exports.USER_INPUT_001 = 'User input expected';
19
- exports.USER_CONFIRM_001 = 'User confirmation required';
20
- // Device State
21
- exports.DEVICE_STATE_001 = 'Device not initialized';
22
- exports.DEVICE_STATE_002 = 'Device busy';
23
- exports.DEVICE_STATE_003 = 'Device disconnected';
24
- exports.DEVICE_STATE_004 = 'Device used elsewhere';
25
- exports.DEVICE_STATE_005 = 'Device call in progress';
26
- exports.DEVICE_DETECT_001 = 'Device not found';
27
- exports.DEVICE_CAP_001 = 'Device missing required capability';
28
- exports.DEVICE_CAP_002 = 'Device is BTC-only, operation not supported';
29
- exports.DEVICE_MODE_001 = 'Invalid device mode';
30
- // Connection & Transport
31
- exports.CONN_TRANSPORT_001 = 'Transport layer missing';
32
- exports.CONN_CLOSED_001 = 'Connection closed unexpectedly';
33
- exports.CONN_IFRAME_001 = 'Unable to establish iframe connection';
34
- exports.CONN_SUITE_001 = 'Unable to connect to Suite';
35
- exports.CONN_TIMEOUT_001 = 'Connection timeout';
36
- exports.CONN_BLOCKED_001 = 'Connection blocked';
37
- // Data & Validation
38
- exports.DATA_FORMAT_001 = 'Incorrect data length';
39
- exports.DATA_FORMAT_002 = 'Invalid data received';
40
- exports.DATA_FORMAT_003 = 'Invalid parameter';
41
- exports.DATA_MISSING_001 = 'Missing critical parameter';
42
- exports.DATA_VALIDATION_001 = 'Address mismatch';
43
- exports.DATA_VALIDATION_002 = 'Invalid signature';
44
- exports.DATA_NOTFOUND_001 = 'Referenced data not found';
45
- exports.DATA_NOTFOUND_002 = 'File not found';
46
- exports.DATA_NOTFOUND_003 = 'Coin not found';
47
- // Cryptographic Operations
48
- exports.CRYPTO_SIGN_001 = 'Signature operation failed';
49
- exports.CRYPTO_ALGO_001 = 'Algorithm not supported';
50
- exports.CRYPTO_KEY_001 = 'Invalid key check value';
51
- exports.CRYPTO_ENTROPY_001 = 'Entropy check failed';
52
- // System & Internal
53
- exports.SYS_INTERNAL_001 = 'Internal device error';
54
- exports.SYS_MEMORY_001 = 'Not enough memory';
55
- exports.SYS_MEMORY_002 = 'Memory problem';
56
- exports.SYS_FILE_001 = 'File system error';
57
- exports.SYS_FILE_002 = 'Inconsistent file';
58
- exports.SYS_LICENSE_001 = 'Licensing error';
59
- exports.SYS_FIRMWARE_001 = 'Firmware error';
60
- exports.SYS_FIRMWARE_002 = 'Firmware installation failed';
61
- // Command & Protocol
62
- exports.PROTO_CMD_001 = 'Command not supported';
63
- exports.PROTO_CMD_002 = 'Command incompatible';
64
- exports.PROTO_CMD_003 = 'Unexpected message';
65
- exports.PROTO_MSG_001 = 'Invalid APDU command';
66
- exports.PROTO_PARAM_001 = 'Invalid command parameters';
67
- // Configuration & Initialization
68
- exports.CONFIG_INIT_001 = 'Not initialized';
69
- exports.CONFIG_INIT_002 = 'Already initialized';
70
- exports.CONFIG_INIT_003 = 'Manifest missing';
71
- exports.CONFIG_PERM_001 = 'Permissions not granted';
72
- exports.CONFIG_METHOD_001 = 'Method not allowed';
73
- // Transaction
74
- exports.TX_FUNDS_001 = 'Insufficient funds';
75
- exports.TX_FAIL_001 = 'Transaction failed';
76
- // Success
77
- exports.SUCCESS_000 = 'Operation successful';
78
- // Unknown/Fallback
79
- exports.UNKNOWN_001 = 'Unknown error';
80
- //# sourceMappingURL=hardware-error-codes.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hardware-error-codes.cjs","sourceRoot":"","sources":["../src/hardware-error-codes.ts"],"names":[],"mappings":";;;;AAAA,4BAA4B;AACf,QAAA,YAAY,GAAG,aAAa,CAAC;AAC7B,QAAA,YAAY,GAAG,uBAAuB,CAAC;AACvC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,aAAa,GAAG,kBAAkB,CAAC;AACnC,QAAA,aAAa,GAAG,uCAAuC,CAAC;AACxD,QAAA,YAAY,GAAG,mCAAmC,CAAC;AACnD,QAAA,YAAY,GAAG,4BAA4B,CAAC;AAC5C,QAAA,aAAa,GAAG,oBAAoB,CAAC;AAElD,cAAc;AACD,QAAA,eAAe,GAAG,gCAAgC,CAAC;AACnD,QAAA,eAAe,GAAG,0BAA0B,CAAC;AAC7C,QAAA,cAAc,GAAG,qBAAqB,CAAC;AACvC,QAAA,gBAAgB,GAAG,4BAA4B,CAAC;AAE7D,eAAe;AACF,QAAA,gBAAgB,GAAG,wBAAwB,CAAC;AAC5C,QAAA,gBAAgB,GAAG,aAAa,CAAC;AACjC,QAAA,gBAAgB,GAAG,qBAAqB,CAAC;AACzC,QAAA,gBAAgB,GAAG,uBAAuB,CAAC;AAC3C,QAAA,gBAAgB,GAAG,yBAAyB,CAAC;AAC7C,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AACvC,QAAA,cAAc,GAAG,oCAAoC,CAAC;AACtD,QAAA,cAAc,GA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G,uBAAuB,CAAC;AACxC,QAAA,aAAa,GAAG,sBAAsB,CAAC;AACvC,QAAA,aAAa,GAAG,oBAAoB,CAAC;AACrC,QAAA,aAAa,GAAG,sBAAsB,CAAC;AACvC,QAAA,eAAe,GAAG,4BAA4B,CAAC;AAE5D,iCAAiC;AACpB,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,eAAe,GAAG,qBAAqB,CAAC;AACxC,QAAA,eAAe,GAAG,kBAAkB,CAAC;AACrC,QAAA,eAAe,GAAG,yBAAyB,CAAC;AAC5C,QAAA,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD,cAAc;AACD,QAAA,YAAY,GAAG,oBAAoB,CAAC;AACpC,QAAA,WAAW,GAAG,oBAAoB,CAAC;AAEhD,UAAU;AACG,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,mBAAmB;AACN,QAAA,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// Authentication & Security\nexport const AUTH_PIN_001 = 'PIN invalid';\nexport const AUTH_PIN_002 = 'PIN cancelled by user';\nexport const AUTH_PIN_003 = 'PIN attempts remaining';\nexport const AUTH_PIN_004 = 'PIN mismatch';\nexport const AUTH_LOCK_001 = 'Device is locked';\nexport const AUTH_LOCK_002 = 'Device blocked due to failed attempts';\nexport const AUTH_SEC_001 = 'Security conditions not satisfied';\nexport const AUTH_SEC_002 = 'Access rights insufficient';\nexport const AUTH_WIPE_001 = 'Wipe code mismatch';\n\n// User Action\nexport const USER_CANCEL_001 = 'User rejected action on device';\nexport const USER_CANCEL_002 = 'User cancelled operation';\nexport const USER_INPUT_001 = 'User input expected';\nexport const USER_CONFIRM_001 = 'User confirmation required';\n\n// Device State\nexport const DEVICE_STATE_001 = 'Device not initialized';\nexport const DEVICE_STATE_002 = 'Device busy';\nexport const DEVICE_STATE_003 = 'Device disconnected';\nexport const DEVICE_STATE_004 = 'Device used elsewhere';\nexport const DEVICE_STATE_005 = 'Device call in progress';\nexport const DEVICE_DETECT_001 = 'Device not found';\nexport const DEVICE_CAP_001 = 'Device missing required capability';\nexport const DEVICE_CAP_002 = 'Device is BTC-only, operation not supported';\nexport const DEVICE_MODE_001 = 'Invalid device mode';\n\n// Connection & Transport\nexport const CONN_TRANSPORT_001 = 'Transport layer missing';\nexport const CONN_CLOSED_001 = 'Connection closed unexpectedly';\nexport const CONN_IFRAME_001 = 'Unable to establish iframe connection';\nexport const CONN_SUITE_001 = 'Unable to connect to Suite';\nexport const CONN_TIMEOUT_001 = 'Connection timeout';\nexport const CONN_BLOCKED_001 = 'Connection blocked';\n\n// Data & Validation\nexport const DATA_FORMAT_001 = 'Incorrect data length';\nexport const DATA_FORMAT_002 = 'Invalid data received';\nexport const DATA_FORMAT_003 = 'Invalid parameter';\nexport const DATA_MISSING_001 = 'Missing critical parameter';\nexport const DATA_VALIDATION_001 = 'Address mismatch';\nexport const DATA_VALIDATION_002 = 'Invalid signature';\nexport const DATA_NOTFOUND_001 = 'Referenced data not found';\nexport const DATA_NOTFOUND_002 = 'File not found';\nexport const DATA_NOTFOUND_003 = 'Coin not found';\n\n// Cryptographic Operations\nexport const CRYPTO_SIGN_001 = 'Signature operation failed';\nexport const CRYPTO_ALGO_001 = 'Algorithm not supported';\nexport const CRYPTO_KEY_001 = 'Invalid key check value';\nexport const CRYPTO_ENTROPY_001 = 'Entropy check failed';\n\n// System & Internal\nexport const SYS_INTERNAL_001 = 'Internal device error';\nexport const SYS_MEMORY_001 = 'Not enough memory';\nexport const SYS_MEMORY_002 = 'Memory problem';\nexport const SYS_FILE_001 = 'File system error';\nexport const SYS_FILE_002 = 'Inconsistent file';\nexport const SYS_LICENSE_001 = 'Licensing error';\nexport const SYS_FIRMWARE_001 = 'Firmware error';\nexport const SYS_FIRMWARE_002 = 'Firmware installation failed';\n\n// Command & Protocol\nexport const PROTO_CMD_001 = 'Command not supported';\nexport const PROTO_CMD_002 = 'Command incompatible';\nexport const PROTO_CMD_003 = 'Unexpected message';\nexport const PROTO_MSG_001 = 'Invalid APDU command';\nexport const PROTO_PARAM_001 = 'Invalid command parameters';\n\n// Configuration & Initialization\nexport const CONFIG_INIT_001 = 'Not initialized';\nexport const CONFIG_INIT_002 = 'Already initialized';\nexport const CONFIG_INIT_003 = 'Manifest missing';\nexport const CONFIG_PERM_001 = 'Permissions not granted';\nexport const CONFIG_METHOD_001 = 'Method not allowed';\n\n// Transaction\nexport const TX_FUNDS_001 = 'Insufficient funds';\nexport const TX_FAIL_001 = 'Transaction failed';\n\n// Success\nexport const SUCCESS_000 = 'Operation successful';\n\n// Unknown/Fallback\nexport const UNKNOWN_001 = 'Unknown error';\n"]}
@@ -1,64 +0,0 @@
1
- export declare const AUTH_PIN_001 = "PIN invalid";
2
- export declare const AUTH_PIN_002 = "PIN cancelled by user";
3
- export declare const AUTH_PIN_003 = "PIN attempts remaining";
4
- export declare const AUTH_PIN_004 = "PIN mismatch";
5
- export declare const AUTH_LOCK_001 = "Device is locked";
6
- export declare const AUTH_LOCK_002 = "Device blocked due to failed attempts";
7
- export declare const AUTH_SEC_001 = "Security conditions not satisfied";
8
- export declare const AUTH_SEC_002 = "Access rights insufficient";
9
- export declare const AUTH_WIPE_001 = "Wipe code mismatch";
10
- export declare const USER_CANCEL_001 = "User rejected action on device";
11
- export declare const USER_CANCEL_002 = "User cancelled operation";
12
- export declare const USER_INPUT_001 = "User input expected";
13
- export declare const USER_CONFIRM_001 = "User confirmation required";
14
- export declare const DEVICE_STATE_001 = "Device not initialized";
15
- export declare const DEVICE_STATE_002 = "Device busy";
16
- export declare const DEVICE_STATE_003 = "Device disconnected";
17
- export declare const DEVICE_STATE_004 = "Device used elsewhere";
18
- export declare const DEVICE_STATE_005 = "Device call in progress";
19
- export declare const DEVICE_DETECT_001 = "Device not found";
20
- export declare const DEVICE_CAP_001 = "Device missing required capability";
21
- export declare const DEVICE_CAP_002 = "Device is BTC-only, operation not supported";
22
- export declare const DEVICE_MODE_001 = "Invalid device mode";
23
- export declare const CONN_TRANSPORT_001 = "Transport layer missing";
24
- export declare const CONN_CLOSED_001 = "Connection closed unexpectedly";
25
- export declare const CONN_IFRAME_001 = "Unable to establish iframe connection";
26
- export declare const CONN_SUITE_001 = "Unable to connect to Suite";
27
- export declare const CONN_TIMEOUT_001 = "Connection timeout";
28
- export declare const CONN_BLOCKED_001 = "Connection blocked";
29
- export declare const DATA_FORMAT_001 = "Incorrect data length";
30
- export declare const DATA_FORMAT_002 = "Invalid data received";
31
- export declare const DATA_FORMAT_003 = "Invalid parameter";
32
- export declare const DATA_MISSING_001 = "Missing critical parameter";
33
- export declare const DATA_VALIDATION_001 = "Address mismatch";
34
- export declare const DATA_VALIDATION_002 = "Invalid signature";
35
- export declare const DATA_NOTFOUND_001 = "Referenced data not found";
36
- export declare const DATA_NOTFOUND_002 = "File not found";
37
- export declare const DATA_NOTFOUND_003 = "Coin not found";
38
- export declare const CRYPTO_SIGN_001 = "Signature operation failed";
39
- export declare const CRYPTO_ALGO_001 = "Algorithm not supported";
40
- export declare const CRYPTO_KEY_001 = "Invalid key check value";
41
- export declare const CRYPTO_ENTROPY_001 = "Entropy check failed";
42
- export declare const SYS_INTERNAL_001 = "Internal device error";
43
- export declare const SYS_MEMORY_001 = "Not enough memory";
44
- export declare const SYS_MEMORY_002 = "Memory problem";
45
- export declare const SYS_FILE_001 = "File system error";
46
- export declare const SYS_FILE_002 = "Inconsistent file";
47
- export declare const SYS_LICENSE_001 = "Licensing error";
48
- export declare const SYS_FIRMWARE_001 = "Firmware error";
49
- export declare const SYS_FIRMWARE_002 = "Firmware installation failed";
50
- export declare const PROTO_CMD_001 = "Command not supported";
51
- export declare const PROTO_CMD_002 = "Command incompatible";
52
- export declare const PROTO_CMD_003 = "Unexpected message";
53
- export declare const PROTO_MSG_001 = "Invalid APDU command";
54
- export declare const PROTO_PARAM_001 = "Invalid command parameters";
55
- export declare const CONFIG_INIT_001 = "Not initialized";
56
- export declare const CONFIG_INIT_002 = "Already initialized";
57
- export declare const CONFIG_INIT_003 = "Manifest missing";
58
- export declare const CONFIG_PERM_001 = "Permissions not granted";
59
- export declare const CONFIG_METHOD_001 = "Method not allowed";
60
- export declare const TX_FUNDS_001 = "Insufficient funds";
61
- export declare const TX_FAIL_001 = "Transaction failed";
62
- export declare const SUCCESS_000 = "Operation successful";
63
- export declare const UNKNOWN_001 = "Unknown error";
64
- //# sourceMappingURL=hardware-error-codes.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hardware-error-codes.d.cts","sourceRoot":"","sources":["../src/hardware-error-codes.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,YAAY,2BAA2B,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAChD,eAAO,MAAM,aAAa,0CAA0C,CAAC;AACrE,eAAO,MAAM,YAAY,sCAAsC,CAAC;AAChE,eAAO,MAAM,YAAY,+BAA+B,CAAC;AACzD,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAGlD,eAAO,MAAM,eAAe,mCAAmC,CAAC;AAChE,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD,eAAO,MAAM,gBAAgB,+BAA+B,CAAC;AAG7D,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,eAAO,MAAM,cAAc,gDAAgD,CAAC;AAC5E,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAGrD,eAAO,MAAM,kBAAkB,4BAA4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A+B,CAAC;AAG5D,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,eAAe,4BAA4B,CAAC;AACzD,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAGtD,eAAO,MAAM,YAAY,uBAAuB,CAAC;AACjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAGhD,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAGlD,eAAO,MAAM,WAAW,kBAAkB,CAAC"}
@@ -1,64 +0,0 @@
1
- export declare const AUTH_PIN_001 = "PIN invalid";
2
- export declare const AUTH_PIN_002 = "PIN cancelled by user";
3
- export declare const AUTH_PIN_003 = "PIN attempts remaining";
4
- export declare const AUTH_PIN_004 = "PIN mismatch";
5
- export declare const AUTH_LOCK_001 = "Device is locked";
6
- export declare const AUTH_LOCK_002 = "Device blocked due to failed attempts";
7
- export declare const AUTH_SEC_001 = "Security conditions not satisfied";
8
- export declare const AUTH_SEC_002 = "Access rights insufficient";
9
- export declare const AUTH_WIPE_001 = "Wipe code mismatch";
10
- export declare const USER_CANCEL_001 = "User rejected action on device";
11
- export declare const USER_CANCEL_002 = "User cancelled operation";
12
- export declare const USER_INPUT_001 = "User input expected";
13
- export declare const USER_CONFIRM_001 = "User confirmation required";
14
- export declare const DEVICE_STATE_001 = "Device not initialized";
15
- export declare const DEVICE_STATE_002 = "Device busy";
16
- export declare const DEVICE_STATE_003 = "Device disconnected";
17
- export declare const DEVICE_STATE_004 = "Device used elsewhere";
18
- export declare const DEVICE_STATE_005 = "Device call in progress";
19
- export declare const DEVICE_DETECT_001 = "Device not found";
20
- export declare const DEVICE_CAP_001 = "Device missing required capability";
21
- export declare const DEVICE_CAP_002 = "Device is BTC-only, operation not supported";
22
- export declare const DEVICE_MODE_001 = "Invalid device mode";
23
- export declare const CONN_TRANSPORT_001 = "Transport layer missing";
24
- export declare const CONN_CLOSED_001 = "Connection closed unexpectedly";
25
- export declare const CONN_IFRAME_001 = "Unable to establish iframe connection";
26
- export declare const CONN_SUITE_001 = "Unable to connect to Suite";
27
- export declare const CONN_TIMEOUT_001 = "Connection timeout";
28
- export declare const CONN_BLOCKED_001 = "Connection blocked";
29
- export declare const DATA_FORMAT_001 = "Incorrect data length";
30
- export declare const DATA_FORMAT_002 = "Invalid data received";
31
- export declare const DATA_FORMAT_003 = "Invalid parameter";
32
- export declare const DATA_MISSING_001 = "Missing critical parameter";
33
- export declare const DATA_VALIDATION_001 = "Address mismatch";
34
- export declare const DATA_VALIDATION_002 = "Invalid signature";
35
- export declare const DATA_NOTFOUND_001 = "Referenced data not found";
36
- export declare const DATA_NOTFOUND_002 = "File not found";
37
- export declare const DATA_NOTFOUND_003 = "Coin not found";
38
- export declare const CRYPTO_SIGN_001 = "Signature operation failed";
39
- export declare const CRYPTO_ALGO_001 = "Algorithm not supported";
40
- export declare const CRYPTO_KEY_001 = "Invalid key check value";
41
- export declare const CRYPTO_ENTROPY_001 = "Entropy check failed";
42
- export declare const SYS_INTERNAL_001 = "Internal device error";
43
- export declare const SYS_MEMORY_001 = "Not enough memory";
44
- export declare const SYS_MEMORY_002 = "Memory problem";
45
- export declare const SYS_FILE_001 = "File system error";
46
- export declare const SYS_FILE_002 = "Inconsistent file";
47
- export declare const SYS_LICENSE_001 = "Licensing error";
48
- export declare const SYS_FIRMWARE_001 = "Firmware error";
49
- export declare const SYS_FIRMWARE_002 = "Firmware installation failed";
50
- export declare const PROTO_CMD_001 = "Command not supported";
51
- export declare const PROTO_CMD_002 = "Command incompatible";
52
- export declare const PROTO_CMD_003 = "Unexpected message";
53
- export declare const PROTO_MSG_001 = "Invalid APDU command";
54
- export declare const PROTO_PARAM_001 = "Invalid command parameters";
55
- export declare const CONFIG_INIT_001 = "Not initialized";
56
- export declare const CONFIG_INIT_002 = "Already initialized";
57
- export declare const CONFIG_INIT_003 = "Manifest missing";
58
- export declare const CONFIG_PERM_001 = "Permissions not granted";
59
- export declare const CONFIG_METHOD_001 = "Method not allowed";
60
- export declare const TX_FUNDS_001 = "Insufficient funds";
61
- export declare const TX_FAIL_001 = "Transaction failed";
62
- export declare const SUCCESS_000 = "Operation successful";
63
- export declare const UNKNOWN_001 = "Unknown error";
64
- //# sourceMappingURL=hardware-error-codes.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hardware-error-codes.d.mts","sourceRoot":"","sources":["../src/hardware-error-codes.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,YAAY,2BAA2B,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAChD,eAAO,MAAM,aAAa,0CAA0C,CAAC;AACrE,eAAO,MAAM,YAAY,sCAAsC,CAAC;AAChE,eAAO,MAAM,YAAY,+BAA+B,CAAC;AACzD,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAGlD,eAAO,MAAM,eAAe,mCAAmC,CAAC;AAChE,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD,eAAO,MAAM,gBAAgB,+BAA+B,CAAC;AAG7D,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,eAAO,MAAM,cAAc,gDAAgD,CAAC;AAC5E,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAGrD,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAC5D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5D,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,eAAe,4BAA4B,CAAC;AACzD,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAGtD,eAAO,MAAM,YAAY,uBAAuB,CAAC;AACjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAGhD,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAGlD,eAAO,MAAM,WAAW,kBAAkB,CAAC"}
@@ -1,76 +0,0 @@
1
- // Authentication & Security
2
- export const AUTH_PIN_001 = 'PIN invalid';
3
- export const AUTH_PIN_002 = 'PIN cancelled by user';
4
- export const AUTH_PIN_003 = 'PIN attempts remaining';
5
- export const AUTH_PIN_004 = 'PIN mismatch';
6
- export const AUTH_LOCK_001 = 'Device is locked';
7
- export const AUTH_LOCK_002 = 'Device blocked due to failed attempts';
8
- export const AUTH_SEC_001 = 'Security conditions not satisfied';
9
- export const AUTH_SEC_002 = 'Access rights insufficient';
10
- export const AUTH_WIPE_001 = 'Wipe code mismatch';
11
- // User Action
12
- export const USER_CANCEL_001 = 'User rejected action on device';
13
- export const USER_CANCEL_002 = 'User cancelled operation';
14
- export const USER_INPUT_001 = 'User input expected';
15
- export const USER_CONFIRM_001 = 'User confirmation required';
16
- // Device State
17
- export const DEVICE_STATE_001 = 'Device not initialized';
18
- export const DEVICE_STATE_002 = 'Device busy';
19
- export const DEVICE_STATE_003 = 'Device disconnected';
20
- export const DEVICE_STATE_004 = 'Device used elsewhere';
21
- export const DEVICE_STATE_005 = 'Device call in progress';
22
- export const DEVICE_DETECT_001 = 'Device not found';
23
- export const DEVICE_CAP_001 = 'Device missing required capability';
24
- export const DEVICE_CAP_002 = 'Device is BTC-only, operation not supported';
25
- export const DEVICE_MODE_001 = 'Invalid device mode';
26
- // Connection & Transport
27
- export const CONN_TRANSPORT_001 = 'Transport layer missing';
28
- export const CONN_CLOSED_001 = 'Connection closed unexpectedly';
29
- export const CONN_IFRAME_001 = 'Unable to establish iframe connection';
30
- export const CONN_SUITE_001 = 'Unable to connect to Suite';
31
- export const CONN_TIMEOUT_001 = 'Connection timeout';
32
- export const CONN_BLOCKED_001 = 'Connection blocked';
33
- // Data & Validation
34
- export const DATA_FORMAT_001 = 'Incorrect data length';
35
- export const DATA_FORMAT_002 = 'Invalid data received';
36
- export const DATA_FORMAT_003 = 'Invalid parameter';
37
- export const DATA_MISSING_001 = 'Missing critical parameter';
38
- export const DATA_VALIDATION_001 = 'Address mismatch';
39
- export const DATA_VALIDATION_002 = 'Invalid signature';
40
- export const DATA_NOTFOUND_001 = 'Referenced data not found';
41
- export const DATA_NOTFOUND_002 = 'File not found';
42
- export const DATA_NOTFOUND_003 = 'Coin not found';
43
- // Cryptographic Operations
44
- export const CRYPTO_SIGN_001 = 'Signature operation failed';
45
- export const CRYPTO_ALGO_001 = 'Algorithm not supported';
46
- export const CRYPTO_KEY_001 = 'Invalid key check value';
47
- export const CRYPTO_ENTROPY_001 = 'Entropy check failed';
48
- // System & Internal
49
- export const SYS_INTERNAL_001 = 'Internal device error';
50
- export const SYS_MEMORY_001 = 'Not enough memory';
51
- export const SYS_MEMORY_002 = 'Memory problem';
52
- export const SYS_FILE_001 = 'File system error';
53
- export const SYS_FILE_002 = 'Inconsistent file';
54
- export const SYS_LICENSE_001 = 'Licensing error';
55
- export const SYS_FIRMWARE_001 = 'Firmware error';
56
- export const SYS_FIRMWARE_002 = 'Firmware installation failed';
57
- // Command & Protocol
58
- export const PROTO_CMD_001 = 'Command not supported';
59
- export const PROTO_CMD_002 = 'Command incompatible';
60
- export const PROTO_CMD_003 = 'Unexpected message';
61
- export const PROTO_MSG_001 = 'Invalid APDU command';
62
- export const PROTO_PARAM_001 = 'Invalid command parameters';
63
- // Configuration & Initialization
64
- export const CONFIG_INIT_001 = 'Not initialized';
65
- export const CONFIG_INIT_002 = 'Already initialized';
66
- export const CONFIG_INIT_003 = 'Manifest missing';
67
- export const CONFIG_PERM_001 = 'Permissions not granted';
68
- export const CONFIG_METHOD_001 = 'Method not allowed';
69
- // Transaction
70
- export const TX_FUNDS_001 = 'Insufficient funds';
71
- export const TX_FAIL_001 = 'Transaction failed';
72
- // Success
73
- export const SUCCESS_000 = 'Operation successful';
74
- // Unknown/Fallback
75
- export const UNKNOWN_001 = 'Unknown error';
76
- //# sourceMappingURL=hardware-error-codes.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hardware-error-codes.mjs","sourceRoot":"","sources":["../src/hardware-error-codes.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAwB,CAAC;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAChD,MAAM,CAAC,MAAM,aAAa,GAAG,uCAAuC,CAAC;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG,mCAAmC,CAAC;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAElD,cAAc;AACd,MAAM,CAAC,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAC1D,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAE7D,eAAe;AACf,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;A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AAW,GAAG,sBAAsB,CAAC;AAElD,mBAAmB;AACnB,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// Authentication & Security\nexport const AUTH_PIN_001 = 'PIN invalid';\nexport const AUTH_PIN_002 = 'PIN cancelled by user';\nexport const AUTH_PIN_003 = 'PIN attempts remaining';\nexport const AUTH_PIN_004 = 'PIN mismatch';\nexport const AUTH_LOCK_001 = 'Device is locked';\nexport const AUTH_LOCK_002 = 'Device blocked due to failed attempts';\nexport const AUTH_SEC_001 = 'Security conditions not satisfied';\nexport const AUTH_SEC_002 = 'Access rights insufficient';\nexport const AUTH_WIPE_001 = 'Wipe code mismatch';\n\n// User Action\nexport const USER_CANCEL_001 = 'User rejected action on device';\nexport const USER_CANCEL_002 = 'User cancelled operation';\nexport const USER_INPUT_001 = 'User input expected';\nexport const USER_CONFIRM_001 = 'User confirmation required';\n\n// Device State\nexport const DEVICE_STATE_001 = 'Device not initialized';\nexport const DEVICE_STATE_002 = 'Device busy';\nexport const DEVICE_STATE_003 = 'Device disconnected';\nexport const DEVICE_STATE_004 = 'Device used elsewhere';\nexport const DEVICE_STATE_005 = 'Device call in progress';\nexport const DEVICE_DETECT_001 = 'Device not found';\nexport const DEVICE_CAP_001 = 'Device missing required capability';\nexport const DEVICE_CAP_002 = 'Device is BTC-only, operation not supported';\nexport const DEVICE_MODE_001 = 'Invalid device mode';\n\n// Connection & Transport\nexport const CONN_TRANSPORT_001 = 'Transport layer missing';\nexport const CONN_CLOSED_001 = 'Connection closed unexpectedly';\nexport const CONN_IFRAME_001 = 'Unable to establish iframe connection';\nexport const CONN_SUITE_001 = 'Unable to connect to Suite';\nexport const CONN_TIMEOUT_001 = 'Connection timeout';\nexport const CONN_BLOCKED_001 = 'Connection blocked';\n\n// Data & Validation\nexport const DATA_FORMAT_001 = 'Incorrect data length';\nexport const DATA_FORMAT_002 = 'Invalid data received';\nexport const DATA_FORMAT_003 = 'Invalid parameter';\nexport const DATA_MISSING_001 = 'Missing critical parameter';\nexport const DATA_VALIDATION_001 = 'Address mismatch';\nexport const DATA_VALIDATION_002 = 'Invalid signature';\nexport const DATA_NOTFOUND_001 = 'Referenced data not found';\nexport const DATA_NOTFOUND_002 = 'File not found';\nexport const DATA_NOTFOUND_003 = 'Coin not found';\n\n// Cryptographic Operations\nexport const CRYPTO_SIGN_001 = 'Signature operation failed';\nexport const CRYPTO_ALGO_001 = 'Algorithm not supported';\nexport const CRYPTO_KEY_001 = 'Invalid key check value';\nexport const CRYPTO_ENTROPY_001 = 'Entropy check failed';\n\n// System & Internal\nexport const SYS_INTERNAL_001 = 'Internal device error';\nexport const SYS_MEMORY_001 = 'Not enough memory';\nexport const SYS_MEMORY_002 = 'Memory problem';\nexport const SYS_FILE_001 = 'File system error';\nexport const SYS_FILE_002 = 'Inconsistent file';\nexport const SYS_LICENSE_001 = 'Licensing error';\nexport const SYS_FIRMWARE_001 = 'Firmware error';\nexport const SYS_FIRMWARE_002 = 'Firmware installation failed';\n\n// Command & Protocol\nexport const PROTO_CMD_001 = 'Command not supported';\nexport const PROTO_CMD_002 = 'Command incompatible';\nexport const PROTO_CMD_003 = 'Unexpected message';\nexport const PROTO_MSG_001 = 'Invalid APDU command';\nexport const PROTO_PARAM_001 = 'Invalid command parameters';\n\n// Configuration & Initialization\nexport const CONFIG_INIT_001 = 'Not initialized';\nexport const CONFIG_INIT_002 = 'Already initialized';\nexport const CONFIG_INIT_003 = 'Manifest missing';\nexport const CONFIG_PERM_001 = 'Permissions not granted';\nexport const CONFIG_METHOD_001 = 'Method not allowed';\n\n// Transaction\nexport const TX_FUNDS_001 = 'Insufficient funds';\nexport const TX_FAIL_001 = 'Transaction failed';\n\n// Success\nexport const SUCCESS_000 = 'Operation successful';\n\n// Unknown/Fallback\nexport const UNKNOWN_001 = 'Unknown error';\n"]}