@account-kit/wallet-client 0.1.0-alpha.5 → 0.1.0-alpha.7
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/esm/capabilities/eip7702Auth.js +3 -1
- package/dist/esm/capabilities/eip7702Auth.js.map +1 -1
- package/dist/esm/capabilities/overrides.js +8 -8
- package/dist/esm/capabilities/overrides.js.map +1 -1
- package/dist/esm/capabilities/permissions/index.d.ts +1 -1
- package/dist/esm/capabilities/permissions/index.js +6 -3
- package/dist/esm/capabilities/permissions/index.js.map +1 -1
- package/dist/esm/client/actions/grantPermissions.d.ts +5 -60
- package/dist/esm/client/actions/grantPermissions.js +5 -58
- package/dist/esm/client/actions/grantPermissions.js.map +1 -1
- package/dist/esm/client/actions/requestAccount.js +5 -2
- package/dist/esm/client/actions/requestAccount.js.map +1 -1
- package/dist/esm/client/actions/sendPreparedCalls.d.ts +6 -14
- package/dist/esm/client/actions/sendPreparedCalls.js +11 -12
- package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/client/actions/signPreparedCalls.d.ts +14 -0
- package/dist/esm/client/actions/signPreparedCalls.js +54 -0
- package/dist/esm/client/actions/signPreparedCalls.js.map +1 -0
- package/dist/esm/client/actions/signSignatureRequest.d.ts +8 -7
- package/dist/esm/client/actions/signSignatureRequest.js +69 -31
- package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
- package/dist/esm/client/client.e2e-test.js +80 -24
- package/dist/esm/client/client.e2e-test.js.map +1 -1
- package/dist/esm/client/decorator.d.ts +3 -1
- package/dist/esm/client/decorator.js +3 -1
- package/dist/esm/client/decorator.js.map +1 -1
- package/dist/esm/exports/index.d.ts +2 -1
- package/dist/esm/exports/index.js +2 -1
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/isomorphic/actions/createSession.js +18 -32
- package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
- package/dist/esm/isomorphic/actions/prepareCalls.js +22 -16
- package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
- package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +3 -3
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js +76 -36
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/isomorphic/client.d.ts +139 -13
- package/dist/esm/isomorphic/utils/7702.d.ts +4 -3
- package/dist/esm/isomorphic/utils/7702.js +14 -6
- package/dist/esm/isomorphic/utils/7702.js.map +1 -1
- package/dist/esm/isomorphic/utils/decodeSignature.d.ts +3 -0
- package/dist/esm/isomorphic/utils/decodeSignature.js +13 -0
- package/dist/esm/isomorphic/utils/decodeSignature.js.map +1 -0
- package/dist/esm/local/client.js +2 -3
- package/dist/esm/local/client.js.map +1 -1
- package/dist/esm/remote/client.js +3 -7
- package/dist/esm/remote/client.js.map +1 -1
- package/dist/esm/rpc/examples.d.ts +3 -3
- package/dist/esm/rpc/examples.js +3 -3
- package/dist/esm/rpc/examples.js.map +1 -1
- package/dist/esm/rpc/request.d.ts +357 -49
- package/dist/esm/rpc/request.js +26 -53
- package/dist/esm/rpc/request.js.map +1 -1
- package/dist/esm/rpc/schema.d.ts +323 -57
- package/dist/esm/rpc/schema.js.map +1 -1
- package/dist/esm/schemas.d.ts +451 -13
- package/dist/esm/schemas.js +165 -52
- package/dist/esm/schemas.js.map +1 -1
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/types/capabilities/eip7702Auth.d.ts.map +1 -1
- package/dist/types/capabilities/permissions/index.d.ts +1 -1
- package/dist/types/capabilities/permissions/index.d.ts.map +1 -1
- package/dist/types/client/actions/grantPermissions.d.ts +5 -60
- package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
- package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
- package/dist/types/client/actions/sendPreparedCalls.d.ts +6 -14
- package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/client/actions/signPreparedCalls.d.ts +15 -0
- package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -0
- package/dist/types/client/actions/signSignatureRequest.d.ts +8 -7
- package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
- package/dist/types/client/decorator.d.ts +3 -1
- package/dist/types/client/decorator.d.ts.map +1 -1
- package/dist/types/exports/index.d.ts +2 -1
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +3 -3
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/client.d.ts +139 -13
- package/dist/types/isomorphic/client.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/7702.d.ts +4 -3
- package/dist/types/isomorphic/utils/7702.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/decodeSignature.d.ts +4 -0
- package/dist/types/isomorphic/utils/decodeSignature.d.ts.map +1 -0
- package/dist/types/remote/client.d.ts.map +1 -1
- package/dist/types/rpc/examples.d.ts +3 -3
- package/dist/types/rpc/examples.d.ts.map +1 -1
- package/dist/types/rpc/request.d.ts +357 -49
- package/dist/types/rpc/request.d.ts.map +1 -1
- package/dist/types/rpc/schema.d.ts +323 -57
- package/dist/types/rpc/schema.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +451 -13
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/capabilities/eip7702Auth.ts +17 -10
- package/src/capabilities/overrides.ts +8 -8
- package/src/capabilities/permissions/index.ts +8 -3
- package/src/client/actions/grantPermissions.ts +5 -60
- package/src/client/actions/requestAccount.ts +10 -8
- package/src/client/actions/sendPreparedCalls.ts +17 -17
- package/src/client/actions/signPreparedCalls.ts +72 -0
- package/src/client/actions/signSignatureRequest.ts +50 -46
- package/src/client/client.e2e-test.ts +101 -33
- package/src/client/decorator.ts +14 -5
- package/src/exports/index.ts +2 -1
- package/src/isomorphic/actions/createSession.ts +20 -42
- package/src/isomorphic/actions/prepareCalls.ts +25 -17
- package/src/isomorphic/actions/sendPreparedCalls.ts +104 -54
- package/src/isomorphic/utils/7702.ts +18 -8
- package/src/isomorphic/utils/decodeSignature.ts +18 -0
- package/src/local/client.ts +2 -6
- package/src/remote/client.ts +3 -10
- package/src/rpc/examples.ts +3 -4
- package/src/rpc/request.ts +41 -63
- package/src/rpc/schema.ts +2 -2
- package/src/schemas.ts +227 -53
- package/src/types.ts +4 -0
package/dist/esm/rpc/request.js
CHANGED
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { Capabilities } from "../capabilities/index.js";
|
|
3
3
|
import { PermissionsContext, PermissionsData, RemotePermission, } from "../capabilities/permissions/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TypeCallArray, TypePrepareCall_UserOpV060_Signed, TypePrepareCall_UserOpV070_Signed, PreparedCall_Authorization, PreparedCall_UserOpV060, PreparedCall_UserOpV070, TypeAddress, TypeBase64UrlEncodedString, TypeCreationOptions, TypeHex, TypeSerializedInitcode, TypeTypedDataSignatureRequest, TypeUuid, } from "../schemas.js";
|
|
5
5
|
import { Examples } from "./examples.js";
|
|
6
|
-
import { Eip7702AuthCapability } from "../capabilities/eip7702Auth.js";
|
|
7
6
|
export const wallet_sendPreparedCalls = Type.Object({
|
|
8
7
|
Request: Type.Object({
|
|
9
8
|
method: Type.Literal("wallet_sendPreparedCalls"),
|
|
10
9
|
params: Type.Tuple([
|
|
11
|
-
Type.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Type.Literal("user-operation-v070", {
|
|
17
|
-
title: "User Operation (Entrypoint v0.7.0)",
|
|
18
|
-
}),
|
|
19
|
-
]),
|
|
20
|
-
data: Type.Union([
|
|
21
|
-
Type.Omit(TypeUserOperationRequest_v6, ["signature"], {
|
|
22
|
-
title: "Unsigned User Operation (Entrypoint v0.6.0)",
|
|
23
|
-
}),
|
|
24
|
-
Type.Omit(TypeUserOperationRequest_v7, ["signature"], {
|
|
25
|
-
title: "Unsigned User Operation (Entrypoint v0.7.0)",
|
|
26
|
-
}),
|
|
10
|
+
Type.Intersect([
|
|
11
|
+
Type.Union([
|
|
12
|
+
TypeCallArray,
|
|
13
|
+
TypePrepareCall_UserOpV060_Signed,
|
|
14
|
+
TypePrepareCall_UserOpV070_Signed,
|
|
27
15
|
]),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
Type.Object({
|
|
17
|
+
capabilities: Type.Optional(Type.Object({
|
|
18
|
+
permissions: Type.Optional(Type.Union([PermissionsContext, RemotePermission])),
|
|
19
|
+
})),
|
|
32
20
|
}),
|
|
33
|
-
|
|
34
|
-
capabilities: Type.Optional(Type.Object({
|
|
35
|
-
permissions: Type.Optional(Type.Union([PermissionsContext, RemotePermission])),
|
|
36
|
-
})),
|
|
37
|
-
}),
|
|
21
|
+
]),
|
|
38
22
|
]),
|
|
39
23
|
}),
|
|
40
24
|
ReturnType: Type.Object({
|
|
@@ -60,26 +44,18 @@ export const wallet_prepareCalls = Type.Object({
|
|
|
60
44
|
}),
|
|
61
45
|
]),
|
|
62
46
|
}),
|
|
63
|
-
ReturnType: Type.
|
|
64
|
-
|
|
65
|
-
Type.Literal("
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}),
|
|
76
|
-
Type.Omit(TypeUserOperationRequest_v7, ["signature"], {
|
|
77
|
-
title: "Unsigned User Operation (Entrypoint v0.7.0)",
|
|
78
|
-
}),
|
|
79
|
-
]),
|
|
80
|
-
chainId: TypeHex(),
|
|
81
|
-
signatureRequest: TypeSignatureRequest,
|
|
82
|
-
}),
|
|
47
|
+
ReturnType: Type.Union([
|
|
48
|
+
Type.Object({
|
|
49
|
+
type: Type.Literal("array"),
|
|
50
|
+
data: Type.Array(Type.Union([
|
|
51
|
+
PreparedCall_UserOpV060,
|
|
52
|
+
PreparedCall_UserOpV070,
|
|
53
|
+
PreparedCall_Authorization,
|
|
54
|
+
])),
|
|
55
|
+
}, { description: "Array of prepared calls" }),
|
|
56
|
+
PreparedCall_UserOpV060,
|
|
57
|
+
PreparedCall_UserOpV070,
|
|
58
|
+
]),
|
|
83
59
|
}, {
|
|
84
60
|
description: "This method is used to prepare a user operation for submission. It will return a built user operation and a signature request which needs to be signed by the user before submitting to wallet_sendPreparedCalls",
|
|
85
61
|
examples: Examples.PrepareCalls,
|
|
@@ -95,13 +71,13 @@ export const wallet_requestAccount = Type.Object({
|
|
|
95
71
|
creationHint: TypeCreationOptions,
|
|
96
72
|
includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
|
|
97
73
|
}, {
|
|
98
|
-
|
|
74
|
+
description: "Using signer address",
|
|
99
75
|
}),
|
|
100
76
|
Type.Object({
|
|
101
77
|
accountAddress: TypeAddress,
|
|
102
78
|
includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
|
|
103
79
|
}, {
|
|
104
|
-
|
|
80
|
+
description: "Using smart contract account address",
|
|
105
81
|
}),
|
|
106
82
|
]),
|
|
107
83
|
]),
|
|
@@ -168,16 +144,13 @@ export const wallet_createSession = Type.Object({
|
|
|
168
144
|
PermissionsData,
|
|
169
145
|
Type.Object({
|
|
170
146
|
account: TypeAddress,
|
|
171
|
-
capabilities: Type.Optional(Type.Object({
|
|
172
|
-
eip7702Auth: Type.Optional(Eip7702AuthCapability),
|
|
173
|
-
})),
|
|
174
147
|
}),
|
|
175
148
|
]),
|
|
176
149
|
]),
|
|
177
150
|
}),
|
|
178
151
|
ReturnType: Type.Object({
|
|
179
152
|
sessionId: TypeHex(),
|
|
180
|
-
signatureRequest:
|
|
153
|
+
signatureRequest: TypeTypedDataSignatureRequest,
|
|
181
154
|
}),
|
|
182
155
|
}, {
|
|
183
156
|
description: "This method is used to create a session for a given address with specified permissions.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACnB,6BAA6B,EAC7B,OAAO,EACP,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,QAAQ,EACR,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAChD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;YACjB,IAAI,CAAC,MAAM,CAAC;gBACV,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;oBACf,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;wBAClC,KAAK,EAAE,oCAAoC;qBAC5C,CAAC;oBACF,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;wBAClC,KAAK,EAAE,oCAAoC;qBAC5C,CAAC;iBACH,CAAC;gBACF,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;oBACf,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,WAAW,CAAC,EAAE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W;gBAClB,WAAW,EACT,4FAA4F;aAC/F,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EACT,+DAA+D;aAClE,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EACT,mGAAmG;aACtG,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EACT,mGAAmG;aACtG,CAAC;SACH,CAAC;QACF,QAAQ,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,KAAK,CACR,IAAI,CAAC,MAAM,CAAC;YACV,IAAI,EAAE,IAAI,CAAC,KAAK,CACd,IAAI,CAAC,MAAM,CAAC;gBACV,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,OAAO,EAAE;gBACf,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aAC9B,CAAC,CACH;YACD,MAAM,EAAE,OAAO,CAAC;gBACd,WAAW,EAAE,kCAAkC;aAChD,CAAC;YACF,SAAS,EAAE,OAAO,EAAE;YACpB,WAAW,EAAE,OAAO,EAAE;YACtB,OAAO,EAAE,OAAO,EAAE;YAClB,eAAe,EAAE,OAAO,EAAE;SAC3B,CAAC,CACH,CACF;KACF,CAAC;CACH,EACD;IACE,WAAW,EACT,4FAA4F;IAC9F,QAAQ,EAAE,QAAQ,CAAC,cAAc;CAClC,CACF,CAAC","sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { Capabilities } from \"../capabilities/index.js\";\nimport {\n PermissionsContext,\n PermissionsData,\n RemotePermission,\n} from \"../capabilities/permissions/index.js\";\nimport {\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeEip7702AuthExtendedFields,\n TypeHex,\n TypeSerializedInitcode,\n TypeSignatureRequest,\n TypeUserOperationRequest_v6,\n TypeUserOperationRequest_v7,\n TypeUuid,\n TypeSignatureType,\n} from \"../schemas.js\";\nimport { Examples } from \"./examples.js\";\nimport { Eip7702AuthCapability } from \"../capabilities/eip7702Auth.js\";\n\nexport const wallet_sendPreparedCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_sendPreparedCalls\"),\n params: Type.Tuple([\n Type.Object({\n type: Type.Union([\n Type.Literal(\"user-operation-v060\", {\n title: \"User Operation (Entrypoint v0.6.0)\",\n }),\n Type.Literal(\"user-operation-v070\", {\n title: \"User Operation (Entrypoint v0.7.0)\",\n }),\n ]),\n data: Type.Union([\n Type.Omit(TypeUserOperationRequest_v6, [\"signature\"], {\n title: \"Unsigned User Operation (Entrypoint v0.6.0)\",\n }),\n Type.Omit(TypeUserOperationRequest_v7, [\"signature\"], {\n title: \"Unsigned User Operation (Entrypoint v0.7.0)\",\n }),\n ]),\n chainId: TypeHex(),\n signature: Type.Object({\n type: Type.Exclude(TypeSignatureType, Type.Literal(\"contract\")),\n signature: TypeHex(),\n }),\n signedAuthorization: Type.Optional(TypeEip7702AuthExtendedFields),\n capabilities: Type.Optional(\n Type.Object({\n permissions: Type.Optional(\n Type.Union([PermissionsContext, RemotePermission]),\n ),\n }),\n ),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n preparedCallIds: Type.Array(TypeHex()),\n }),\n },\n {\n description:\n \"This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation\",\n examples: Examples.SendPreparedCalls,\n },\n);\n\nexport const wallet_prepareCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_prepareCalls\"),\n params: Type.Tuple([\n Type.Object({\n calls: Type.Array(\n Type.Object({\n to: TypeAddress,\n data: Type.Optional(TypeHex()),\n value: Type.Optional(TypeHex()),\n }),\n ),\n from: TypeAddress,\n chainId: TypeHex(),\n capabilities: Type.Optional(Capabilities),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n type: Type.Union([\n Type.Literal(\"user-operation-v060\", {\n title: \"User Operation (Entrypoint v0.6.0)\",\n }),\n Type.Literal(\"user-operation-v070\", {\n title: \"User Operation (Entrypoint v0.7.0)\",\n }),\n ]),\n data: Type.Union([\n Type.Omit(TypeUserOperationRequest_v6, [\"signature\"], {\n title: \"Unsigned User Operation (Entrypoint v0.6.0)\",\n }),\n Type.Omit(TypeUserOperationRequest_v7, [\"signature\"], {\n title: \"Unsigned User Operation (Entrypoint v0.7.0)\",\n }),\n ]),\n chainId: TypeHex(),\n signatureRequest: TypeSignatureRequest,\n }),\n },\n {\n description:\n \"This method is used to prepare a user operation for submission. It will return a built user operation and a signature request which needs to be signed by the user before submitting to wallet_sendPreparedCalls\",\n examples: Examples.PrepareCalls,\n },\n);\n\nexport const wallet_requestAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_requestAccount\"),\n params: Type.Tuple([\n Type.Union([\n Type.Object(\n {\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationHint: TypeCreationOptions,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n title: \"Using signer address\",\n },\n ),\n Type.Object(\n {\n accountAddress: TypeAddress,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n title: \"Using smart contract account address\",\n },\n ),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n counterfactualInfo: Type.Optional(TypeSerializedInitcode),\n delegation: Type.Optional(TypeAddress),\n }),\n },\n {\n description: `This method is used to get the smart account address and relevant info for a given signer. If an account does not already exist for a given signer, this method will create one before returning the counterfactual address.`,\n examples: Examples.RequestAccount,\n },\n);\n\nexport const wallet_createAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createAccount\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationOptions: TypeCreationOptions,\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n },\n {\n description: `This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead.`,\n examples: Examples.CreateAccount,\n },\n);\n\nexport const wallet_listAccounts = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_listAccounts\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n limit: Type.Optional(\n Type.Number({ minimum: 1, maximum: 100, default: 100 }),\n ),\n after: Type.Optional(TypeBase64UrlEncodedString),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accounts: Type.Array(\n Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n ),\n meta: Type.Object({\n totalCount: Type.Integer(),\n after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),\n }),\n }),\n },\n {\n description:\n \"This method is used to list all smart accounts for a given signer.\",\n examples: Examples.ListAccounts,\n },\n);\n\nexport const wallet_createSession = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createSession\"),\n params: Type.Tuple([\n Type.Intersect([\n PermissionsData,\n Type.Object({\n account: TypeAddress,\n capabilities: Type.Optional(\n Type.Object({\n eip7702Auth: Type.Optional(Eip7702AuthCapability),\n }),\n ),\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n sessionId: TypeHex(),\n signatureRequest: TypeSignatureRequest,\n }),\n },\n {\n description:\n \"This method is used to create a session for a given address with specified permissions.\",\n examples: Examples.CreateSession,\n },\n);\n\nexport const wallet_getCallsStatus = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_getCallsStatus\"),\n params: Type.Tuple([\n TypeHex({\n description: \"The call ID returned from wallet_sendPreparedCalls\",\n }),\n ]),\n }),\n ReturnType: Type.Object({\n id: TypeHex(),\n chainId: TypeHex(),\n atomic: Type.Boolean(),\n status: Type.Union([\n Type.Literal(100, {\n title: \"Pending\",\n description:\n \"Batch has been received by the wallet but has not completed execution onchain\",\n }),\n Type.Literal(200, {\n title: \"Confirmed\",\n description:\n \"Batch has been included onchain without reverts, receipts array contains info of all calls\",\n }),\n Type.Literal(400, {\n title: \"Offchain Failure\",\n description:\n \"Batch has not been included onchain and wallet will not retry\",\n }),\n Type.Literal(500, {\n title: \"Onchain Failure\",\n description:\n \"Batch reverted *completely* and only changes related to gas charge may have been included onchain\",\n }),\n Type.Literal(600, {\n title: \"Partial Onchain Failure\",\n description:\n \"Batch reverted *partially* and some changes related to batch calls may have been included onchain\",\n }),\n ]),\n receipts: Type.Optional(\n Type.Array(\n Type.Object({\n logs: Type.Array(\n Type.Object({\n address: TypeAddress,\n data: TypeHex(),\n topics: Type.Array(TypeHex()),\n }),\n ),\n status: TypeHex({\n description: \"0x1 for success, 0x0 for failure\",\n }),\n blockHash: TypeHex(),\n blockNumber: TypeHex(),\n gasUsed: TypeHex(),\n transactionHash: TypeHex(),\n }),\n ),\n ),\n }),\n },\n {\n description:\n \"This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.\",\n examples: Examples.GetCallsStatus,\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACnB,OAAO,EACP,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,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CAAC,MAAM,CAAC;gBACV,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,OAAO,EAAE;gBACf,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aAC9B,CAAC,CACH;YACD,MAAM,EAAE,OAAO,CAAC;gBACd,WAAW,EAAE,kCAAkC;aAChD,CAAC;YACF,SAAS,EAAE,OAAO,EAAE;YACpB,WAAW,EAAE,OAAO,EAAE;YACtB,OAAO,EAAE,OAAO,EAAE;YAClB,eAAe,EAAE,OAAO,EAAE;SAC3B,CAAC,CACH,CACF;KACF,CAAC;CACH,EACD;IACE,WAAW,EACT,4FAA4F;IAC9F,QAAQ,EAAE,QAAQ,CAAC,cAAc;CAClC,CACF,CAAC","sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { Capabilities } from \"../capabilities/index.js\";\nimport {\n PermissionsContext,\n PermissionsData,\n RemotePermission,\n} from \"../capabilities/permissions/index.js\";\nimport {\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n PreparedCall_Authorization,\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeHex,\n TypeSerializedInitcode,\n TypeTypedDataSignatureRequest,\n TypeUuid,\n} from \"../schemas.js\";\nimport { Examples } from \"./examples.js\";\n\nexport const wallet_sendPreparedCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_sendPreparedCalls\"),\n params: Type.Tuple([\n Type.Intersect([\n Type.Union([\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n ]),\n Type.Object({\n capabilities: Type.Optional(\n Type.Object({\n permissions: Type.Optional(\n Type.Union([PermissionsContext, RemotePermission]),\n ),\n }),\n ),\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n preparedCallIds: Type.Array(TypeHex()),\n }),\n },\n {\n description:\n \"This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation\",\n examples: Examples.SendPreparedCalls,\n },\n);\n\nexport const wallet_prepareCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_prepareCalls\"),\n params: Type.Tuple([\n Type.Object({\n calls: Type.Array(\n Type.Object({\n to: TypeAddress,\n data: Type.Optional(TypeHex()),\n value: Type.Optional(TypeHex()),\n }),\n ),\n from: TypeAddress,\n chainId: TypeHex(),\n capabilities: Type.Optional(Capabilities),\n }),\n ]),\n }),\n ReturnType: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n PreparedCall_Authorization,\n ]),\n ),\n },\n { description: \"Array of prepared calls\" },\n ),\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n ]),\n },\n {\n description:\n \"This method is used to prepare a user operation for submission. It will return a built user operation and a signature request which needs to be signed by the user before submitting to wallet_sendPreparedCalls\",\n examples: Examples.PrepareCalls,\n },\n);\n\nexport const wallet_requestAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_requestAccount\"),\n params: Type.Tuple([\n Type.Union([\n Type.Object(\n {\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationHint: TypeCreationOptions,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using signer address\",\n },\n ),\n Type.Object(\n {\n accountAddress: TypeAddress,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using smart contract account address\",\n },\n ),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n counterfactualInfo: Type.Optional(TypeSerializedInitcode),\n delegation: Type.Optional(TypeAddress),\n }),\n },\n {\n description: `This method is used to get the smart account address and relevant info for a given signer. If an account does not already exist for a given signer, this method will create one before returning the counterfactual address.`,\n examples: Examples.RequestAccount,\n },\n);\n\nexport const wallet_createAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createAccount\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationOptions: TypeCreationOptions,\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n },\n {\n description: `This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead.`,\n examples: Examples.CreateAccount,\n },\n);\n\nexport const wallet_listAccounts = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_listAccounts\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n limit: Type.Optional(\n Type.Number({ minimum: 1, maximum: 100, default: 100 }),\n ),\n after: Type.Optional(TypeBase64UrlEncodedString),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accounts: Type.Array(\n Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n ),\n meta: Type.Object({\n totalCount: Type.Integer(),\n after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),\n }),\n }),\n },\n {\n description:\n \"This method is used to list all smart accounts for a given signer.\",\n examples: Examples.ListAccounts,\n },\n);\n\nexport const wallet_createSession = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createSession\"),\n params: Type.Tuple([\n Type.Intersect([\n PermissionsData,\n Type.Object({\n account: TypeAddress,\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n sessionId: TypeHex(),\n signatureRequest: TypeTypedDataSignatureRequest,\n }),\n },\n {\n description:\n \"This method is used to create a session for a given address with specified permissions.\",\n examples: Examples.CreateSession,\n },\n);\n\nexport const wallet_getCallsStatus = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_getCallsStatus\"),\n params: Type.Tuple([\n TypeHex({\n description: \"The call ID returned from wallet_sendPreparedCalls\",\n }),\n ]),\n }),\n ReturnType: Type.Object({\n id: TypeHex(),\n chainId: TypeHex(),\n atomic: Type.Boolean(),\n status: Type.Union([\n Type.Literal(100, {\n title: \"Pending\",\n description:\n \"Batch has been received by the wallet but has not completed execution onchain\",\n }),\n Type.Literal(200, {\n title: \"Confirmed\",\n description:\n \"Batch has been included onchain without reverts, receipts array contains info of all calls\",\n }),\n Type.Literal(400, {\n title: \"Offchain Failure\",\n description:\n \"Batch has not been included onchain and wallet will not retry\",\n }),\n Type.Literal(500, {\n title: \"Onchain Failure\",\n description:\n \"Batch reverted *completely* and only changes related to gas charge may have been included onchain\",\n }),\n Type.Literal(600, {\n title: \"Partial Onchain Failure\",\n description:\n \"Batch reverted *partially* and some changes related to batch calls may have been included onchain\",\n }),\n ]),\n receipts: Type.Optional(\n Type.Array(\n Type.Object({\n logs: Type.Array(\n Type.Object({\n address: TypeAddress,\n data: TypeHex(),\n topics: Type.Array(TypeHex()),\n }),\n ),\n status: TypeHex({\n description: \"0x1 for success, 0x0 for failure\",\n }),\n blockHash: TypeHex(),\n blockNumber: TypeHex(),\n gasUsed: TypeHex(),\n transactionHash: TypeHex(),\n }),\n ),\n ),\n }),\n },\n {\n description:\n \"This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.\",\n examples: Examples.GetCallsStatus,\n },\n);\n"]}
|
package/dist/esm/rpc/schema.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ export declare const WalletServerRpcSchema: {
|
|
|
2
2
|
Request: {
|
|
3
3
|
params: [{
|
|
4
4
|
capabilities?: {
|
|
5
|
+
eip7702Auth?: true | {
|
|
6
|
+
account?: `0x${string}` | undefined;
|
|
7
|
+
delegation: "ModularAccountV2" | "0x69007702764179f14F51cdce752f4f775d74E139";
|
|
8
|
+
} | undefined;
|
|
5
9
|
permissions?: {
|
|
6
10
|
context: `0x${string}`;
|
|
7
11
|
} | {
|
|
@@ -34,10 +38,6 @@ export declare const WalletServerRpcSchema: {
|
|
|
34
38
|
multiplier: number;
|
|
35
39
|
} | undefined;
|
|
36
40
|
} | undefined;
|
|
37
|
-
eip7702Auth?: true | {
|
|
38
|
-
account?: `0x${string}` | undefined;
|
|
39
|
-
delegation: "ModularAccountV2" | "0x69007702764179f14F51cdce752f4f775d74E139";
|
|
40
|
-
} | undefined;
|
|
41
41
|
} | undefined;
|
|
42
42
|
chainId: `0x${string}`;
|
|
43
43
|
calls: {
|
|
@@ -50,7 +50,108 @@ export declare const WalletServerRpcSchema: {
|
|
|
50
50
|
method: "wallet_prepareCalls";
|
|
51
51
|
};
|
|
52
52
|
ReturnType: {
|
|
53
|
-
type: "
|
|
53
|
+
type: "array";
|
|
54
|
+
data: ({
|
|
55
|
+
type: "user-operation-v060";
|
|
56
|
+
chainId: `0x${string}`;
|
|
57
|
+
data: {
|
|
58
|
+
sender: `0x${string}`;
|
|
59
|
+
nonce: `0x${string}`;
|
|
60
|
+
initCode: `0x${string}`;
|
|
61
|
+
callData: `0x${string}`;
|
|
62
|
+
callGasLimit: `0x${string}`;
|
|
63
|
+
verificationGasLimit: `0x${string}`;
|
|
64
|
+
preVerificationGas: `0x${string}`;
|
|
65
|
+
maxFeePerGas: `0x${string}`;
|
|
66
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
67
|
+
paymasterAndData: `0x${string}`;
|
|
68
|
+
};
|
|
69
|
+
signatureRequest: {
|
|
70
|
+
type: "eth_signTypedData_v4";
|
|
71
|
+
data: {
|
|
72
|
+
domain?: {
|
|
73
|
+
chainId?: number | undefined;
|
|
74
|
+
salt?: `0x${string}` | undefined;
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
verifyingContract?: `0x${string}` | undefined;
|
|
77
|
+
version?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
types: {
|
|
80
|
+
[x: string]: {
|
|
81
|
+
type: string;
|
|
82
|
+
name: string;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
primaryType: string;
|
|
86
|
+
message: {
|
|
87
|
+
[x: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} | {
|
|
91
|
+
type: "personal_sign";
|
|
92
|
+
data: string | {
|
|
93
|
+
raw: `0x${string}`;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
type: "user-operation-v070";
|
|
98
|
+
chainId: `0x${string}`;
|
|
99
|
+
data: {
|
|
100
|
+
factory?: `0x${string}` | undefined;
|
|
101
|
+
factoryData?: `0x${string}` | undefined;
|
|
102
|
+
paymaster?: `0x${string}` | undefined;
|
|
103
|
+
paymasterData?: `0x${string}` | undefined;
|
|
104
|
+
paymasterVerificationGasLimit?: `0x${string}` | undefined;
|
|
105
|
+
paymasterPostOpGasLimit?: `0x${string}` | undefined;
|
|
106
|
+
sender: `0x${string}`;
|
|
107
|
+
nonce: `0x${string}`;
|
|
108
|
+
callData: `0x${string}`;
|
|
109
|
+
callGasLimit: `0x${string}`;
|
|
110
|
+
verificationGasLimit: `0x${string}`;
|
|
111
|
+
preVerificationGas: `0x${string}`;
|
|
112
|
+
maxFeePerGas: `0x${string}`;
|
|
113
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
114
|
+
};
|
|
115
|
+
signatureRequest: {
|
|
116
|
+
type: "eth_signTypedData_v4";
|
|
117
|
+
data: {
|
|
118
|
+
domain?: {
|
|
119
|
+
chainId?: number | undefined;
|
|
120
|
+
salt?: `0x${string}` | undefined;
|
|
121
|
+
name?: string | undefined;
|
|
122
|
+
verifyingContract?: `0x${string}` | undefined;
|
|
123
|
+
version?: string | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
types: {
|
|
126
|
+
[x: string]: {
|
|
127
|
+
type: string;
|
|
128
|
+
name: string;
|
|
129
|
+
}[];
|
|
130
|
+
};
|
|
131
|
+
primaryType: string;
|
|
132
|
+
message: {
|
|
133
|
+
[x: string]: unknown;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
} | {
|
|
137
|
+
type: "personal_sign";
|
|
138
|
+
data: string | {
|
|
139
|
+
raw: `0x${string}`;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
} | {
|
|
143
|
+
type: "authorization";
|
|
144
|
+
chainId: `0x${string}`;
|
|
145
|
+
data: {
|
|
146
|
+
nonce: `0x${string}`;
|
|
147
|
+
address: `0x${string}`;
|
|
148
|
+
};
|
|
149
|
+
signatureRequest: {
|
|
150
|
+
type: "eip7702Auth";
|
|
151
|
+
};
|
|
152
|
+
})[];
|
|
153
|
+
} | {
|
|
154
|
+
type: "user-operation-v060";
|
|
54
155
|
chainId: `0x${string}`;
|
|
55
156
|
data: {
|
|
56
157
|
sender: `0x${string}`;
|
|
@@ -63,7 +164,38 @@ export declare const WalletServerRpcSchema: {
|
|
|
63
164
|
maxFeePerGas: `0x${string}`;
|
|
64
165
|
maxPriorityFeePerGas: `0x${string}`;
|
|
65
166
|
paymasterAndData: `0x${string}`;
|
|
167
|
+
};
|
|
168
|
+
signatureRequest: {
|
|
169
|
+
type: "eth_signTypedData_v4";
|
|
170
|
+
data: {
|
|
171
|
+
domain?: {
|
|
172
|
+
chainId?: number | undefined;
|
|
173
|
+
salt?: `0x${string}` | undefined;
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
verifyingContract?: `0x${string}` | undefined;
|
|
176
|
+
version?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
types: {
|
|
179
|
+
[x: string]: {
|
|
180
|
+
type: string;
|
|
181
|
+
name: string;
|
|
182
|
+
}[];
|
|
183
|
+
};
|
|
184
|
+
primaryType: string;
|
|
185
|
+
message: {
|
|
186
|
+
[x: string]: unknown;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
66
189
|
} | {
|
|
190
|
+
type: "personal_sign";
|
|
191
|
+
data: string | {
|
|
192
|
+
raw: `0x${string}`;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
type: "user-operation-v070";
|
|
197
|
+
chainId: `0x${string}`;
|
|
198
|
+
data: {
|
|
67
199
|
factory?: `0x${string}` | undefined;
|
|
68
200
|
factoryData?: `0x${string}` | undefined;
|
|
69
201
|
paymaster?: `0x${string}` | undefined;
|
|
@@ -79,12 +211,7 @@ export declare const WalletServerRpcSchema: {
|
|
|
79
211
|
maxFeePerGas: `0x${string}`;
|
|
80
212
|
maxPriorityFeePerGas: `0x${string}`;
|
|
81
213
|
};
|
|
82
|
-
signatureRequest:
|
|
83
|
-
type: "personal_sign";
|
|
84
|
-
data: string | {
|
|
85
|
-
raw: `0x${string}`;
|
|
86
|
-
};
|
|
87
|
-
} | {
|
|
214
|
+
signatureRequest: {
|
|
88
215
|
type: "eth_signTypedData_v4";
|
|
89
216
|
data: {
|
|
90
217
|
domain?: {
|
|
@@ -105,38 +232,133 @@ export declare const WalletServerRpcSchema: {
|
|
|
105
232
|
[x: string]: unknown;
|
|
106
233
|
};
|
|
107
234
|
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} | undefined;
|
|
235
|
+
} | {
|
|
236
|
+
type: "personal_sign";
|
|
237
|
+
data: string | {
|
|
238
|
+
raw: `0x${string}`;
|
|
239
|
+
};
|
|
114
240
|
};
|
|
115
241
|
};
|
|
116
242
|
} | {
|
|
117
243
|
Request: {
|
|
118
|
-
params: [{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
244
|
+
params: [({
|
|
245
|
+
type: "array";
|
|
246
|
+
data: (({
|
|
247
|
+
type: "user-operation-v060";
|
|
248
|
+
chainId: `0x${string}`;
|
|
249
|
+
data: {
|
|
250
|
+
sender: `0x${string}`;
|
|
251
|
+
nonce: `0x${string}`;
|
|
252
|
+
initCode: `0x${string}`;
|
|
253
|
+
callData: `0x${string}`;
|
|
254
|
+
callGasLimit: `0x${string}`;
|
|
255
|
+
verificationGasLimit: `0x${string}`;
|
|
256
|
+
preVerificationGas: `0x${string}`;
|
|
257
|
+
maxFeePerGas: `0x${string}`;
|
|
258
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
259
|
+
paymasterAndData: `0x${string}`;
|
|
260
|
+
};
|
|
261
|
+
} & {
|
|
262
|
+
signature: {
|
|
263
|
+
type: "secp256k1";
|
|
264
|
+
data: `0x${string}` | {
|
|
265
|
+
r: `0x${string}`;
|
|
266
|
+
s: `0x${string}`;
|
|
267
|
+
yParity: `0x${string}`;
|
|
268
|
+
} | {
|
|
269
|
+
r: `0x${string}`;
|
|
270
|
+
s: `0x${string}`;
|
|
271
|
+
v: `0x${string}`;
|
|
272
|
+
};
|
|
122
273
|
} | {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
274
|
+
type: "ecdsa";
|
|
275
|
+
data: `0x${string}` | {
|
|
276
|
+
r: `0x${string}`;
|
|
277
|
+
s: `0x${string}`;
|
|
278
|
+
yParity: `0x${string}`;
|
|
279
|
+
} | {
|
|
280
|
+
r: `0x${string}`;
|
|
281
|
+
s: `0x${string}`;
|
|
282
|
+
v: `0x${string}`;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
}) | ({
|
|
286
|
+
type: "user-operation-v070";
|
|
129
287
|
chainId: `0x${string}`;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
288
|
+
data: {
|
|
289
|
+
factory?: `0x${string}` | undefined;
|
|
290
|
+
factoryData?: `0x${string}` | undefined;
|
|
291
|
+
paymaster?: `0x${string}` | undefined;
|
|
292
|
+
paymasterData?: `0x${string}` | undefined;
|
|
293
|
+
paymasterVerificationGasLimit?: `0x${string}` | undefined;
|
|
294
|
+
paymasterPostOpGasLimit?: `0x${string}` | undefined;
|
|
295
|
+
sender: `0x${string}`;
|
|
296
|
+
nonce: `0x${string}`;
|
|
297
|
+
callData: `0x${string}`;
|
|
298
|
+
callGasLimit: `0x${string}`;
|
|
299
|
+
verificationGasLimit: `0x${string}`;
|
|
300
|
+
preVerificationGas: `0x${string}`;
|
|
301
|
+
maxFeePerGas: `0x${string}`;
|
|
302
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
303
|
+
};
|
|
304
|
+
} & {
|
|
305
|
+
signature: {
|
|
306
|
+
type: "secp256k1";
|
|
307
|
+
data: `0x${string}` | {
|
|
308
|
+
r: `0x${string}`;
|
|
309
|
+
s: `0x${string}`;
|
|
310
|
+
yParity: `0x${string}`;
|
|
311
|
+
} | {
|
|
312
|
+
r: `0x${string}`;
|
|
313
|
+
s: `0x${string}`;
|
|
314
|
+
v: `0x${string}`;
|
|
315
|
+
};
|
|
316
|
+
} | {
|
|
317
|
+
type: "ecdsa";
|
|
318
|
+
data: `0x${string}` | {
|
|
319
|
+
r: `0x${string}`;
|
|
320
|
+
s: `0x${string}`;
|
|
321
|
+
yParity: `0x${string}`;
|
|
322
|
+
} | {
|
|
323
|
+
r: `0x${string}`;
|
|
324
|
+
s: `0x${string}`;
|
|
325
|
+
v: `0x${string}`;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
}) | ({
|
|
329
|
+
type: "authorization";
|
|
330
|
+
chainId: `0x${string}`;
|
|
331
|
+
data: {
|
|
332
|
+
nonce: `0x${string}`;
|
|
333
|
+
address: `0x${string}`;
|
|
334
|
+
};
|
|
335
|
+
} & {
|
|
336
|
+
signature: {
|
|
337
|
+
type: "secp256k1";
|
|
338
|
+
data: `0x${string}` | {
|
|
339
|
+
r: `0x${string}`;
|
|
340
|
+
s: `0x${string}`;
|
|
341
|
+
yParity: `0x${string}`;
|
|
342
|
+
} | {
|
|
343
|
+
r: `0x${string}`;
|
|
344
|
+
s: `0x${string}`;
|
|
345
|
+
v: `0x${string}`;
|
|
346
|
+
};
|
|
347
|
+
} | {
|
|
348
|
+
type: "ecdsa";
|
|
349
|
+
data: `0x${string}` | {
|
|
350
|
+
r: `0x${string}`;
|
|
351
|
+
s: `0x${string}`;
|
|
352
|
+
yParity: `0x${string}`;
|
|
353
|
+
} | {
|
|
354
|
+
r: `0x${string}`;
|
|
355
|
+
s: `0x${string}`;
|
|
356
|
+
v: `0x${string}`;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
}))[];
|
|
360
|
+
} | ({
|
|
361
|
+
type: "user-operation-v060";
|
|
140
362
|
chainId: `0x${string}`;
|
|
141
363
|
data: {
|
|
142
364
|
sender: `0x${string}`;
|
|
@@ -149,7 +371,35 @@ export declare const WalletServerRpcSchema: {
|
|
|
149
371
|
maxFeePerGas: `0x${string}`;
|
|
150
372
|
maxPriorityFeePerGas: `0x${string}`;
|
|
151
373
|
paymasterAndData: `0x${string}`;
|
|
374
|
+
};
|
|
375
|
+
} & {
|
|
376
|
+
signature: {
|
|
377
|
+
type: "secp256k1";
|
|
378
|
+
data: `0x${string}` | {
|
|
379
|
+
r: `0x${string}`;
|
|
380
|
+
s: `0x${string}`;
|
|
381
|
+
yParity: `0x${string}`;
|
|
382
|
+
} | {
|
|
383
|
+
r: `0x${string}`;
|
|
384
|
+
s: `0x${string}`;
|
|
385
|
+
v: `0x${string}`;
|
|
386
|
+
};
|
|
152
387
|
} | {
|
|
388
|
+
type: "ecdsa";
|
|
389
|
+
data: `0x${string}` | {
|
|
390
|
+
r: `0x${string}`;
|
|
391
|
+
s: `0x${string}`;
|
|
392
|
+
yParity: `0x${string}`;
|
|
393
|
+
} | {
|
|
394
|
+
r: `0x${string}`;
|
|
395
|
+
s: `0x${string}`;
|
|
396
|
+
v: `0x${string}`;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
}) | ({
|
|
400
|
+
type: "user-operation-v070";
|
|
401
|
+
chainId: `0x${string}`;
|
|
402
|
+
data: {
|
|
153
403
|
factory?: `0x${string}` | undefined;
|
|
154
404
|
factoryData?: `0x${string}` | undefined;
|
|
155
405
|
paymaster?: `0x${string}` | undefined;
|
|
@@ -165,6 +415,39 @@ export declare const WalletServerRpcSchema: {
|
|
|
165
415
|
maxFeePerGas: `0x${string}`;
|
|
166
416
|
maxPriorityFeePerGas: `0x${string}`;
|
|
167
417
|
};
|
|
418
|
+
} & {
|
|
419
|
+
signature: {
|
|
420
|
+
type: "secp256k1";
|
|
421
|
+
data: `0x${string}` | {
|
|
422
|
+
r: `0x${string}`;
|
|
423
|
+
s: `0x${string}`;
|
|
424
|
+
yParity: `0x${string}`;
|
|
425
|
+
} | {
|
|
426
|
+
r: `0x${string}`;
|
|
427
|
+
s: `0x${string}`;
|
|
428
|
+
v: `0x${string}`;
|
|
429
|
+
};
|
|
430
|
+
} | {
|
|
431
|
+
type: "ecdsa";
|
|
432
|
+
data: `0x${string}` | {
|
|
433
|
+
r: `0x${string}`;
|
|
434
|
+
s: `0x${string}`;
|
|
435
|
+
yParity: `0x${string}`;
|
|
436
|
+
} | {
|
|
437
|
+
r: `0x${string}`;
|
|
438
|
+
s: `0x${string}`;
|
|
439
|
+
v: `0x${string}`;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
})) & {
|
|
443
|
+
capabilities?: {
|
|
444
|
+
permissions?: {
|
|
445
|
+
context: `0x${string}`;
|
|
446
|
+
} | {
|
|
447
|
+
signature: `0x${string}`;
|
|
448
|
+
sessionId: `0x${string}`;
|
|
449
|
+
} | undefined;
|
|
450
|
+
} | undefined;
|
|
168
451
|
}];
|
|
169
452
|
method: "wallet_sendPreparedCalls";
|
|
170
453
|
};
|
|
@@ -239,7 +522,7 @@ export declare const WalletServerRpcSchema: {
|
|
|
239
522
|
} | {
|
|
240
523
|
Request: {
|
|
241
524
|
params: [{
|
|
242
|
-
|
|
525
|
+
expirySec?: number | undefined;
|
|
243
526
|
chainId: `0x${string}`;
|
|
244
527
|
key: {
|
|
245
528
|
type: "secp256k1" | "ecdsa" | "contract";
|
|
@@ -287,24 +570,12 @@ export declare const WalletServerRpcSchema: {
|
|
|
287
570
|
type: "root";
|
|
288
571
|
})[];
|
|
289
572
|
} & {
|
|
290
|
-
capabilities?: {
|
|
291
|
-
eip7702Auth?: true | {
|
|
292
|
-
account?: `0x${string}` | undefined;
|
|
293
|
-
delegation: "ModularAccountV2" | "0x69007702764179f14F51cdce752f4f775d74E139";
|
|
294
|
-
} | undefined;
|
|
295
|
-
} | undefined;
|
|
296
573
|
account: `0x${string}`;
|
|
297
574
|
}];
|
|
298
575
|
method: "wallet_createSession";
|
|
299
576
|
};
|
|
300
577
|
ReturnType: {
|
|
301
|
-
|
|
302
|
-
signatureRequest: ({
|
|
303
|
-
type: "personal_sign";
|
|
304
|
-
data: string | {
|
|
305
|
-
raw: `0x${string}`;
|
|
306
|
-
};
|
|
307
|
-
} | {
|
|
578
|
+
signatureRequest: {
|
|
308
579
|
type: "eth_signTypedData_v4";
|
|
309
580
|
data: {
|
|
310
581
|
domain?: {
|
|
@@ -325,13 +596,8 @@ export declare const WalletServerRpcSchema: {
|
|
|
325
596
|
[x: string]: unknown;
|
|
326
597
|
};
|
|
327
598
|
};
|
|
328
|
-
}) & {
|
|
329
|
-
authorizationRequest?: {
|
|
330
|
-
nonce: number;
|
|
331
|
-
chainId: number;
|
|
332
|
-
address: `0x${string}`;
|
|
333
|
-
} | undefined;
|
|
334
599
|
};
|
|
600
|
+
sessionId: `0x${string}`;
|
|
335
601
|
};
|
|
336
602
|
} | {
|
|
337
603
|
Request: {
|