This repository was archived by the owner on Oct 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,21 @@ import {
16
16
import { UserOperationMiddlewareFn } from "../../types" ;
17
17
18
18
export class SimpleAccount extends UserOperationBuilder {
19
- private signer : ethers . Wallet ;
19
+ private signer : ethers . Signer ;
20
20
private provider : ethers . providers . JsonRpcProvider ;
21
21
private entryPoint : EntryPoint ;
22
22
private factory : SimpleAccountFactory ;
23
23
private initCode : string ;
24
24
proxy : SimpleAccountImpl ;
25
25
26
26
private constructor (
27
- signingKey : string ,
27
+ signer : ethers . Signer ,
28
28
ERC4337NodeRpc : string ,
29
29
entryPoint : string ,
30
30
factory : string
31
31
) {
32
32
super ( ) ;
33
- this . signer = new ethers . Wallet ( signingKey ) ;
33
+ this . signer = signer ;
34
34
this . provider = new ethers . providers . JsonRpcProvider ( ERC4337NodeRpc ) ;
35
35
this . entryPoint = EntryPoint__factory . connect ( entryPoint , this . provider ) ;
36
36
this . factory = SimpleAccountFactory__factory . connect (
@@ -50,14 +50,14 @@ export class SimpleAccount extends UserOperationBuilder {
50
50
} ;
51
51
52
52
public static async init (
53
- signingKey : string ,
53
+ signer : ethers . Signer ,
54
54
ERC4337NodeRpc : string ,
55
55
entryPoint : string ,
56
56
factory : string ,
57
57
paymasterMiddleware ?: UserOperationMiddlewareFn
58
58
) : Promise < SimpleAccount > {
59
59
const instance = new SimpleAccount (
60
- signingKey ,
60
+ signer ,
61
61
ERC4337NodeRpc ,
62
62
entryPoint ,
63
63
factory
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { ethers } from "ethers";
2
2
import { UserOperationMiddlewareFn } from "../../types" ;
3
3
4
4
export const EOASignature =
5
- ( signer : ethers . Wallet ) : UserOperationMiddlewareFn =>
5
+ ( signer : ethers . Signer ) : UserOperationMiddlewareFn =>
6
6
async ( ctx ) => {
7
7
ctx . op . signature = await signer . signMessage (
8
8
ethers . utils . arrayify ( ctx . getUserOpHash ( ) )
You can’t perform that action at this time.
0 commit comments