@metamask/keyring-api 3.0.0 → 4.0.1

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.1]
11
+
12
+ ### Changed
13
+
14
+ - Bump @metamask/providers to 15.0.0, @metamask/snaps-sdk to ^3.1.0 and @@metamask/utils to ^8.3.0([#266](https://github.com/MetaMask/keyring-api/pull/266))
15
+ - Bump @metamask/json-rpc-engine from 7.3.2 to 7.3.3 ([#264](https://github.com/MetaMask/keyring-api/pull/264))
16
+ - Bump @metamask/snaps-sdk from 3.0.0 to 3.0.1 ([#261](https://github.com/MetaMask/keyring-api/pull/261))
17
+ - Bump @metamask/snaps-sdk from 1.4.0 to 3.0.0 ([#259](https://github.com/MetaMask/keyring-api/pull/259))
18
+ - Bump @metamask/rpc-errors from 6.1.0 to 6.2.1 ([#258](https://github.com/MetaMask/keyring-api/pull/258))
19
+
20
+ ## [4.0.0]
21
+
22
+ ### Changed
23
+
24
+ - **BREAKING** Update node min version to 18.x ([#247](https://github.com/MetaMask/keyring-api/pull/247))
25
+ - Update `eth_patchUserOperation` to return optional gas limit values ([#250](https://github.com/MetaMask/keyring-api/pull/250))
26
+ - Bump `ip` from 2.0.0 to 2.0.1 ([#253](https://github.com/MetaMask/keyring-api/pull/253))
27
+ - Bump `@metamask/json-rpc-engine` from 7.3.1 to 7.3.2 ([#246](https://github.com/MetaMask/keyring-api/pull/246))
28
+ - Bump `@metamask/snaps-sdk` from 1.3.2 to 1.4.0 ([#243](https://github.com/MetaMask/keyring-api/pull/243))
29
+
10
30
  ## [3.0.0]
11
31
 
12
32
  ### Changed
@@ -207,7 +227,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
207
227
  - SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
208
228
  - Helper functions to create keyring handler in the snap.
209
229
 
210
- [Unreleased]: https://github.com/MetaMask/keyring-api/compare/v3.0.0...HEAD
230
+ [Unreleased]: https://github.com/MetaMask/keyring-api/compare/v4.0.1...HEAD
231
+ [4.0.1]: https://github.com/MetaMask/keyring-api/compare/v4.0.0...v4.0.1
232
+ [4.0.0]: https://github.com/MetaMask/keyring-api/compare/v3.0.0...v4.0.0
211
233
  [3.0.0]: https://github.com/MetaMask/keyring-api/compare/v2.0.0...v3.0.0
212
234
  [2.0.0]: https://github.com/MetaMask/keyring-api/compare/v1.1.0...v2.0.0
213
235
  [1.1.0]: https://github.com/MetaMask/keyring-api/compare/v1.0.0...v1.1.0
@@ -84,7 +84,13 @@ export declare const EthBaseUserOperationStruct: import("superstruct").Struct<{
84
84
  export declare type EthBaseUserOperation = Infer<typeof EthBaseUserOperationStruct>;
85
85
  export declare const EthUserOperationPatchStruct: import("superstruct").Struct<{
86
86
  paymasterAndData: string;
87
+ callGasLimit?: string;
88
+ verificationGasLimit?: string;
89
+ preVerificationGas?: string;
87
90
  }, {
88
91
  paymasterAndData: import("superstruct").Struct<string, null>;
92
+ callGasLimit: import("superstruct").Struct<string | import("../../superstruct").ExactOptionalTag, null>;
93
+ verificationGasLimit: import("superstruct").Struct<string | import("../../superstruct").ExactOptionalTag, null>;
94
+ preVerificationGas: import("superstruct").Struct<string | import("../../superstruct").ExactOptionalTag, null>;
89
95
  }>;
90
96
  export declare type EthUserOperationPatch = Infer<typeof EthUserOperationPatchStruct>;
@@ -54,5 +54,8 @@ exports.EthBaseUserOperationStruct = (0, superstruct_2.object)({
54
54
  });
55
55
  exports.EthUserOperationPatchStruct = (0, superstruct_2.object)({
56
56
  paymasterAndData: types_1.EthBytesStruct,
57
+ callGasLimit: (0, superstruct_2.exactOptional)(types_1.EthUint256Struct),
58
+ verificationGasLimit: (0, superstruct_2.exactOptional)(types_1.EthUint256Struct),
59
+ preVerificationGas: (0, superstruct_2.exactOptional)(types_1.EthUint256Struct),
57
60
  });
58
61
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/eth/erc4337/types.ts"],"names":[],"mappings":";;;AAAA,6CAAiD;AAEjD,mDAA0D;AAC1D,oCAA8E;AAE9E;;;GAGG;AACU,QAAA,sBAAsB,GAAG,IAAA,oBAAM,EAAC;IAC3C,MAAM,EAAE,wBAAgB;IACxB,KAAK,EAAE,wBAAgB;IACvB,QAAQ,EAAE,sBAAc;IACxB,QAAQ,EAAE,sBAAc;IACxB,YAAY,EAAE,wBAAgB;IAC9B,oBAAoB,EAAE,wBAAgB;IACtC,kBAAkB,EAAE,wBAAgB;IACpC,YAAY,EAAE,wBAAgB;IAC9B,oBAAoB,EAAE,wBAAgB;IACtC,gBAAgB,EAAE,sBAAc;IAChC,SAAS,EAAE,sBAAc;CAC1B,CAAC,CAAC;AAIH;;;GAGG;AACU,QAAA,wBAAwB,GAAG,IAAA,oBAAM,EAAC;IAC7C;;OAEG;IACH,EAAE,EAAE,wBAAgB;IAEpB;;OAEG;IACH,KAAK,EAAE,wBAAgB;IAEvB;;OAEG;IACH,IAAI,EAAE,sBAAc;CACrB,CAAC,CAAC;AAIU,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,KAAK,EAAE,wBAAgB;IACvB,QAAQ,EAAE,sBAAc;IACxB,QAAQ,EAAE,sBAAc;IACxB,SAAS,EAAE,IAAA,2BAAa,EACtB,IAAA,oBAAM,EAAC;QACL,YAAY,EAAE,wBAAgB;QAC9B,oBAAoB,EAAE,wBAAgB;QACtC,kBAAkB,EAAE,wBAAgB;KACrC,CAAC,CACH;IACD,qBAAqB,EAAE,sBAAc;IACrC,cAAc,EAAE,sBAAc;IAC9B,UAAU,EAAE,IAAA,oBAAM,GAAE;CACrB,CAAC,CAAC;AAIU,QAAA,2BAA2B,GAAG,IAAA,oBAAM,EAAC;IAChD,gBAAgB,EAAE,sBAAc;CACjC,CAAC,CAAC","sourcesContent":["import { string, type Infer } from 'superstruct';\n\nimport { exactOptional, object } from '../../superstruct';\nimport { EthAddressStruct, EthBytesStruct, EthUint256Struct } from '../types';\n\n/**\n * Struct of a UserOperation as defined by ERC-4337.\n * @see https://eips.ethereum.org/EIPS/eip-4337#definitions\n */\nexport const EthUserOperationStruct = object({\n sender: EthAddressStruct,\n nonce: EthUint256Struct,\n initCode: EthBytesStruct,\n callData: EthBytesStruct,\n callGasLimit: EthUint256Struct,\n verificationGasLimit: EthUint256Struct,\n preVerificationGas: EthUint256Struct,\n maxFeePerGas: EthUint256Struct,\n maxPriorityFeePerGas: EthUint256Struct,\n paymasterAndData: EthBytesStruct,\n signature: EthBytesStruct,\n});\n\nexport type EthUserOperation = Infer<typeof EthUserOperationStruct>;\n\n/**\n * Struct containing the most basic transaction information required to\n * construct a UserOperation.\n */\nexport const EthBaseTransactionStruct = object({\n /**\n * Address of the transaction recipient.\n */\n to: EthAddressStruct,\n\n /**\n * Amount of wei to transfer to the recipient.\n */\n value: EthUint256Struct,\n\n /**\n * Data to pass to the recipient.\n */\n data: EthBytesStruct,\n});\n\nexport type EthBaseTransaction = Infer<typeof EthBaseTransactionStruct>;\n\nexport const EthBaseUserOperationStruct = object({\n nonce: EthUint256Struct,\n initCode: EthBytesStruct,\n callData: EthBytesStruct,\n gasLimits: exactOptional(\n object({\n callGasLimit: EthUint256Struct,\n verificationGasLimit: EthUint256Struct,\n preVerificationGas: EthUint256Struct,\n }),\n ),\n dummyPaymasterAndData: EthBytesStruct,\n dummySignature: EthBytesStruct,\n bundlerUrl: string(),\n});\n\nexport type EthBaseUserOperation = Infer<typeof EthBaseUserOperationStruct>;\n\nexport const EthUserOperationPatchStruct = object({\n paymasterAndData: EthBytesStruct,\n});\n\nexport type EthUserOperationPatch = Infer<typeof EthUserOperationPatchStruct>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/eth/erc4337/types.ts"],"names":[],"mappings":";;;AAAA,6CAAi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AAC;CACpD,CAAC,CAAC","sourcesContent":["import { string, type Infer } from 'superstruct';\n\nimport { exactOptional, object } from '../../superstruct';\nimport { EthAddressStruct, EthBytesStruct, EthUint256Struct } from '../types';\n\n/**\n * Struct of a UserOperation as defined by ERC-4337.\n * @see https://eips.ethereum.org/EIPS/eip-4337#definitions\n */\nexport const EthUserOperationStruct = object({\n sender: EthAddressStruct,\n nonce: EthUint256Struct,\n initCode: EthBytesStruct,\n callData: EthBytesStruct,\n callGasLimit: EthUint256Struct,\n verificationGasLimit: EthUint256Struct,\n preVerificationGas: EthUint256Struct,\n maxFeePerGas: EthUint256Struct,\n maxPriorityFeePerGas: EthUint256Struct,\n paymasterAndData: EthBytesStruct,\n signature: EthBytesStruct,\n});\n\nexport type EthUserOperation = Infer<typeof EthUserOperationStruct>;\n\n/**\n * Struct containing the most basic transaction information required to\n * construct a UserOperation.\n */\nexport const EthBaseTransactionStruct = object({\n /**\n * Address of the transaction recipient.\n */\n to: EthAddressStruct,\n\n /**\n * Amount of wei to transfer to the recipient.\n */\n value: EthUint256Struct,\n\n /**\n * Data to pass to the recipient.\n */\n data: EthBytesStruct,\n});\n\nexport type EthBaseTransaction = Infer<typeof EthBaseTransactionStruct>;\n\nexport const EthBaseUserOperationStruct = object({\n nonce: EthUint256Struct,\n initCode: EthBytesStruct,\n callData: EthBytesStruct,\n gasLimits: exactOptional(\n object({\n callGasLimit: EthUint256Struct,\n verificationGasLimit: EthUint256Struct,\n preVerificationGas: EthUint256Struct,\n }),\n ),\n dummyPaymasterAndData: EthBytesStruct,\n dummySignature: EthBytesStruct,\n bundlerUrl: string(),\n});\n\nexport type EthBaseUserOperation = Infer<typeof EthBaseUserOperationStruct>;\n\nexport const EthUserOperationPatchStruct = object({\n paymasterAndData: EthBytesStruct,\n callGasLimit: exactOptional(EthUint256Struct),\n verificationGasLimit: exactOptional(EthUint256Struct),\n preVerificationGas: exactOptional(EthUint256Struct),\n});\n\nexport type EthUserOperationPatch = Infer<typeof EthUserOperationPatchStruct>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/keyring-api",
3
- "version": "3.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "MetaMask Keyring API",
5
5
  "keywords": [
6
6
  "metamask",
@@ -38,9 +38,9 @@
38
38
  "test:watch": "jest --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@metamask/providers": "^14.0.1",
42
- "@metamask/snaps-sdk": "^1.3.2",
43
- "@metamask/utils": "^8.1.0",
41
+ "@metamask/providers": "^15.0.0",
42
+ "@metamask/snaps-sdk": "^3.1.0",
43
+ "@metamask/utils": "^8.3.0",
44
44
  "@types/uuid": "^9.0.1",
45
45
  "superstruct": "^1.0.3",
46
46
  "uuid": "^9.0.0"
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "packageManager": "yarn@3.2.1",
81
81
  "engines": {
82
- "node": ">=16.0.0"
82
+ "node": "^18.18 || >=20"
83
83
  },
84
84
  "publishConfig": {
85
85
  "access": "public",