permissionless 0.2.3 → 0.2.5
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 +14 -0
- package/README.md +46 -18
- package/_cjs/actions/erc7579/installModule.js +9 -37
- package/_cjs/actions/erc7579/installModule.js.map +1 -1
- package/_cjs/actions/erc7579/installModules.js +11 -33
- package/_cjs/actions/erc7579/installModules.js.map +1 -1
- package/_cjs/actions/erc7579/isModuleInstalled.js +3 -3
- package/_cjs/actions/erc7579/isModuleInstalled.js.map +1 -1
- package/_cjs/actions/erc7579/uninstallModule.js +9 -37
- package/_cjs/actions/erc7579/uninstallModule.js.map +1 -1
- package/_cjs/actions/erc7579/uninstallModules.js +11 -33
- package/_cjs/actions/erc7579/uninstallModules.js.map +1 -1
- package/_cjs/clients/createSmartAccountClient.js +1 -0
- package/_cjs/clients/createSmartAccountClient.js.map +1 -1
- package/_cjs/utils/encodeInstallModule.js +53 -0
- package/_cjs/utils/encodeInstallModule.js.map +1 -0
- package/_cjs/utils/encodeUninstallModule.js +53 -0
- package/_cjs/utils/encodeUninstallModule.js.map +1 -0
- package/_cjs/utils/index.js +5 -1
- package/_cjs/utils/index.js.map +1 -1
- package/_esm/actions/erc7579/installModule.js +9 -37
- package/_esm/actions/erc7579/installModule.js.map +1 -1
- package/_esm/actions/erc7579/installModules.js +11 -33
- package/_esm/actions/erc7579/installModules.js.map +1 -1
- package/_esm/actions/erc7579/isModuleInstalled.js +3 -3
- package/_esm/actions/erc7579/isModuleInstalled.js.map +1 -1
- package/_esm/actions/erc7579/uninstallModule.js +9 -37
- package/_esm/actions/erc7579/uninstallModule.js.map +1 -1
- package/_esm/actions/erc7579/uninstallModules.js +11 -33
- package/_esm/actions/erc7579/uninstallModules.js.map +1 -1
- package/_esm/clients/createSmartAccountClient.js +1 -0
- package/_esm/clients/createSmartAccountClient.js.map +1 -1
- package/_esm/utils/encodeInstallModule.js +49 -0
- package/_esm/utils/encodeInstallModule.js.map +1 -0
- package/_esm/utils/encodeUninstallModule.js +49 -0
- package/_esm/utils/encodeUninstallModule.js.map +1 -0
- package/_esm/utils/index.js +3 -1
- package/_esm/utils/index.js.map +1 -1
- package/_types/actions/erc7579/installModule.d.ts +18 -6
- package/_types/actions/erc7579/installModule.d.ts.map +1 -1
- package/_types/actions/erc7579/installModules.d.ts +13 -9
- package/_types/actions/erc7579/installModules.d.ts.map +1 -1
- package/_types/actions/erc7579/isModuleInstalled.d.ts +5 -2
- package/_types/actions/erc7579/isModuleInstalled.d.ts.map +1 -1
- package/_types/actions/erc7579/uninstallModule.d.ts +18 -6
- package/_types/actions/erc7579/uninstallModule.d.ts.map +1 -1
- package/_types/actions/erc7579/uninstallModules.d.ts +13 -11
- package/_types/actions/erc7579/uninstallModules.d.ts.map +1 -1
- package/_types/utils/encodeInstallModule.d.ts +20 -0
- package/_types/utils/encodeInstallModule.d.ts.map +1 -0
- package/_types/utils/encodeUninstallModule.d.ts +20 -0
- package/_types/utils/encodeUninstallModule.d.ts.map +1 -0
- package/_types/utils/index.d.ts +3 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/actions/erc7579/installModule.test.ts +1 -1
- package/actions/erc7579/installModule.ts +45 -46
- package/actions/erc7579/installModules.test.ts +7 -0
- package/actions/erc7579/installModules.ts +40 -49
- package/actions/erc7579/isModuleInstalled.ts +17 -5
- package/actions/erc7579/uninstallModule.ts +52 -47
- package/actions/erc7579/uninstallModules.ts +40 -51
- package/clients/createSmartAccountClient.ts +1 -0
- package/package.json +1 -1
- package/utils/encodeInstallModule.ts +85 -0
- package/utils/encodeUninstallModule.ts +85 -0
- package/utils/index.ts +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# permissionless
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b09bb1cf484b4b2af9df35c5e6cc2a5d0a371050: Forwarded the client for fees estimation
|
|
8
|
+
|
|
9
|
+
## 0.2.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7d4602c831430744916dda33983be0583d9b0662: Added utility functions to encode 7579 function calldata
|
|
14
|
+
- d23ee0d5b530134756ea098f6233910f79cba83e: Added support to send calls with 7579 functions and override paymaster props
|
|
15
|
+
- d23ee0d5b530134756ea098f6233910f79cba83e: Added support for initData & deInitData
|
|
16
|
+
|
|
3
17
|
## 0.2.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,21 +4,33 @@
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
permissionless.js is a TypeScript library built on top of
|
|
7
|
+
permissionless.js is a TypeScript library built on top of
|
|
8
|
+
[viem](https://viem.sh) for deploying and managing
|
|
9
|
+
[ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart accounts, interacting
|
|
10
|
+
with bundlers and paymasters, and leveraging custom signers.
|
|
8
11
|
|
|
9
12
|
## Features
|
|
10
13
|
|
|
11
|
-
- **High-Level Smart Account Support**: We support a high-level API for
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- **
|
|
16
|
-
-
|
|
14
|
+
- **High-Level Smart Account Support**: We support a high-level API for
|
|
15
|
+
deploying and managing smart accounts, including some of the most popular
|
|
16
|
+
implementations ([Safe](https://safe.global), [Kernel](https://zerodev.app),
|
|
17
|
+
[Biconomy](https://biconomy.io), etc.)
|
|
18
|
+
- **Bundler Support**: We support all bundler actions following
|
|
19
|
+
[ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace).
|
|
20
|
+
- **Gas Sponsorship**: We support paymaster actions to allow you to easily
|
|
21
|
+
sponsor gas fees.
|
|
22
|
+
- **User Operation Utility Functions**: We provide many low-level utility
|
|
23
|
+
functions useful for dealing with User Operations.
|
|
24
|
+
- **Modular and Extensible**: We allow you to easily create and plug in your own
|
|
25
|
+
smart account systems, bundlers, paymasters, and signers.
|
|
26
|
+
- **Built on & for viem**: permissionless.js is designed to be a thin wrapper
|
|
27
|
+
around viem, maintaining the same style and overall feel viem provides.
|
|
17
28
|
- and a lot more...
|
|
18
29
|
|
|
19
30
|
## Documentation
|
|
20
31
|
|
|
21
|
-
[Take a look at our documentation](https://docs.pimlico.io/permissionless) to
|
|
32
|
+
[Take a look at our documentation](https://docs.pimlico.io/permissionless) to
|
|
33
|
+
learn more about permissionless.js.
|
|
22
34
|
|
|
23
35
|
## Installation
|
|
24
36
|
|
|
@@ -42,27 +54,43 @@ yarn add viem permissionless
|
|
|
42
54
|
|
|
43
55
|
```typescript
|
|
44
56
|
// Import the required modules.
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
57
|
+
import { createSmartAccountClient } from "permissionless";
|
|
58
|
+
import { createPaymasterClient } from "viem/account-abstraction";
|
|
59
|
+
import { sepolia } from "viem/chains";
|
|
60
|
+
import { http } from "viem";
|
|
48
61
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
const paymaster = createPaymasterClient({
|
|
63
|
+
transport: http(`https://api.pimlico.io/v2/sepolia/rpc?apikey=${pimlicoApiKey}`)
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const account = toSimpleSmartAccount<entryPointVersion>({
|
|
67
|
+
client: getPublicClient(anvilRpc),
|
|
68
|
+
owner: privateKeyToAccount(generatePrivateKey())
|
|
53
69
|
})
|
|
54
70
|
|
|
71
|
+
// Create the required clients.
|
|
72
|
+
const bundlerClient = createSmartAccountClient({
|
|
73
|
+
account,
|
|
74
|
+
paymaster:
|
|
75
|
+
chain: sepolia,
|
|
76
|
+
bundlerTransport: http(
|
|
77
|
+
`https://api.pimlico.io/v2/sepolia/rpc?apikey=${pimlicoApiKey}`,
|
|
78
|
+
), // Use any bundler url
|
|
79
|
+
});
|
|
80
|
+
|
|
55
81
|
// Consume bundler, paymaster, and smart account actions!
|
|
56
82
|
const userOperationReceipt = await bundlerClient.getUserOperationReceipt({
|
|
57
|
-
|
|
58
|
-
})
|
|
83
|
+
hash: "0x5faea6a3af76292c2b23468bbea96ef63fb31360848be195748437f0a79106c8",
|
|
84
|
+
});
|
|
59
85
|
```
|
|
60
86
|
|
|
61
87
|
## Contributors
|
|
62
88
|
|
|
63
|
-
For a full explanation of permissionless.js, please visit our
|
|
89
|
+
For a full explanation of permissionless.js, please visit our
|
|
90
|
+
[docs page](https://docs.pimlico.io/permissionless)
|
|
64
91
|
|
|
65
92
|
Build permissionless.js locally with:
|
|
93
|
+
|
|
66
94
|
```bash
|
|
67
95
|
bun run build
|
|
68
96
|
```
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.installModule = void 0;
|
|
4
|
-
const viem_1 = require("viem");
|
|
5
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
5
|
const utils_1 = require("viem/utils");
|
|
7
6
|
const errors_1 = require("../../errors/index.js");
|
|
8
|
-
const
|
|
7
|
+
const utils_2 = require("../../utils/index.js");
|
|
9
8
|
async function installModule(client, parameters) {
|
|
10
|
-
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, address, context } = parameters;
|
|
9
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, address, context, initData, type, calls, paymaster, paymasterContext } = parameters;
|
|
11
10
|
if (!account_) {
|
|
12
11
|
throw new errors_1.AccountNotFoundError({
|
|
13
12
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
@@ -16,41 +15,14 @@ async function installModule(client, parameters) {
|
|
|
16
15
|
const account = (0, utils_1.parseAccount)(account_);
|
|
17
16
|
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
18
17
|
calls: [
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
name: "installModule",
|
|
26
|
-
type: "function",
|
|
27
|
-
stateMutability: "nonpayable",
|
|
28
|
-
inputs: [
|
|
29
|
-
{
|
|
30
|
-
type: "uint256",
|
|
31
|
-
name: "moduleTypeId"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: "address",
|
|
35
|
-
name: "module"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "bytes",
|
|
39
|
-
name: "initData"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
outputs: []
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
functionName: "installModule",
|
|
46
|
-
args: [
|
|
47
|
-
(0, supportsModule_1.parseModuleTypeId)(parameters.type),
|
|
48
|
-
(0, viem_1.getAddress)(address),
|
|
49
|
-
context
|
|
50
|
-
]
|
|
51
|
-
})
|
|
52
|
-
}
|
|
18
|
+
...(0, utils_2.encodeInstallModule)({
|
|
19
|
+
account,
|
|
20
|
+
modules: [{ address, context: context ?? initData, type }]
|
|
21
|
+
}),
|
|
22
|
+
...(calls ?? [])
|
|
53
23
|
],
|
|
24
|
+
paymaster,
|
|
25
|
+
paymasterContext,
|
|
54
26
|
maxFeePerGas,
|
|
55
27
|
maxPriorityFeePerGas,
|
|
56
28
|
nonce,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installModule.js","sourceRoot":"","sources":["../../../actions/erc7579/installModule.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"installModule.js","sourceRoot":"","sources":["../../../actions/erc7579/installModule.ts"],"names":[],"mappings":";;;AACA,kEAMiC;AACjC,sCAAoD;AACpD,yCAAmD;AACnD,uCAAiD;AAsC1C,KAAK,UAAU,aAAa,CAG/B,MAAc,EACd,UAAkD;IAElD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,EACT,gBAAgB,EACnB,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,IAAA,iBAAS,EACZ,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC;QACE,KAAK,EAAE;YACH,GAAG,IAAA,2BAAmB,EAAC;gBACnB,OAAO;gBACP,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,IAAI,EAAE,CAAC;aAC7D,CAAC;YACF,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACnB;QACD,SAAS;QACT,gBAAgB;QAChB,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AA/CD,sCA+CC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.installModules = void 0;
|
|
4
|
-
const viem_1 = require("viem");
|
|
5
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
5
|
const utils_1 = require("viem/utils");
|
|
7
6
|
const errors_1 = require("../../errors/index.js");
|
|
8
|
-
const
|
|
7
|
+
const encodeInstallModule_1 = require("../../utils/encodeInstallModule.js");
|
|
9
8
|
async function installModules(client, parameters) {
|
|
10
|
-
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, modules } = parameters;
|
|
9
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, modules, paymaster, paymasterContext, calls } = parameters;
|
|
11
10
|
if (!account_) {
|
|
12
11
|
throw new errors_1.AccountNotFoundError({
|
|
13
12
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
@@ -15,36 +14,15 @@ async function installModules(client, parameters) {
|
|
|
15
14
|
}
|
|
16
15
|
const account = (0, utils_1.parseAccount)(account_);
|
|
17
16
|
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
18
|
-
calls:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
inputs: [
|
|
28
|
-
{
|
|
29
|
-
type: "uint256",
|
|
30
|
-
name: "moduleTypeId"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: "address",
|
|
34
|
-
name: "module"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: "bytes",
|
|
38
|
-
name: "initData"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
outputs: []
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
functionName: "installModule",
|
|
45
|
-
args: [(0, supportsModule_1.parseModuleTypeId)(type), (0, viem_1.getAddress)(address), context]
|
|
46
|
-
})
|
|
47
|
-
})),
|
|
17
|
+
calls: [
|
|
18
|
+
...(0, encodeInstallModule_1.encodeInstallModule)({
|
|
19
|
+
account,
|
|
20
|
+
modules
|
|
21
|
+
}),
|
|
22
|
+
...(calls ?? [])
|
|
23
|
+
],
|
|
24
|
+
paymaster,
|
|
25
|
+
paymasterContext,
|
|
48
26
|
maxFeePerGas,
|
|
49
27
|
maxPriorityFeePerGas,
|
|
50
28
|
nonce,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installModules.js","sourceRoot":"","sources":["../../../actions/erc7579/installModules.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"installModules.js","sourceRoot":"","sources":["../../../actions/erc7579/installModules.ts"],"names":[],"mappings":";;;AACA,kEAKiC;AACjC,sCAAoD;AACpD,yCAAmD;AACnD,yEAGwC;AA4BjC,KAAK,UAAU,cAAc,CAGhC,MAA2D,EAC3D,UAAmD;IAEnD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,KAAK,EACR,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IACtD,OAAO,IAAA,iBAAS,EACZ,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC;QACE,KAAK,EAAE;YACH,GAAG,IAAA,yCAAmB,EAAC;gBACnB,OAAO;gBACP,OAAO;aACV,CAAC;YACF,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACnB;QACD,SAAS;QACT,gBAAgB;QAChB,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO,EAAE,OAAO;KACnB,CAAC,CAAA;AACN,CAAC;AA3CD,wCA2CC"}
|
|
@@ -7,7 +7,7 @@ const utils_1 = require("viem/utils");
|
|
|
7
7
|
const errors_1 = require("../../errors/index.js");
|
|
8
8
|
const supportsModule_1 = require("./supportsModule.js");
|
|
9
9
|
async function isModuleInstalled(client, parameters) {
|
|
10
|
-
const { account: account_ = client.account, address, context } = parameters;
|
|
10
|
+
const { account: account_ = client.account, address, context, additionalContext } = parameters;
|
|
11
11
|
if (!account_) {
|
|
12
12
|
throw new errors_1.AccountNotFoundError({
|
|
13
13
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
@@ -48,7 +48,7 @@ async function isModuleInstalled(client, parameters) {
|
|
|
48
48
|
args: [
|
|
49
49
|
(0, supportsModule_1.parseModuleTypeId)(parameters.type),
|
|
50
50
|
(0, viem_1.getAddress)(address),
|
|
51
|
-
context
|
|
51
|
+
context ?? additionalContext
|
|
52
52
|
],
|
|
53
53
|
address: account.address
|
|
54
54
|
});
|
|
@@ -66,7 +66,7 @@ async function isModuleInstalled(client, parameters) {
|
|
|
66
66
|
args: [
|
|
67
67
|
(0, supportsModule_1.parseModuleTypeId)(parameters.type),
|
|
68
68
|
(0, viem_1.getAddress)(address),
|
|
69
|
-
context
|
|
69
|
+
context ?? additionalContext
|
|
70
70
|
]
|
|
71
71
|
})
|
|
72
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isModuleInstalled.js","sourceRoot":"","sources":["../../../actions/erc7579/isModuleInstalled.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"isModuleInstalled.js","sourceRoot":"","sources":["../../../actions/erc7579/isModuleInstalled.ts"],"names":[],"mappings":";;;AAAA,+BAWa;AAKb,0CAAiD;AACjD,sCAAoD;AACpD,yCAAmD;AACnD,qDAAqE;AAgB9D,KAAK,UAAU,iBAAiB,CAGnC,MAA2D,EAC3D,UAAsD;IAEtD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,OAAO,EACP,OAAO,EACP,iBAAiB,EACpB,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAA;IAEnC,MAAM,GAAG,GAAG;QACR;YACI,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,UAAU;YAChB,eAAe,EAAE,MAAM;YACvB,MAAM,EAAE;gBACJ;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,cAAc;iBACvB;gBACD;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,QAAQ;iBACjB;gBACD;oBACI,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,mBAAmB;iBAC5B;aACJ;YACD,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,MAAM;iBACf;aACJ;SACJ;KACK,CAAA;IAEV,IAAI,CAAC;QACD,OAAO,MAAM,IAAA,iBAAS,EAClB,YAAY,EACZ,sBAAY,EACZ,cAAc,CACjB,CAAC;YACE,GAAG;YACH,YAAY,EAAE,mBAAmB;YACjC,IAAI,EAAE;gBACF,IAAA,kCAAiB,EAAC,UAAU,CAAC,IAAI,CAAC;gBAClC,IAAA,iBAAU,EAAC,OAAO,CAAC;gBACnB,OAAO,IAAI,iBAAiB;aAC/B;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;SAC3B,CAAC,CAAA;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,KAAK,YAAY,qCAA8B,EAAE,CAAC;YAClD,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,CAAA;YAE/D,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAC1B,YAAY,EACZ,cAAI,EACJ,MAAM,CACT,CAAC;gBACE,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,WAAW;gBACxB,EAAE,EAAE,OAAO,CAAC,OAAO;gBACnB,IAAI,EAAE,IAAA,yBAAkB,EAAC;oBACrB,GAAG;oBACH,YAAY,EAAE,mBAAmB;oBACjC,IAAI,EAAE;wBACF,IAAA,kCAAiB,EAAC,UAAU,CAAC,IAAI,CAAC;wBAClC,IAAA,iBAAU,EAAC,OAAO,CAAC;wBACnB,OAAO,IAAI,iBAAiB;qBAC/B;iBACJ,CAAC;aACL,CAAC,CAAA;YAEF,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;YAChD,CAAC;YAED,OAAO,IAAA,2BAAoB,EAAC;gBACxB,GAAG;gBACH,YAAY,EAAE,mBAAmB;gBACjC,IAAI,EAAE,MAAM,CAAC,IAAI;aACpB,CAAC,CAAA;QACN,CAAC;QAED,MAAM,KAAK,CAAA;IACf,CAAC;AACL,CAAC;AArGD,8CAqGC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uninstallModule = void 0;
|
|
4
|
-
const viem_1 = require("viem");
|
|
5
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
5
|
const utils_1 = require("viem/utils");
|
|
7
6
|
const utils_2 = require("viem/utils");
|
|
8
7
|
const errors_1 = require("../../errors/index.js");
|
|
9
|
-
const
|
|
8
|
+
const encodeUninstallModule_1 = require("../../utils/encodeUninstallModule.js");
|
|
10
9
|
async function uninstallModule(client, parameters) {
|
|
11
|
-
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, address, context } = parameters;
|
|
10
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, address, context, deInitData, type, calls, paymaster, paymasterContext } = parameters;
|
|
12
11
|
if (!account_) {
|
|
13
12
|
throw new errors_1.AccountNotFoundError({
|
|
14
13
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
@@ -17,41 +16,14 @@ async function uninstallModule(client, parameters) {
|
|
|
17
16
|
const account = (0, utils_2.parseAccount)(account_);
|
|
18
17
|
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
19
18
|
calls: [
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
name: "uninstallModule",
|
|
27
|
-
type: "function",
|
|
28
|
-
stateMutability: "nonpayable",
|
|
29
|
-
inputs: [
|
|
30
|
-
{
|
|
31
|
-
type: "uint256",
|
|
32
|
-
name: "moduleTypeId"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
type: "address",
|
|
36
|
-
name: "module"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
type: "bytes",
|
|
40
|
-
name: "deInitData"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
outputs: []
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
functionName: "uninstallModule",
|
|
47
|
-
args: [
|
|
48
|
-
(0, supportsModule_1.parseModuleTypeId)(parameters.type),
|
|
49
|
-
(0, viem_1.getAddress)(address),
|
|
50
|
-
context
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
}
|
|
19
|
+
...(0, encodeUninstallModule_1.encodeUninstallModule)({
|
|
20
|
+
account,
|
|
21
|
+
modules: [{ type, address, context: context ?? deInitData }]
|
|
22
|
+
}),
|
|
23
|
+
...(calls ?? [])
|
|
54
24
|
],
|
|
25
|
+
paymaster,
|
|
26
|
+
paymasterContext,
|
|
55
27
|
maxFeePerGas,
|
|
56
28
|
maxPriorityFeePerGas,
|
|
57
29
|
nonce,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstallModule.js","sourceRoot":"","sources":["../../../actions/erc7579/uninstallModule.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"uninstallModule.js","sourceRoot":"","sources":["../../../actions/erc7579/uninstallModule.ts"],"names":[],"mappings":";;;AASA,kEAMiC;AACjC,sCAAsC;AACtC,sCAAyC;AACzC,yCAAmD;AACnD,6EAAyE;AAsClE,KAAK,UAAU,eAAe,CAGjC,MAA2D,EAC3D,UAAoD;IAEpD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,KAAK,EACL,SAAS,EACT,gBAAgB,EACnB,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,IAAA,iBAAS,EACZ,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC;QACE,KAAK,EAAE;YACH,GAAG,IAAA,6CAAqB,EAAC;gBACrB,OAAO;gBACP,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC;aAC/D,CAAC;YACF,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACnB;QACD,SAAS;QACT,gBAAgB;QAChB,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO,EAAE,OAAO;KACnB,CAAC,CAAA;AACN,CAAC;AA/CD,0CA+CC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uninstallModules = void 0;
|
|
4
|
-
const viem_1 = require("viem");
|
|
5
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
5
|
const utils_1 = require("viem/utils");
|
|
7
6
|
const utils_2 = require("viem/utils");
|
|
8
7
|
const errors_1 = require("../../errors/index.js");
|
|
9
|
-
const
|
|
8
|
+
const encodeUninstallModule_1 = require("../../utils/encodeUninstallModule.js");
|
|
10
9
|
async function uninstallModules(client, parameters) {
|
|
11
|
-
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, modules } = parameters;
|
|
10
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, modules, calls, paymaster, paymasterContext } = parameters;
|
|
12
11
|
if (!account_) {
|
|
13
12
|
throw new errors_1.AccountNotFoundError({
|
|
14
13
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
@@ -16,36 +15,15 @@ async function uninstallModules(client, parameters) {
|
|
|
16
15
|
}
|
|
17
16
|
const account = (0, utils_2.parseAccount)(account_);
|
|
18
17
|
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
19
|
-
calls:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
inputs: [
|
|
29
|
-
{
|
|
30
|
-
type: "uint256",
|
|
31
|
-
name: "moduleTypeId"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: "address",
|
|
35
|
-
name: "module"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "bytes",
|
|
39
|
-
name: "deInitData"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
outputs: []
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
functionName: "uninstallModule",
|
|
46
|
-
args: [(0, supportsModule_1.parseModuleTypeId)(type), (0, viem_1.getAddress)(address), context]
|
|
47
|
-
})
|
|
48
|
-
})),
|
|
18
|
+
calls: [
|
|
19
|
+
...(0, encodeUninstallModule_1.encodeUninstallModule)({
|
|
20
|
+
account,
|
|
21
|
+
modules
|
|
22
|
+
}),
|
|
23
|
+
...(calls ?? [])
|
|
24
|
+
],
|
|
25
|
+
paymaster,
|
|
26
|
+
paymasterContext,
|
|
49
27
|
maxFeePerGas,
|
|
50
28
|
maxPriorityFeePerGas,
|
|
51
29
|
nonce,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstallModules.js","sourceRoot":"","sources":["../../../actions/erc7579/uninstallModules.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"uninstallModules.js","sourceRoot":"","sources":["../../../actions/erc7579/uninstallModules.ts"],"names":[],"mappings":";;;AACA,kEAKiC;AACjC,sCAAsC;AACtC,sCAAyC;AACzC,yCAAmD;AACnD,6EAG0C;AA4BnC,KAAK,UAAU,gBAAgB,CAGlC,MAA2D,EAC3D,UAAqD;IAErD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,EACnB,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,IAAA,iBAAS,EACZ,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC;QACE,KAAK,EAAE;YACH,GAAG,IAAA,6CAAqB,EAAC;gBACrB,OAAO;gBACP,OAAO;aACV,CAAC;YACF,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACnB;QACD,SAAS;QACT,gBAAgB;QAChB,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AA5CD,4CA4CC"}
|
|
@@ -7,6 +7,7 @@ function createSmartAccountClient(parameters) {
|
|
|
7
7
|
const { client: client_, key = "bundler", name = "Bundler Client", paymaster, paymasterContext, bundlerTransport, userOperation } = parameters;
|
|
8
8
|
const client = (0, account_abstraction_1.createBundlerClient)({
|
|
9
9
|
...parameters,
|
|
10
|
+
client: client_,
|
|
10
11
|
chain: parameters.chain ?? client_?.chain,
|
|
11
12
|
key,
|
|
12
13
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSmartAccountClient.js","sourceRoot":"","sources":["../../clients/createSmartAccountClient.ts"],"names":[],"mappings":";;;AAUA,kEAOiC;AACjC,4DAGkC;AAsGlC,SAAgB,wBAAwB,CACpC,UAAoC;IAEpC,MAAM,EACF,MAAM,EAAE,OAAO,EACf,GAAG,GAAG,SAAS,EACf,IAAI,GAAG,gBAAgB,EACvB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EAChB,GAAG,UAAU,CAAA;IAEd,MAAM,MAAM,GAAG,IAAA,yCAAmB,EAAC;QAC/B,GAAG,UAAU;QACb,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,OAAO,EAAE,KAAK;QACzC,GAAG;QACH,IAAI;QACJ,SAAS,EAAE,gBAAgB;QAC3B,SAAS;QACT,gBAAgB;QAChB,aAAa;KAChB,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAA,kCAAmB,GAAE,CAAkC,CAAA;AAChF,CAAC;
|
|
1
|
+
{"version":3,"file":"createSmartAccountClient.js","sourceRoot":"","sources":["../../clients/createSmartAccountClient.ts"],"names":[],"mappings":";;;AAUA,kEAOiC;AACjC,4DAGkC;AAsGlC,SAAgB,wBAAwB,CACpC,UAAoC;IAEpC,MAAM,EACF,MAAM,EAAE,OAAO,EACf,GAAG,GAAG,SAAS,EACf,IAAI,GAAG,gBAAgB,EACvB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EAChB,GAAG,UAAU,CAAA;IAEd,MAAM,MAAM,GAAG,IAAA,yCAAmB,EAAC;QAC/B,GAAG,UAAU;QACb,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,OAAO,EAAE,KAAK;QACzC,GAAG;QACH,IAAI;QACJ,SAAS,EAAE,gBAAgB;QAC3B,SAAS;QACT,gBAAgB;QAChB,aAAa;KAChB,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAA,kCAAmB,GAAE,CAAkC,CAAA;AAChF,CAAC;AA1BD,4DA0BC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encodeInstallModule = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
const supportsModule_1 = require("../actions/erc7579/supportsModule.js");
|
|
6
|
+
const errors_1 = require("../errors/index.js");
|
|
7
|
+
function encodeInstallModule(parameters) {
|
|
8
|
+
const account = parameters.account;
|
|
9
|
+
if (!account) {
|
|
10
|
+
throw new errors_1.AccountNotFoundError({
|
|
11
|
+
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const modules = Array.isArray(parameters.modules)
|
|
15
|
+
? parameters.modules
|
|
16
|
+
: [parameters.modules];
|
|
17
|
+
return modules.map(({ type, address, context, initData }) => ({
|
|
18
|
+
to: account.address,
|
|
19
|
+
value: BigInt(0),
|
|
20
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
21
|
+
abi: [
|
|
22
|
+
{
|
|
23
|
+
name: "installModule",
|
|
24
|
+
type: "function",
|
|
25
|
+
stateMutability: "nonpayable",
|
|
26
|
+
inputs: [
|
|
27
|
+
{
|
|
28
|
+
type: "uint256",
|
|
29
|
+
name: "moduleTypeId"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "address",
|
|
33
|
+
name: "module"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "bytes",
|
|
37
|
+
name: "initData"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
outputs: []
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
functionName: "installModule",
|
|
44
|
+
args: [
|
|
45
|
+
(0, supportsModule_1.parseModuleTypeId)(type),
|
|
46
|
+
(0, viem_1.getAddress)(address),
|
|
47
|
+
context ?? initData
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
exports.encodeInstallModule = encodeInstallModule;
|
|
53
|
+
//# sourceMappingURL=encodeInstallModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeInstallModule.js","sourceRoot":"","sources":["../../utils/encodeInstallModule.ts"],"names":[],"mappings":";;;AAAA,+BAMa;AAKb,sEAG0C;AAC1C,sCAAgD;AAoBhD,SAAgB,mBAAmB,CAEjC,UAAwD;IACtD,MAAM,OAAO,GAAG,UAAU,CAAC,OAAuB,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;QAC7C,CAAC,CAAC,UAAU,CAAC,OAAO;QACpB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAE1B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1D,EAAE,EAAE,OAAO,CAAC,OAAO;QACnB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QAChB,IAAI,EAAE,IAAA,yBAAkB,EAAC;YACrB,GAAG,EAAE;gBACD;oBACI,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,UAAU;oBAChB,eAAe,EAAE,YAAY;oBAC7B,MAAM,EAAE;wBACJ;4BACI,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,cAAc;yBACvB;wBACD;4BACI,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,QAAQ;yBACjB;wBACD;4BACI,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,UAAU;yBACnB;qBACJ;oBACD,OAAO,EAAE,EAAE;iBACd;aACJ;YACD,YAAY,EAAE,eAAe;YAC7B,IAAI,EAAE;gBACF,IAAA,kCAAiB,EAAC,IAAI,CAAC;gBACvB,IAAA,iBAAU,EAAC,OAAO,CAAC;gBACnB,OAAO,IAAI,QAAQ;aACtB;SACJ,CAAC;KACL,CAAC,CAAC,CAAA;AACP,CAAC;AAjDD,kDAiDC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encodeUninstallModule = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
const supportsModule_1 = require("../actions/erc7579/supportsModule.js");
|
|
6
|
+
const errors_1 = require("../errors/index.js");
|
|
7
|
+
function encodeUninstallModule(parameters) {
|
|
8
|
+
const account = parameters.account;
|
|
9
|
+
if (!account) {
|
|
10
|
+
throw new errors_1.AccountNotFoundError({
|
|
11
|
+
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const modules = Array.isArray(parameters.modules)
|
|
15
|
+
? parameters.modules
|
|
16
|
+
: [parameters.modules];
|
|
17
|
+
return modules.map(({ type, address, context, deInitData }) => ({
|
|
18
|
+
to: account.address,
|
|
19
|
+
value: BigInt(0),
|
|
20
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
21
|
+
abi: [
|
|
22
|
+
{
|
|
23
|
+
name: "uninstallModule",
|
|
24
|
+
type: "function",
|
|
25
|
+
stateMutability: "nonpayable",
|
|
26
|
+
inputs: [
|
|
27
|
+
{
|
|
28
|
+
type: "uint256",
|
|
29
|
+
name: "moduleTypeId"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "address",
|
|
33
|
+
name: "module"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "bytes",
|
|
37
|
+
name: "deInitData"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
outputs: []
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
functionName: "uninstallModule",
|
|
44
|
+
args: [
|
|
45
|
+
(0, supportsModule_1.parseModuleTypeId)(type),
|
|
46
|
+
(0, viem_1.getAddress)(address),
|
|
47
|
+
context ?? deInitData
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
exports.encodeUninstallModule = encodeUninstallModule;
|
|
53
|
+
//# sourceMappingURL=encodeUninstallModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeUninstallModule.js","sourceRoot":"","sources":["../../utils/encodeUninstallModule.ts"],"names":[],"mappings":";;;AAAA,+BAMa;AAKb,sEAG0C;AAC1C,sCAAgD;AAoBhD,SAAgB,qBAAqB,CAEnC,UAA0D;IACxD,MAAM,OAAO,GAAG,UAAU,CAAC,OAAuB,CAAA;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,6BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;QAC7C,CAAC,CAAC,UAAU,CAAC,OAAO;QACpB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAE1B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5D,EAAE,EAAE,OAAO,CAAC,OAAO;QACnB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QAChB,IAAI,EAAE,IAAA,yBAAkB,EAAC;YACrB,GAAG,EAAE;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,UAAU;oBAChB,eAAe,EAAE,YAAY;oBAC7B,MAAM,EAAE;wBACJ;4BACI,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,cAAc;yBACvB;wBACD;4BACI,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,QAAQ;yBACjB;wBACD;4BACI,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,YAAY;yBACrB;qBACJ;oBACD,OAAO,EAAE,EAAE;iBACd;aACJ;YACD,YAAY,EAAE,iBAAiB;YAC/B,IAAI,EAAE;gBACF,IAAA,kCAAiB,EAAC,IAAI,CAAC;gBACvB,IAAA,iBAAU,EAAC,OAAO,CAAC;gBACnB,OAAO,IAAI,UAAU;aACxB;SACJ,CAAC;KACL,CAAC,CAAC,CAAA;AACP,CAAC;AAjDD,sDAiDC"}
|
package/_cjs/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeNonce = exports.encodeNonce = exports.getPackedUserOperation = exports.getAddressFromInitCodeOrPaymasterAndData = exports.isSmartAccountDeployed = exports.toOwner = exports.getRequiredPrefund = exports.deepHexlify = exports.transactionReceiptStatus = void 0;
|
|
3
|
+
exports.encode7579Calls = exports.encodeInstallModule = exports.decodeNonce = exports.encodeNonce = exports.getPackedUserOperation = exports.getAddressFromInitCodeOrPaymasterAndData = exports.isSmartAccountDeployed = exports.toOwner = exports.getRequiredPrefund = exports.deepHexlify = exports.transactionReceiptStatus = void 0;
|
|
4
4
|
const deepHexlify_1 = require("./deepHexlify.js");
|
|
5
5
|
Object.defineProperty(exports, "deepHexlify", { enumerable: true, get: function () { return deepHexlify_1.deepHexlify; } });
|
|
6
6
|
Object.defineProperty(exports, "transactionReceiptStatus", { enumerable: true, get: function () { return deepHexlify_1.transactionReceiptStatus; } });
|
|
@@ -16,6 +16,10 @@ const decodeNonce_1 = require("./decodeNonce.js");
|
|
|
16
16
|
Object.defineProperty(exports, "decodeNonce", { enumerable: true, get: function () { return decodeNonce_1.decodeNonce; } });
|
|
17
17
|
const encodeNonce_1 = require("./encodeNonce.js");
|
|
18
18
|
Object.defineProperty(exports, "encodeNonce", { enumerable: true, get: function () { return encodeNonce_1.encodeNonce; } });
|
|
19
|
+
const encodeInstallModule_1 = require("./encodeInstallModule.js");
|
|
20
|
+
Object.defineProperty(exports, "encodeInstallModule", { enumerable: true, get: function () { return encodeInstallModule_1.encodeInstallModule; } });
|
|
19
21
|
const getPackedUserOperation_1 = require("./getPackedUserOperation.js");
|
|
20
22
|
Object.defineProperty(exports, "getPackedUserOperation", { enumerable: true, get: function () { return getPackedUserOperation_1.getPackedUserOperation; } });
|
|
23
|
+
const encode7579Calls_1 = require("./encode7579Calls.js");
|
|
24
|
+
Object.defineProperty(exports, "encode7579Calls", { enumerable: true, get: function () { return encode7579Calls_1.encode7579Calls; } });
|
|
21
25
|
//# sourceMappingURL=index.js.map
|
package/_cjs/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqE;AAsBjE,4FAtBK,yBAAW,OAsBL;AADX,yGArBkB,sCAAwB,OAqBlB;AApB5B,yGAAqG;AA0BjG,yHA1BK,mFAAwC,OA0BL;AAzB5C,6DAG6B;AAkBzB,mGAnBA,uCAAkB,OAmBA;AAjBtB,qEAAiE;AAoB7D,uGApBK,+CAAsB,OAoBL;AAnB1B,uCAAmC;AAiB/B,wFAjBK,iBAAO,OAiBL;AAfX,+CAA2C;AAqBvC,4FArBK,yBAAW,OAqBL;AApBf,+CAA2C;AAmBvC,4FAnBK,yBAAW,OAmBL;AAjBf,+DAG8B;AAiB1B,oGAlBA,yCAAmB,OAkBA;AAhBvB,qEAAiE;AAY7D,uGAZK,+CAAsB,OAYL;AAV1B,uDAA8E;AAgB1E,gGAhBgC,iCAAe,OAgBhC"}
|