@toruslabs/ethereum-controllers 8.14.0 → 8.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ethereumControllers.umd.min.js +1 -1
- package/dist/ethereumControllers.umd.min.js.LICENSE.txt +4 -0
- package/dist/lib.cjs/AccountAbstraction/AccountAbstractionController.js +0 -1
- package/dist/lib.cjs/AccountAbstraction/smartAccounts/MetamaskSmartAccount.js +6 -6
- package/dist/lib.cjs/types/AccountAbstraction/smartAccounts/MetamaskSmartAccount.d.ts +1 -1
- package/dist/lib.cjs/types/utils/interfaces.d.ts +1 -1
- package/dist/lib.esm/AccountAbstraction/AccountAbstractionController.js +0 -1
- package/dist/lib.esm/AccountAbstraction/smartAccounts/MetamaskSmartAccount.js +1 -1
- package/package.json +8 -8
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
30
30
|
|
|
31
|
+
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
32
|
+
|
|
31
33
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
32
34
|
|
|
33
35
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
|
|
37
39
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
38
40
|
|
|
41
|
+
/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
|
|
42
|
+
|
|
39
43
|
/**
|
|
40
44
|
* @license
|
|
41
45
|
* Lodash <https://lodash.com/>
|
|
@@ -130,7 +130,6 @@ class AccountAbstractionController extends baseControllers.BaseController {
|
|
|
130
130
|
throw new Error("Invalid address");
|
|
131
131
|
}
|
|
132
132
|
const txParams = tx;
|
|
133
|
-
// @ts-expect-error TODO: viem types are too deep
|
|
134
133
|
const userOperationParams = {
|
|
135
134
|
account: this.smartAccount,
|
|
136
135
|
calls: [{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
-
var
|
|
5
|
+
var smartAccountsKit = require('@metamask/smart-accounts-kit');
|
|
6
6
|
var constants = require('../../utils/constants.js');
|
|
7
7
|
|
|
8
8
|
class MetamaskSmartAccount {
|
|
@@ -28,21 +28,21 @@ class MetamaskSmartAccount {
|
|
|
28
28
|
client: input.client,
|
|
29
29
|
deploySalt: (_this$options$deployS = (_this$options0 = this.options) === null || _this$options0 === void 0 ? void 0 : _this$options0.deploySalt) !== null && _this$options$deployS !== void 0 ? _this$options$deployS : "0x0"
|
|
30
30
|
};
|
|
31
|
-
const implementation = (_this$options$impleme = (_this$options1 = this.options) === null || _this$options1 === void 0 ? void 0 : _this$options1.implementation) !== null && _this$options$impleme !== void 0 ? _this$options$impleme :
|
|
32
|
-
if (implementation ===
|
|
31
|
+
const implementation = (_this$options$impleme = (_this$options1 = this.options) === null || _this$options1 === void 0 ? void 0 : _this$options1.implementation) !== null && _this$options$impleme !== void 0 ? _this$options$impleme : smartAccountsKit.Implementation.Hybrid;
|
|
32
|
+
if (implementation === smartAccountsKit.Implementation.Hybrid) {
|
|
33
33
|
const params = _objectSpread(_objectSpread({}, baseParams), {}, {
|
|
34
34
|
implementation,
|
|
35
35
|
deployParams: hybridDeployParams,
|
|
36
36
|
signer: hybridSignatory
|
|
37
37
|
});
|
|
38
|
-
return
|
|
39
|
-
} else if (implementation ===
|
|
38
|
+
return smartAccountsKit.toMetaMaskSmartAccount(params);
|
|
39
|
+
} else if (implementation === smartAccountsKit.Implementation.MultiSig) {
|
|
40
40
|
const params = _objectSpread(_objectSpread({}, baseParams), {}, {
|
|
41
41
|
implementation,
|
|
42
42
|
deployParams: multiSigDeployParams,
|
|
43
43
|
signer: multiSigSignatory
|
|
44
44
|
});
|
|
45
|
-
return
|
|
45
|
+
return smartAccountsKit.toMetaMaskSmartAccount(params);
|
|
46
46
|
} else {
|
|
47
47
|
throw new Error(`MetamaskSmartAccount - unsupported implementation: ${implementation}`);
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Implementation } from "@metamask/
|
|
1
|
+
import { Implementation } from "@metamask/smart-accounts-kit";
|
|
2
2
|
import { Client, WalletClient } from "viem";
|
|
3
3
|
import { SmartAccount } from "viem/account-abstraction";
|
|
4
4
|
import { ISmartAccount, MetamaskSmartAccountConfig } from "../../utils/interfaces";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Implementation, toMetaMaskSmartAccount } from "@metamask/
|
|
1
|
+
import { Implementation, toMetaMaskSmartAccount } from "@metamask/smart-accounts-kit";
|
|
2
2
|
import { BASE_TX_EVENT_TYPE, BaseBlockTrackerState, BaseControllerEvents, BaseFormattedTransactionActivity, BaseTokenInfo, BaseTransactionEvents, MESSAGE_EVENTS, MessageStatus, NetworkConfig, NetworkState, PaymentTransaction, PollingBlockTrackerConfig, PopupWhitelabelData, ProviderConfig, TRANSACTION_TYPE, TransactionMeta, TransactionState, TransactionStatus, TX_CONFIRMED_EVENT_TYPE, TX_DROPPED_EVENT_TYPE, TX_EVENTS, TX_FAILED_EVENT_TYPE, TX_WARNING_EVENT_TYPE, User } from "@toruslabs/base-controllers";
|
|
3
3
|
import { JRPCRequest, Json } from "@web3auth/auth";
|
|
4
4
|
import { MutexInterface } from "async-mutex";
|
|
@@ -129,7 +129,6 @@ class AccountAbstractionController extends BaseController {
|
|
|
129
129
|
throw new Error("Invalid address");
|
|
130
130
|
}
|
|
131
131
|
const txParams = tx;
|
|
132
|
-
// @ts-expect-error TODO: viem types are too deep
|
|
133
132
|
const userOperationParams = {
|
|
134
133
|
account: this.smartAccount,
|
|
135
134
|
calls: [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
-
import { Implementation, toMetaMaskSmartAccount } from '@metamask/
|
|
3
|
+
import { Implementation, toMetaMaskSmartAccount } from '@metamask/smart-accounts-kit';
|
|
4
4
|
import { SMART_ACCOUNT } from '../../utils/constants.js';
|
|
5
5
|
|
|
6
6
|
class MetamaskSmartAccount {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toruslabs/ethereum-controllers",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.16.0",
|
|
4
4
|
"homepage": "https://github.com/torusresearch/controllers#readme",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"@ethereumjs/common": "^10.1.0",
|
|
23
23
|
"@ethereumjs/tx": "^10.1.0",
|
|
24
24
|
"@ethereumjs/util": "^10.1.0",
|
|
25
|
-
"@metamask/
|
|
26
|
-
"@toruslabs/base-controllers": "^8.
|
|
25
|
+
"@metamask/smart-accounts-kit": "~0.3.0",
|
|
26
|
+
"@toruslabs/base-controllers": "^8.16.0",
|
|
27
27
|
"@toruslabs/http-helpers": "^8.1.1",
|
|
28
|
-
"@web3auth/auth": "^10.
|
|
28
|
+
"@web3auth/auth": "^10.8.0",
|
|
29
29
|
"async-mutex": "^0.5.0",
|
|
30
30
|
"bignumber.js": "^9.3.1",
|
|
31
31
|
"bn.js": "^5.2.2",
|
|
32
32
|
"deepmerge": "^4.3.1",
|
|
33
33
|
"ethereum-cryptography": "^3.2.0",
|
|
34
|
-
"ethers": "^6.
|
|
34
|
+
"ethers": "^6.16.0",
|
|
35
35
|
"fast-json-patch": "^3.1.1",
|
|
36
36
|
"fast-safe-stringify": "^2.1.1",
|
|
37
37
|
"jsonschema": "^1.5.0",
|
|
38
38
|
"loglevel": "^1.9.2",
|
|
39
|
-
"permissionless": "^0.
|
|
39
|
+
"permissionless": "^0.3.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@babel/runtime": "7.x",
|
|
43
|
-
"viem": ">=2.
|
|
43
|
+
"viem": ">=2.45.0"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "55016cdc4eb9c42a50126d7cfe598f8a9b1de797",
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@typechain/ethers-v6": "^0.5.1",
|
|
72
72
|
"typechain": "^8.3.2"
|