@mentaproject/core 0.6.2 → 0.6.4
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/clients/index.js +6147 -12
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/index.mjs +6146 -11
- package/dist/clients/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/clients/createMentaAccount.ts +15 -13
package/package.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PasskeyValidatorContractVersion,
|
|
3
|
+
toPasskeyValidator,
|
|
4
|
+
} from "@zerodev/passkey-validator";
|
|
1
5
|
import { MentaAccountParams } from "../types";
|
|
6
|
+
import { entryPoint07Address } from "../account-abstraction";
|
|
2
7
|
import { toKernelSmartAccount } from "permissionless/accounts";
|
|
3
8
|
import { createSmartAccountClient } from "permissionless";
|
|
4
9
|
import { erc7579Actions } from "permissionless/actions/erc7579";
|
|
@@ -9,22 +14,19 @@ export async function createMentaAccount<TChain extends Chain | undefined>(
|
|
|
9
14
|
client: Client<Transport, TChain, Account | undefined>,
|
|
10
15
|
params: MentaAccountParams,
|
|
11
16
|
) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const webAuthnAccount = (params.signer as any).toWebAuthnAccount();
|
|
17
|
+
const validator = await toPasskeyValidator(client as any, {
|
|
18
|
+
webAuthnKey: params.signer,
|
|
19
|
+
entryPoint: {
|
|
20
|
+
address: entryPoint07Address,
|
|
21
|
+
version: "0.7",
|
|
22
|
+
},
|
|
23
|
+
kernelVersion: "0.3.3",
|
|
24
|
+
validatorContractVersion: PasskeyValidatorContractVersion.V0_0_3_PATCHED,
|
|
25
|
+
});
|
|
23
26
|
|
|
24
27
|
const kernel = await toKernelSmartAccount({
|
|
25
|
-
owners: [
|
|
28
|
+
owners: [validator],
|
|
26
29
|
client: client as any,
|
|
27
|
-
version: "0.3.3",
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
// Create a routed transport that sends bundler methods to the bundler
|