@zerodev/sdk 5.2.13 → 5.2.14
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/_cjs/actions/account-client/signUserOperation.js.map +1 -1
- package/_esm/actions/account-client/signUserOperation.js.map +1 -1
- package/_types/actions/account-client/signUserOperation.d.ts +5 -7
- package/_types/actions/account-client/signUserOperation.d.ts.map +1 -1
- package/_types/clients/decorators/kernel.d.ts +1 -1
- package/_types/clients/decorators/kernel.d.ts.map +1 -1
- package/actions/account-client/signUserOperation.ts +10 -25
- package/clients/decorators/kernel.ts +1 -1
- package/package.json +10 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":";;;AACA,sEAAiF;AAWjF,gDAG6B;AAE7B,sCAAsC;AAY/B,KAAK,UAAU,iBAAiB,CAQnC,MAA4C,EAC5C,IAAiE;IAEjE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,oCAA4B,EAAE,CAAA;IAEvD,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAA6B,CAAA;IAElE,MAAM,aAAa,GAAG,MAAM,IAAA,iBAAS,EACjC,MAAM,EACN,CAAA,0CAAqE,CAAA,EACrE,6BAA6B,CAChC,CAAC,IAAI,CAAC,CAAA;IAEP,aAAa,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,iBAAiB,CACrD,aAAgE,CACnE,CAAA;IAED,OAAO,aAAwD,CAAA;AACnE,CAAC;AA3BD,8CA2BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AAWjF,OAAO,EACH,4BAA4B,EAC5B,YAAY,EACf,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAYtC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAQnC,MAA4C,EAC5C,IAAiE;IAEjE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,4BAA4B,EAAE,CAAA;IAEvD,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAA6B,CAAA;IAElE,MAAM,aAAa,GAAG,MAAM,SAAS,CACjC,MAAM,EACN,CAAA,2BAAqE,CAAA,EACrE,6BAA6B,CAChC,CAAC,IAAI,CAAC,CAAA;IAEP,aAAa,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,iBAAiB,CACrD,aAAgE,CACnE,CAAA;IAED,OAAO,aAAwD,CAAA;AACnE,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { SmartAccount } from "permissionless/accounts/types";
|
|
2
|
-
import {
|
|
3
|
-
import type { EntryPoint,
|
|
2
|
+
import type { PrepareUserOperationRequestParameters, PrepareUserOperationRequestReturnType } from "permissionless/actions/smartAccount/prepareUserOperationRequest";
|
|
3
|
+
import type { EntryPoint, Prettify } from "permissionless/types";
|
|
4
4
|
import type { Chain, Client, Transport } from "viem";
|
|
5
|
-
export type SignUserOperationParameters<entryPoint extends EntryPoint, TAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type SignUserOperationReturnType = UserOperation<"v0.6">;
|
|
9
|
-
export declare function signUserOperation<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined>(client: Client<TTransport, TChain, TAccount>, args: Prettify<SignUserOperationParameters<entryPoint, TAccount>>): Promise<SignUserOperationReturnType>;
|
|
5
|
+
export type SignUserOperationParameters<entryPoint extends EntryPoint, TAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> = PrepareUserOperationRequestParameters<entryPoint, TAccount>;
|
|
6
|
+
export type SignUserOperationReturnType<entryPoint extends EntryPoint> = PrepareUserOperationRequestReturnType<entryPoint>;
|
|
7
|
+
export declare function signUserOperation<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined>(client: Client<TTransport, TChain, TAccount>, args: Prettify<SignUserOperationParameters<entryPoint, TAccount>>): Promise<SignUserOperationReturnType<entryPoint>>;
|
|
10
8
|
//# sourceMappingURL=signUserOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"signUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EACR,qCAAqC,EACrC,qCAAqC,EACxC,MAAM,iEAAiE,CAAA;AACxE,OAAO,KAAK,EACR,UAAU,EAEV,QAAQ,EAEX,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAGpD,MAAM,MAAM,2BAA2B,CACnC,UAAU,SAAS,UAAU,EAC7B,QAAQ,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC/C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,IACf,qCAAqC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;AAE/D,MAAM,MAAM,2BAA2B,CAAC,UAAU,SAAS,UAAU,IACjE,qCAAqC,CAAC,UAAU,CAAC,CAAA;AAErD,wBAAsB,iBAAiB,CACnC,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC/C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,EAEf,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,GAClE,OAAO,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC,CAiBlD"}
|
|
@@ -23,7 +23,7 @@ export type KernelAccountClientActions<entryPoint extends EntryPoint, TChain ext
|
|
|
23
23
|
* @param args - Parameters for the signUserOperation function
|
|
24
24
|
* @returns A promise that resolves to the result of the signUserOperation function
|
|
25
25
|
*/
|
|
26
|
-
signUserOperation: <TTransport extends Transport>(args: Parameters<typeof signUserOperation<entryPoint, TTransport, TChain, TSmartAccount>>[1]) => Promise<SignUserOperationReturnType
|
|
26
|
+
signUserOperation: <TTransport extends Transport>(args: Parameters<typeof signUserOperation<entryPoint, TTransport, TChain, TSmartAccount>>[1]) => Promise<SignUserOperationReturnType<entryPoint>>;
|
|
27
27
|
/**
|
|
28
28
|
* Returns the live gas prices that you can use to send a user operation.
|
|
29
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../../clients/decorators/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAuB,MAAM,gBAAgB,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,0DAA0D,CAAA;AACjE,OAAO,KAAK,EAER,2BAA2B,EAC9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EAEpC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EAEtC,MAAM,iDAAiD,CAAA;AAGxD,MAAM,MAAM,6BAA6B,CAAC,UAAU,SAAS,UAAU,IAAI;IACvE;;OAEG;IACH,oBAAoB,EAAE,CAClB,IAAI,EAAE,8BAA8B,CAAC,UAAU,CAAC,KAC/C,OAAO,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAA;IACxD,kBAAkB,EAAE,CAChB,IAAI,EAAE,4BAA4B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,uBAAuB,6EAEvB,MAAM,8CAgBb,CAAA;AAEN,MAAM,MAAM,0BAA0B,CAClC,UAAU,SAAS,UAAU,EAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG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AE,CAClB,IAAI,EAAE,8BAA8B,CAAC,UAAU,CAAC,KAC/C,OAAO,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAA;IACxD,kBAAkB,EAAE,CAChB,IAAI,EAAE,4BAA4B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,uBAAuB,6EAEvB,MAAM,8CAgBb,CAAA;AAEN,MAAM,MAAM,0BAA0B,CAClC,UAAU,SAAS,UAAU,EAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,kBAAkB,CAAC,UAAU,CAAC,GAAG,SAAS,GAC1D,kBAAkB,CAAC,UAAU,CAAC,GAC9B,SAAS,IACf,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG;IACzD;;;;;OAKG;IACH,iBAAiB,EAAE,CAAC,UAAU,SAAS,SAAS,EAC5C,IAAI,EAAE,UAAU,CACZ,OAAO,iBAAiB,CACpB,UAAU,EACV,UAAU,EACV,MAAM,EACN,aAAa,CAChB,CACJ,CAAC,CAAC,CAAC,KACH,OAAO,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC,CAAA;IACrD;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,OAAO,CACnC,QAAQ,CAAC,kCAAkC,CAAC,CAC/C,CAAA;CACJ,CAAA;AAED,wBAAgB,0BAA0B,CAAC,UAAU,SAAS,UAAU,EAAE,EACtE,UAAU,EACb,EAAE,UAAU,CAAC,UAAU,CAAC,2TAqBxB"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { SmartAccount } from "permissionless/accounts/types"
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { prepareUserOperationRequest } from "permissionless/actions/smartAccount"
|
|
3
|
+
import type {
|
|
4
|
+
PrepareUserOperationRequestParameters,
|
|
5
|
+
PrepareUserOperationRequestReturnType
|
|
6
|
+
} from "permissionless/actions/smartAccount/prepareUserOperationRequest"
|
|
6
7
|
import type {
|
|
7
8
|
EntryPoint,
|
|
8
|
-
GetAccountParameter,
|
|
9
9
|
GetEntryPointVersion,
|
|
10
|
-
PartialBy,
|
|
11
10
|
Prettify,
|
|
12
11
|
UserOperation
|
|
13
12
|
} from "permissionless/types"
|
|
@@ -23,24 +22,10 @@ export type SignUserOperationParameters<
|
|
|
23
22
|
TAccount extends SmartAccount<entryPoint> | undefined =
|
|
24
23
|
| SmartAccount<entryPoint>
|
|
25
24
|
| undefined
|
|
26
|
-
> =
|
|
27
|
-
userOperation: PartialBy<
|
|
28
|
-
UserOperation<"v0.6">,
|
|
29
|
-
| "nonce"
|
|
30
|
-
| "sender"
|
|
31
|
-
| "initCode"
|
|
32
|
-
| "signature"
|
|
33
|
-
| "callGasLimit"
|
|
34
|
-
| "maxFeePerGas"
|
|
35
|
-
| "maxPriorityFeePerGas"
|
|
36
|
-
| "preVerificationGas"
|
|
37
|
-
| "verificationGasLimit"
|
|
38
|
-
| "paymasterAndData"
|
|
39
|
-
>
|
|
40
|
-
} & GetAccountParameter<entryPoint, TAccount> &
|
|
41
|
-
Middleware<entryPoint>
|
|
25
|
+
> = PrepareUserOperationRequestParameters<entryPoint, TAccount>
|
|
42
26
|
|
|
43
|
-
export type SignUserOperationReturnType
|
|
27
|
+
export type SignUserOperationReturnType<entryPoint extends EntryPoint> =
|
|
28
|
+
PrepareUserOperationRequestReturnType<entryPoint>
|
|
44
29
|
|
|
45
30
|
export async function signUserOperation<
|
|
46
31
|
entryPoint extends EntryPoint,
|
|
@@ -52,7 +37,7 @@ export async function signUserOperation<
|
|
|
52
37
|
>(
|
|
53
38
|
client: Client<TTransport, TChain, TAccount>,
|
|
54
39
|
args: Prettify<SignUserOperationParameters<entryPoint, TAccount>>
|
|
55
|
-
): Promise<SignUserOperationReturnType
|
|
40
|
+
): Promise<SignUserOperationReturnType<entryPoint>> {
|
|
56
41
|
const { account: account_ = client.account } = args
|
|
57
42
|
if (!account_) throw new AccountOrClientNotFoundError()
|
|
58
43
|
|
|
@@ -68,5 +53,5 @@ export async function signUserOperation<
|
|
|
68
53
|
userOperation as UserOperation<GetEntryPointVersion<entryPoint>>
|
|
69
54
|
)
|
|
70
55
|
|
|
71
|
-
return userOperation as SignUserOperationReturnType
|
|
56
|
+
return userOperation as SignUserOperationReturnType<entryPoint>
|
|
72
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerodev/sdk",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.14",
|
|
4
4
|
"author": "ZeroDev",
|
|
5
5
|
"main": "./_cjs/index.js",
|
|
6
6
|
"module": "./_esm/index.js",
|
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"description": "A utility library for working with ERC-4337",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"ethereum",
|
|
14
|
-
"erc-4337",
|
|
15
|
-
"eip-4337",
|
|
16
|
-
"paymaster",
|
|
17
|
-
"bundler"
|
|
18
|
-
],
|
|
12
|
+
"keywords": ["ethereum", "erc-4337", "eip-4337", "paymaster", "bundler"],
|
|
19
13
|
"license": "MIT",
|
|
20
14
|
"files": [
|
|
21
15
|
"_esm",
|
|
@@ -91,30 +85,14 @@
|
|
|
91
85
|
},
|
|
92
86
|
"typesVersions": {
|
|
93
87
|
"*": {
|
|
94
|
-
"accounts": [
|
|
95
|
-
|
|
96
|
-
],
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
],
|
|
103
|
-
"types": [
|
|
104
|
-
"./_types/types/index.d.ts"
|
|
105
|
-
],
|
|
106
|
-
"actions/kernel": [
|
|
107
|
-
"./_types/actions/kernel/index.d.ts"
|
|
108
|
-
],
|
|
109
|
-
"clients": [
|
|
110
|
-
"./_types/clients/index.d.ts"
|
|
111
|
-
],
|
|
112
|
-
"clients/kernel": [
|
|
113
|
-
"./_types/clients/kernel/index.d.ts"
|
|
114
|
-
],
|
|
115
|
-
"providers": [
|
|
116
|
-
"./_types/providers/index.d.ts"
|
|
117
|
-
]
|
|
88
|
+
"accounts": ["./_types/accounts/index.d.ts"],
|
|
89
|
+
"plugins": ["./_types/plugins/index.d.ts"],
|
|
90
|
+
"actions": ["./_types/actions/index.d.ts"],
|
|
91
|
+
"types": ["./_types/types/index.d.ts"],
|
|
92
|
+
"actions/kernel": ["./_types/actions/kernel/index.d.ts"],
|
|
93
|
+
"clients": ["./_types/clients/index.d.ts"],
|
|
94
|
+
"clients/kernel": ["./_types/clients/kernel/index.d.ts"],
|
|
95
|
+
"providers": ["./_types/providers/index.d.ts"]
|
|
118
96
|
}
|
|
119
97
|
},
|
|
120
98
|
"peerDependencies": {
|