@account-kit/wallet-client 0.1.0-alpha.1 → 0.1.0-alpha.10
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/client/actions/createAccount.d.ts +27 -2
- package/dist/esm/client/actions/createAccount.js +25 -0
- package/dist/esm/client/actions/createAccount.js.map +1 -1
- package/dist/esm/client/actions/formatSign.d.ts +28 -0
- package/dist/esm/client/actions/formatSign.js +30 -0
- package/dist/esm/client/actions/formatSign.js.map +1 -0
- package/dist/esm/client/actions/getCallsStatus.d.ts +22 -4
- package/dist/esm/client/actions/getCallsStatus.js +19 -0
- package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
- package/dist/esm/client/actions/grantPermissions.d.ts +63 -6
- package/dist/esm/client/actions/grantPermissions.js +63 -3
- package/dist/esm/client/actions/grantPermissions.js.map +1 -1
- package/dist/esm/client/actions/listAccounts.d.ts +32 -4
- package/dist/esm/client/actions/listAccounts.js +35 -2
- package/dist/esm/client/actions/listAccounts.js.map +1 -1
- package/dist/esm/client/actions/prepareCalls.d.ts +32 -6
- package/dist/esm/client/actions/prepareCalls.js +39 -5
- package/dist/esm/client/actions/prepareCalls.js.map +1 -1
- package/dist/esm/client/actions/prepareSign.d.ts +25 -0
- package/dist/esm/client/actions/prepareSign.js +28 -0
- package/dist/esm/client/actions/prepareSign.js.map +1 -0
- package/dist/esm/client/actions/requestAccount.d.ts +24 -6
- package/dist/esm/client/actions/requestAccount.js +38 -7
- package/dist/esm/client/actions/requestAccount.js.map +1 -1
- package/dist/esm/client/actions/sendPreparedCalls.d.ts +33 -4
- package/dist/esm/client/actions/sendPreparedCalls.js +37 -1
- package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/client/actions/signMessage.d.ts +25 -5
- package/dist/esm/client/actions/signMessage.js +22 -2
- package/dist/esm/client/actions/signMessage.js.map +1 -1
- package/dist/esm/client/actions/signPreparedCalls.d.ts +14 -0
- package/dist/esm/client/actions/signPreparedCalls.js +43 -0
- package/dist/esm/client/actions/signPreparedCalls.js.map +1 -0
- package/dist/esm/client/actions/signSignatureRequest.d.ts +39 -5
- package/dist/esm/client/actions/signSignatureRequest.js +69 -11
- package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
- package/dist/esm/client/actions/signTypedData.d.ts +37 -4
- package/dist/esm/client/actions/signTypedData.js +34 -1
- package/dist/esm/client/actions/signTypedData.js.map +1 -1
- package/dist/esm/client/client.e2e-test.js +210 -45
- package/dist/esm/client/client.e2e-test.js.map +1 -1
- package/dist/esm/client/decorator.d.ts +12 -8
- package/dist/esm/client/decorator.js +5 -3
- package/dist/esm/client/decorator.js.map +1 -1
- package/dist/esm/client/index.d.ts +38 -12
- package/dist/esm/client/index.js +0 -3
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/exports/index.d.ts +5 -6
- package/dist/esm/exports/index.js +4 -6
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/internal.d.ts +1 -10
- package/dist/esm/exports/internal.js +0 -12
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/internal/decorator.d.ts +2 -0
- package/dist/esm/internal/decorator.js +10 -0
- package/dist/esm/internal/decorator.js.map +1 -0
- package/dist/esm/isomorphic/actions/createSession.d.ts +1 -2
- package/dist/esm/isomorphic/actions/createSession.js +39 -10
- package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
- package/dist/esm/isomorphic/actions/formatSign.d.ts +8 -0
- package/dist/esm/isomorphic/actions/formatSign.js +42 -0
- package/dist/esm/isomorphic/actions/formatSign.js.map +1 -0
- package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +1 -15
- package/dist/esm/isomorphic/actions/getCallsStatus.js +37 -26
- package/dist/esm/isomorphic/actions/getCallsStatus.js.map +1 -1
- package/dist/esm/isomorphic/actions/prepareCalls.d.ts +1 -2
- package/dist/esm/isomorphic/actions/prepareCalls.js +78 -20
- package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
- package/dist/esm/isomorphic/actions/prepareSign.d.ts +7 -0
- package/dist/esm/isomorphic/actions/prepareSign.js +49 -0
- package/dist/esm/isomorphic/actions/prepareSign.js.map +1 -0
- package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +3 -4
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js +138 -25
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/isomorphic/client.d.ts +204 -27
- package/dist/esm/isomorphic/client.js +6 -2
- package/dist/esm/isomorphic/client.js.map +1 -1
- package/dist/esm/isomorphic/utils/7702.d.ts +19 -0
- package/dist/esm/isomorphic/utils/7702.js +70 -0
- package/dist/esm/isomorphic/utils/7702.js.map +1 -0
- package/dist/esm/isomorphic/utils/createAccount.d.ts +5 -4
- package/dist/esm/isomorphic/utils/createAccount.js +84 -10
- package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
- package/dist/esm/isomorphic/utils/createDummySigner.js +3 -3
- package/dist/esm/isomorphic/utils/createDummySigner.js.map +1 -1
- package/dist/esm/isomorphic/utils/decodeSignature.d.ts +3 -0
- package/dist/esm/isomorphic/utils/decodeSignature.js +15 -0
- package/dist/esm/isomorphic/utils/decodeSignature.js.map +1 -0
- package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +6 -5
- package/dist/esm/isomorphic/utils/parsePermissionsContext.js +19 -6
- package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +1 -1
- package/dist/esm/isomorphic/utils/supportsFeature.d.ts +4 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js +21 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js.map +1 -0
- package/dist/esm/local/client.d.ts +3 -3
- package/dist/esm/local/client.js +11 -4
- package/dist/esm/local/client.js.map +1 -1
- package/dist/esm/remote/client.d.ts +9 -3
- package/dist/esm/remote/client.js +10 -11
- package/dist/esm/remote/client.js.map +1 -1
- package/dist/esm/types.d.ts +27 -13
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils.d.ts +1 -0
- package/dist/esm/utils.js.map +1 -1
- package/dist/types/client/actions/createAccount.d.ts +27 -2
- package/dist/types/client/actions/createAccount.d.ts.map +1 -1
- package/dist/types/client/actions/formatSign.d.ts +29 -0
- package/dist/types/client/actions/formatSign.d.ts.map +1 -0
- package/dist/types/client/actions/getCallsStatus.d.ts +22 -4
- package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
- package/dist/types/client/actions/grantPermissions.d.ts +63 -6
- package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
- package/dist/types/client/actions/listAccounts.d.ts +32 -4
- package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
- package/dist/types/client/actions/prepareCalls.d.ts +32 -6
- package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/client/actions/prepareSign.d.ts +26 -0
- package/dist/types/client/actions/prepareSign.d.ts.map +1 -0
- package/dist/types/client/actions/requestAccount.d.ts +24 -6
- package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
- package/dist/types/client/actions/sendPreparedCalls.d.ts +33 -4
- package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/client/actions/signMessage.d.ts +25 -5
- package/dist/types/client/actions/signMessage.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 +39 -5
- package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
- package/dist/types/client/actions/signTypedData.d.ts +37 -4
- package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
- package/dist/types/client/decorator.d.ts +12 -8
- package/dist/types/client/decorator.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +38 -12
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/exports/index.d.ts +5 -6
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +1 -10
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/internal/decorator.d.ts +3 -0
- package/dist/types/internal/decorator.d.ts.map +1 -0
- package/dist/types/isomorphic/actions/createSession.d.ts +1 -2
- package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/formatSign.d.ts +9 -0
- package/dist/types/isomorphic/actions/formatSign.d.ts.map +1 -0
- package/dist/types/isomorphic/actions/getCallsStatus.d.ts +1 -15
- package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/prepareCalls.d.ts +1 -2
- package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/prepareSign.d.ts +8 -0
- package/dist/types/isomorphic/actions/prepareSign.d.ts.map +1 -0
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +3 -4
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/client.d.ts +204 -27
- package/dist/types/isomorphic/client.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/7702.d.ts +20 -0
- package/dist/types/isomorphic/utils/7702.d.ts.map +1 -0
- package/dist/types/isomorphic/utils/createAccount.d.ts +5 -4
- package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/createDummySigner.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/isomorphic/utils/parsePermissionsContext.d.ts +6 -5
- package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/supportsFeature.d.ts +5 -0
- package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +1 -0
- package/dist/types/local/client.d.ts +3 -3
- package/dist/types/local/client.d.ts.map +1 -1
- package/dist/types/remote/client.d.ts +9 -3
- package/dist/types/remote/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +27 -13
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +9 -6
- package/src/client/actions/createAccount.ts +27 -2
- package/src/client/actions/formatSign.ts +53 -0
- package/src/client/actions/getCallsStatus.ts +21 -12
- package/src/client/actions/grantPermissions.ts +69 -26
- package/src/client/actions/listAccounts.ts +44 -6
- package/src/client/actions/prepareCalls.ts +46 -26
- package/src/client/actions/prepareSign.ts +46 -0
- package/src/client/actions/requestAccount.ts +60 -41
- package/src/client/actions/sendPreparedCalls.ts +44 -7
- package/src/client/actions/signMessage.ts +26 -21
- package/src/client/actions/signPreparedCalls.ts +67 -0
- package/src/client/actions/signSignatureRequest.ts +84 -20
- package/src/client/actions/signTypedData.ts +40 -19
- package/src/client/client.e2e-test.ts +256 -54
- package/src/client/decorator.ts +28 -26
- package/src/client/index.ts +50 -40
- package/src/exports/index.ts +5 -13
- package/src/exports/internal.ts +2 -10
- package/src/internal/decorator.ts +12 -0
- package/src/isomorphic/actions/createSession.ts +55 -12
- package/src/isomorphic/actions/formatSign.ts +76 -0
- package/src/isomorphic/actions/getCallsStatus.ts +46 -32
- package/src/isomorphic/actions/prepareCalls.ts +95 -23
- package/src/isomorphic/actions/prepareSign.ts +91 -0
- package/src/isomorphic/actions/sendPreparedCalls.ts +181 -42
- package/src/isomorphic/client.ts +10 -2
- package/src/isomorphic/utils/7702.ts +135 -0
- package/src/isomorphic/utils/createAccount.ts +101 -13
- package/src/isomorphic/utils/createDummySigner.ts +3 -2
- package/src/isomorphic/utils/decodeSignature.ts +21 -0
- package/src/isomorphic/utils/parsePermissionsContext.ts +29 -11
- package/src/isomorphic/utils/supportsFeature.ts +34 -0
- package/src/local/client.ts +58 -55
- package/src/remote/client.ts +19 -19
- package/src/types.ts +29 -23
- package/src/utils.ts +2 -0
- package/dist/esm/capabilities/index.d.ts +0 -31
- package/dist/esm/capabilities/index.js +0 -10
- package/dist/esm/capabilities/index.js.map +0 -1
- package/dist/esm/capabilities/overrides.d.ts +0 -26
- package/dist/esm/capabilities/overrides.js +0 -14
- package/dist/esm/capabilities/overrides.js.map +0 -1
- package/dist/esm/capabilities/paymaster.d.ts +0 -3
- package/dist/esm/capabilities/paymaster.js +0 -5
- package/dist/esm/capabilities/paymaster.js.map +0 -1
- package/dist/esm/capabilities/permissions/index.d.ts +0 -138
- package/dist/esm/capabilities/permissions/index.js +0 -71
- package/dist/esm/capabilities/permissions/index.js.map +0 -1
- package/dist/esm/capabilities/permissions/mav2.d.ts +0 -36
- package/dist/esm/capabilities/permissions/mav2.js +0 -79
- package/dist/esm/capabilities/permissions/mav2.js.map +0 -1
- package/dist/esm/rpc/request.d.ts +0 -352
- package/dist/esm/rpc/request.js +0 -204
- package/dist/esm/rpc/request.js.map +0 -1
- package/dist/esm/rpc/schema.d.ts +0 -342
- package/dist/esm/rpc/schema.js +0 -5
- package/dist/esm/rpc/schema.js.map +0 -1
- package/dist/esm/schemas.d.ts +0 -216
- package/dist/esm/schemas.js +0 -211
- package/dist/esm/schemas.js.map +0 -1
- package/dist/types/capabilities/index.d.ts +0 -32
- package/dist/types/capabilities/index.d.ts.map +0 -1
- package/dist/types/capabilities/overrides.d.ts +0 -27
- package/dist/types/capabilities/overrides.d.ts.map +0 -1
- package/dist/types/capabilities/paymaster.d.ts +0 -4
- package/dist/types/capabilities/paymaster.d.ts.map +0 -1
- package/dist/types/capabilities/permissions/index.d.ts +0 -139
- package/dist/types/capabilities/permissions/index.d.ts.map +0 -1
- package/dist/types/capabilities/permissions/mav2.d.ts +0 -37
- package/dist/types/capabilities/permissions/mav2.d.ts.map +0 -1
- package/dist/types/rpc/request.d.ts +0 -353
- package/dist/types/rpc/request.d.ts.map +0 -1
- package/dist/types/rpc/schema.d.ts +0 -343
- package/dist/types/rpc/schema.d.ts.map +0 -1
- package/dist/types/schemas.d.ts +0 -217
- package/dist/types/schemas.d.ts.map +0 -1
- package/src/capabilities/index.ts +0 -13
- package/src/capabilities/overrides.ts +0 -20
- package/src/capabilities/paymaster.ts +0 -5
- package/src/capabilities/permissions/index.ts +0 -142
- package/src/capabilities/permissions/mav2.ts +0 -127
- package/src/rpc/request.ts +0 -273
- package/src/rpc/schema.ts +0 -40
- package/src/schemas.ts +0 -257
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
export declare const wallet_sendPreparedCalls: import("@sinclair/typebox").TObject<{
|
|
2
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
3
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_sendPreparedCalls">;
|
|
4
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
|
|
5
|
-
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user-operation-v060">, import("@sinclair/typebox").TLiteral<"user-operation-v070">]>;
|
|
6
|
-
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
7
|
-
sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
8
|
-
nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
9
|
-
initCode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
|
|
10
|
-
callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
11
|
-
callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
12
|
-
verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
13
|
-
preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
14
|
-
maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
15
|
-
maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
16
|
-
paymasterAndData: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
|
|
17
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
18
|
-
sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
19
|
-
nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
20
|
-
callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
21
|
-
callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
22
|
-
verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
23
|
-
preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
24
|
-
maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
25
|
-
maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
26
|
-
factory: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
27
|
-
factoryData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
28
|
-
paymaster: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
29
|
-
paymasterData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
30
|
-
paymasterVerificationGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
31
|
-
paymasterPostOpGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
32
|
-
}>]>;
|
|
33
|
-
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
34
|
-
signature: import("@sinclair/typebox").TObject<{
|
|
35
|
-
type: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, "ecdsa">;
|
|
36
|
-
signature: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
37
|
-
}>;
|
|
38
|
-
capabilities: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
39
|
-
permissions: import("@sinclair/typebox").TObject<{
|
|
40
|
-
context: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
41
|
-
}>;
|
|
42
|
-
}>>;
|
|
43
|
-
}>]>;
|
|
44
|
-
}>;
|
|
45
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
46
|
-
preparedCallIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
47
|
-
}>;
|
|
48
|
-
}>;
|
|
49
|
-
export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
50
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
51
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_prepareCalls">;
|
|
52
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
|
|
53
|
-
calls: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
54
|
-
to: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
55
|
-
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
56
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
57
|
-
}>>;
|
|
58
|
-
from: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
59
|
-
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
60
|
-
capabilities: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
61
|
-
permissions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
62
|
-
context: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
63
|
-
}>>;
|
|
64
|
-
paymasterService: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
65
|
-
policyId: import("@sinclair/typebox").TString;
|
|
66
|
-
}>>;
|
|
67
|
-
gasParamsOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
68
|
-
preVerificationGas: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
69
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
70
|
-
}>]>>;
|
|
71
|
-
verificationGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
72
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
73
|
-
}>]>>;
|
|
74
|
-
callGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
75
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
76
|
-
}>]>>;
|
|
77
|
-
paymasterVerificationGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
78
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
79
|
-
}>]>>;
|
|
80
|
-
paymasterPostOpGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
81
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
82
|
-
}>]>>;
|
|
83
|
-
maxFeePerGas: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
84
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
85
|
-
}>]>>;
|
|
86
|
-
maxPriorityFeePerGas: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TObject<{
|
|
87
|
-
multiplier: import("@sinclair/typebox").TNumber;
|
|
88
|
-
}>]>>;
|
|
89
|
-
}>>;
|
|
90
|
-
}>>;
|
|
91
|
-
}>]>;
|
|
92
|
-
}>;
|
|
93
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
94
|
-
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user-operation-v060">, import("@sinclair/typebox").TLiteral<"user-operation-v070">]>;
|
|
95
|
-
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
96
|
-
sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
97
|
-
nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
98
|
-
initCode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
|
|
99
|
-
callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
100
|
-
callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
101
|
-
verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
102
|
-
preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
103
|
-
maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
104
|
-
maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
105
|
-
paymasterAndData: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
|
|
106
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
107
|
-
sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
108
|
-
nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
109
|
-
callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
110
|
-
callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
111
|
-
verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
112
|
-
preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
113
|
-
maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
114
|
-
maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
115
|
-
factory: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
116
|
-
factoryData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
117
|
-
paymaster: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
118
|
-
paymasterData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
119
|
-
paymasterVerificationGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
120
|
-
paymasterPostOpGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
121
|
-
}>]>;
|
|
122
|
-
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
123
|
-
signatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
124
|
-
type: import("@sinclair/typebox").TLiteral<"personal_sign">;
|
|
125
|
-
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
126
|
-
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
127
|
-
}>]>;
|
|
128
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
129
|
-
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
130
|
-
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
131
|
-
domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
132
|
-
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
133
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
134
|
-
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
135
|
-
verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
136
|
-
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
137
|
-
}>>;
|
|
138
|
-
types: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
139
|
-
name: import("@sinclair/typebox").TString;
|
|
140
|
-
type: import("@sinclair/typebox").TString;
|
|
141
|
-
}>>>;
|
|
142
|
-
primaryType: import("@sinclair/typebox").TString;
|
|
143
|
-
message: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
144
|
-
}>, {
|
|
145
|
-
domain?: {
|
|
146
|
-
salt?: `0x${string}` | undefined;
|
|
147
|
-
chainId?: number | undefined;
|
|
148
|
-
name?: string | undefined;
|
|
149
|
-
verifyingContract?: `0x${string}` | undefined;
|
|
150
|
-
version?: string | undefined;
|
|
151
|
-
} | undefined;
|
|
152
|
-
types: {
|
|
153
|
-
[x: string]: {
|
|
154
|
-
type: string;
|
|
155
|
-
name: string;
|
|
156
|
-
}[];
|
|
157
|
-
};
|
|
158
|
-
primaryType: string;
|
|
159
|
-
message: {
|
|
160
|
-
[x: string]: unknown;
|
|
161
|
-
};
|
|
162
|
-
}>;
|
|
163
|
-
}>]>;
|
|
164
|
-
}>;
|
|
165
|
-
}>;
|
|
166
|
-
export declare const wallet_requestAccount: import("@sinclair/typebox").TObject<{
|
|
167
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
168
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_requestAccount">;
|
|
169
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
170
|
-
signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
171
|
-
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
172
|
-
creationHint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
173
|
-
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
174
|
-
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
175
|
-
}>>;
|
|
176
|
-
includeCounterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
177
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
178
|
-
accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
179
|
-
includeCounterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
180
|
-
}>]>]>;
|
|
181
|
-
}>;
|
|
182
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
183
|
-
accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
184
|
-
id: import("@sinclair/typebox").TString;
|
|
185
|
-
counterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
186
|
-
factoryType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"LightAccountV1.0.1">, import("@sinclair/typebox").TLiteral<"LightAccountV1.0.2">, import("@sinclair/typebox").TLiteral<"LightAccountV1.1.0">, import("@sinclair/typebox").TLiteral<"LightAccountV2.0.0">, import("@sinclair/typebox").TLiteral<"LightAccountV2.0.0-MultiOwner">, import("@sinclair/typebox").TLiteral<"MAv1.0.0-MultiOwner">, import("@sinclair/typebox").TLiteral<"MAv1.0.0-MultiSig">, import("@sinclair/typebox").TLiteral<"MAv2.0.0-sma-b">, import("@sinclair/typebox").TLiteral<"MAv2.0.0-ma-ssv">, import("@sinclair/typebox").TLiteral<"MAv2.0.0-ma-webauthn">, import("@sinclair/typebox").TLiteral<"unknown">]>;
|
|
187
|
-
factoryAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
188
|
-
factoryData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
189
|
-
}>>;
|
|
190
|
-
}>;
|
|
191
|
-
}>;
|
|
192
|
-
export declare const wallet_createAccount: import("@sinclair/typebox").TObject<{
|
|
193
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
194
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_createAccount">;
|
|
195
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
|
|
196
|
-
signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
197
|
-
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
198
|
-
creationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
199
|
-
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
200
|
-
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
201
|
-
}>>;
|
|
202
|
-
}>]>;
|
|
203
|
-
}>;
|
|
204
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
205
|
-
accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
206
|
-
id: import("@sinclair/typebox").TString;
|
|
207
|
-
}>;
|
|
208
|
-
}>;
|
|
209
|
-
export declare const wallet_listAccounts: import("@sinclair/typebox").TObject<{
|
|
210
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
211
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_listAccounts">;
|
|
212
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
|
|
213
|
-
signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
214
|
-
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
215
|
-
after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
216
|
-
}>]>;
|
|
217
|
-
}>;
|
|
218
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
219
|
-
accounts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
220
|
-
accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
221
|
-
id: import("@sinclair/typebox").TString;
|
|
222
|
-
}>>;
|
|
223
|
-
meta: import("@sinclair/typebox").TObject<{
|
|
224
|
-
totalCount: import("@sinclair/typebox").TNumber;
|
|
225
|
-
after: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
226
|
-
}>;
|
|
227
|
-
}>;
|
|
228
|
-
}>;
|
|
229
|
-
export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
|
|
230
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
231
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_createSession">;
|
|
232
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
233
|
-
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
234
|
-
expiry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
235
|
-
key: import("@sinclair/typebox").TObject<{
|
|
236
|
-
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"secp256k1">, import("@sinclair/typebox").TLiteral<"contract">]>;
|
|
237
|
-
publicKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
238
|
-
}>;
|
|
239
|
-
permissions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
240
|
-
type: import("@sinclair/typebox").TLiteral<"native-token-transfer">;
|
|
241
|
-
data: import("@sinclair/typebox").TObject<{
|
|
242
|
-
allowance: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
243
|
-
}>;
|
|
244
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
245
|
-
type: import("@sinclair/typebox").TLiteral<"erc20-token-transfer">;
|
|
246
|
-
data: import("@sinclair/typebox").TObject<{
|
|
247
|
-
allowance: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
248
|
-
address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
249
|
-
}>;
|
|
250
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
251
|
-
type: import("@sinclair/typebox").TLiteral<"gas-limit">;
|
|
252
|
-
data: import("@sinclair/typebox").TObject<{
|
|
253
|
-
limit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
254
|
-
}>;
|
|
255
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
256
|
-
type: import("@sinclair/typebox").TLiteral<"contract-access">;
|
|
257
|
-
data: import("@sinclair/typebox").TObject<{
|
|
258
|
-
address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
259
|
-
}>;
|
|
260
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
261
|
-
type: import("@sinclair/typebox").TLiteral<"account-functions">;
|
|
262
|
-
data: import("@sinclair/typebox").TObject<{
|
|
263
|
-
functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
264
|
-
}>;
|
|
265
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
266
|
-
type: import("@sinclair/typebox").TLiteral<"functions-on-all-contracts">;
|
|
267
|
-
data: import("@sinclair/typebox").TObject<{
|
|
268
|
-
functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
269
|
-
}>;
|
|
270
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
271
|
-
type: import("@sinclair/typebox").TLiteral<"functions-on-contract">;
|
|
272
|
-
data: import("@sinclair/typebox").TObject<{
|
|
273
|
-
address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
274
|
-
functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
275
|
-
}>;
|
|
276
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
277
|
-
type: import("@sinclair/typebox").TLiteral<"root">;
|
|
278
|
-
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNever>;
|
|
279
|
-
}>]>>;
|
|
280
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
281
|
-
account: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
282
|
-
}>]>]>;
|
|
283
|
-
}>;
|
|
284
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
285
|
-
sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
286
|
-
signatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
287
|
-
type: import("@sinclair/typebox").TLiteral<"personal_sign">;
|
|
288
|
-
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
289
|
-
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
290
|
-
}>]>;
|
|
291
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
292
|
-
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
293
|
-
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
294
|
-
domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
295
|
-
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
296
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
297
|
-
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
298
|
-
verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
299
|
-
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
300
|
-
}>>;
|
|
301
|
-
types: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
302
|
-
name: import("@sinclair/typebox").TString;
|
|
303
|
-
type: import("@sinclair/typebox").TString;
|
|
304
|
-
}>>>;
|
|
305
|
-
primaryType: import("@sinclair/typebox").TString;
|
|
306
|
-
message: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
307
|
-
}>, {
|
|
308
|
-
domain?: {
|
|
309
|
-
salt?: `0x${string}` | undefined;
|
|
310
|
-
chainId?: number | undefined;
|
|
311
|
-
name?: string | undefined;
|
|
312
|
-
verifyingContract?: `0x${string}` | undefined;
|
|
313
|
-
version?: string | undefined;
|
|
314
|
-
} | undefined;
|
|
315
|
-
types: {
|
|
316
|
-
[x: string]: {
|
|
317
|
-
type: string;
|
|
318
|
-
name: string;
|
|
319
|
-
}[];
|
|
320
|
-
};
|
|
321
|
-
primaryType: string;
|
|
322
|
-
message: {
|
|
323
|
-
[x: string]: unknown;
|
|
324
|
-
};
|
|
325
|
-
}>;
|
|
326
|
-
}>]>;
|
|
327
|
-
}>;
|
|
328
|
-
}>;
|
|
329
|
-
export declare const wallet_getCallsStatus: import("@sinclair/typebox").TObject<{
|
|
330
|
-
Request: import("@sinclair/typebox").TObject<{
|
|
331
|
-
method: import("@sinclair/typebox").TLiteral<"wallet_getCallsStatus">;
|
|
332
|
-
params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">]>;
|
|
333
|
-
}>;
|
|
334
|
-
ReturnType: import("@sinclair/typebox").TObject<{
|
|
335
|
-
id: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
336
|
-
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
337
|
-
atomic: import("@sinclair/typebox").TBoolean;
|
|
338
|
-
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<100>, import("@sinclair/typebox").TLiteral<200>, import("@sinclair/typebox").TLiteral<400>, import("@sinclair/typebox").TLiteral<500>, import("@sinclair/typebox").TLiteral<600>]>;
|
|
339
|
-
receipts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
340
|
-
logs: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
341
|
-
address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
342
|
-
data: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
343
|
-
topics: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
344
|
-
}>>;
|
|
345
|
-
status: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
346
|
-
blockHash: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
347
|
-
blockNumber: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
348
|
-
gasUsed: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
349
|
-
transactionHash: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
350
|
-
}>>>;
|
|
351
|
-
}>;
|
|
352
|
-
}>;
|
package/dist/esm/rpc/request.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { Capabilities } from "../capabilities/index.js";
|
|
3
|
-
import { PermissionsContext, PermissionsData, } from "../capabilities/permissions/index.js";
|
|
4
|
-
import { TypeAddress, TypeBase64UrlEncodedString, TypeCreationOptions, TypeHex, TypeSerializedInitcode, TypeSignatureRequest, TypeUserOperationRequest_v6, TypeUserOperationRequest_v7, TypeUuid, } from "../schemas.js";
|
|
5
|
-
export const wallet_sendPreparedCalls = Type.Object({
|
|
6
|
-
Request: Type.Object({
|
|
7
|
-
method: Type.Literal("wallet_sendPreparedCalls"),
|
|
8
|
-
params: Type.Tuple([
|
|
9
|
-
Type.Object({
|
|
10
|
-
type: Type.Union([
|
|
11
|
-
Type.Literal("user-operation-v060"),
|
|
12
|
-
Type.Literal("user-operation-v070"),
|
|
13
|
-
]),
|
|
14
|
-
data: Type.Union([
|
|
15
|
-
Type.Omit(TypeUserOperationRequest_v6, ["signature"]),
|
|
16
|
-
Type.Omit(TypeUserOperationRequest_v7, ["signature"]),
|
|
17
|
-
]),
|
|
18
|
-
chainId: TypeHex(),
|
|
19
|
-
signature: Type.Object({
|
|
20
|
-
type: Type.Transform(Type.String())
|
|
21
|
-
.Decode((value) => {
|
|
22
|
-
if (value.toLowerCase() !== "ecdsa") {
|
|
23
|
-
throw new Error("Invalid signature type, must be 'ecdsa'");
|
|
24
|
-
}
|
|
25
|
-
return "ecdsa";
|
|
26
|
-
})
|
|
27
|
-
.Encode((value) => value),
|
|
28
|
-
signature: TypeHex(),
|
|
29
|
-
}),
|
|
30
|
-
capabilities: Type.Optional(Type.Object({ permissions: PermissionsContext })),
|
|
31
|
-
}),
|
|
32
|
-
]),
|
|
33
|
-
}),
|
|
34
|
-
ReturnType: Type.Object({
|
|
35
|
-
preparedCallIds: Type.Array(TypeHex()),
|
|
36
|
-
}),
|
|
37
|
-
}, {
|
|
38
|
-
description: "This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation",
|
|
39
|
-
});
|
|
40
|
-
export const wallet_prepareCalls = Type.Object({
|
|
41
|
-
Request: Type.Object({
|
|
42
|
-
method: Type.Literal("wallet_prepareCalls"),
|
|
43
|
-
params: Type.Tuple([
|
|
44
|
-
Type.Object({
|
|
45
|
-
calls: Type.Array(Type.Object({
|
|
46
|
-
to: TypeAddress,
|
|
47
|
-
data: Type.Optional(TypeHex()),
|
|
48
|
-
value: Type.Optional(TypeHex()),
|
|
49
|
-
})),
|
|
50
|
-
from: TypeAddress,
|
|
51
|
-
chainId: TypeHex(),
|
|
52
|
-
capabilities: Type.Optional(Capabilities),
|
|
53
|
-
}),
|
|
54
|
-
]),
|
|
55
|
-
}),
|
|
56
|
-
ReturnType: Type.Object({
|
|
57
|
-
type: Type.Union([
|
|
58
|
-
Type.Literal("user-operation-v060"),
|
|
59
|
-
Type.Literal("user-operation-v070"),
|
|
60
|
-
]),
|
|
61
|
-
data: Type.Union([
|
|
62
|
-
Type.Omit(TypeUserOperationRequest_v6, ["signature"]),
|
|
63
|
-
Type.Omit(TypeUserOperationRequest_v7, ["signature"]),
|
|
64
|
-
]),
|
|
65
|
-
chainId: TypeHex(),
|
|
66
|
-
signatureRequest: TypeSignatureRequest,
|
|
67
|
-
}),
|
|
68
|
-
}, {
|
|
69
|
-
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",
|
|
70
|
-
});
|
|
71
|
-
export const wallet_requestAccount = Type.Object({
|
|
72
|
-
Request: Type.Object({
|
|
73
|
-
method: Type.Literal("wallet_requestAccount"),
|
|
74
|
-
params: Type.Tuple([
|
|
75
|
-
Type.Union([
|
|
76
|
-
Type.Object({
|
|
77
|
-
signerAddress: TypeAddress,
|
|
78
|
-
id: Type.Optional(TypeUuid),
|
|
79
|
-
creationHint: TypeCreationOptions,
|
|
80
|
-
includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
|
|
81
|
-
}),
|
|
82
|
-
Type.Object({
|
|
83
|
-
accountAddress: TypeAddress,
|
|
84
|
-
includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
|
|
85
|
-
}),
|
|
86
|
-
]),
|
|
87
|
-
]),
|
|
88
|
-
}),
|
|
89
|
-
ReturnType: Type.Object({
|
|
90
|
-
accountAddress: TypeAddress,
|
|
91
|
-
id: TypeUuid,
|
|
92
|
-
counterfactualInfo: Type.Optional(TypeSerializedInitcode),
|
|
93
|
-
}),
|
|
94
|
-
}, {
|
|
95
|
-
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.`,
|
|
96
|
-
});
|
|
97
|
-
export const wallet_createAccount = Type.Object({
|
|
98
|
-
Request: Type.Object({
|
|
99
|
-
method: Type.Literal("wallet_createAccount"),
|
|
100
|
-
params: Type.Tuple([
|
|
101
|
-
Type.Object({
|
|
102
|
-
signerAddress: TypeAddress,
|
|
103
|
-
id: Type.Optional(TypeUuid),
|
|
104
|
-
creationOptions: TypeCreationOptions,
|
|
105
|
-
}),
|
|
106
|
-
]),
|
|
107
|
-
}),
|
|
108
|
-
ReturnType: Type.Object({
|
|
109
|
-
accountAddress: TypeAddress,
|
|
110
|
-
id: TypeUuid,
|
|
111
|
-
}),
|
|
112
|
-
}, {
|
|
113
|
-
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.`,
|
|
114
|
-
});
|
|
115
|
-
export const wallet_listAccounts = Type.Object({
|
|
116
|
-
Request: Type.Object({
|
|
117
|
-
method: Type.Literal("wallet_listAccounts"),
|
|
118
|
-
params: Type.Tuple([
|
|
119
|
-
Type.Object({
|
|
120
|
-
signerAddress: TypeAddress,
|
|
121
|
-
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100, default: 100 })),
|
|
122
|
-
after: Type.Optional(TypeBase64UrlEncodedString),
|
|
123
|
-
}),
|
|
124
|
-
]),
|
|
125
|
-
}),
|
|
126
|
-
ReturnType: Type.Object({
|
|
127
|
-
accounts: Type.Array(Type.Object({
|
|
128
|
-
accountAddress: TypeAddress,
|
|
129
|
-
id: TypeUuid,
|
|
130
|
-
})),
|
|
131
|
-
meta: Type.Object({
|
|
132
|
-
totalCount: Type.Number(),
|
|
133
|
-
after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),
|
|
134
|
-
}),
|
|
135
|
-
}),
|
|
136
|
-
}, {
|
|
137
|
-
description: "This method is used to list all smart accounts for a given signer.",
|
|
138
|
-
});
|
|
139
|
-
export const wallet_createSession = Type.Object({
|
|
140
|
-
Request: Type.Object({
|
|
141
|
-
method: Type.Literal("wallet_createSession"),
|
|
142
|
-
params: Type.Tuple([
|
|
143
|
-
Type.Intersect([
|
|
144
|
-
PermissionsData,
|
|
145
|
-
Type.Object({ account: TypeAddress }),
|
|
146
|
-
]),
|
|
147
|
-
]),
|
|
148
|
-
}),
|
|
149
|
-
ReturnType: Type.Object({
|
|
150
|
-
sessionId: TypeHex(),
|
|
151
|
-
signatureRequest: TypeSignatureRequest,
|
|
152
|
-
}),
|
|
153
|
-
}, {
|
|
154
|
-
description: "This method is used to create a session for a given address with specified permissions.",
|
|
155
|
-
});
|
|
156
|
-
export const wallet_getCallsStatus = Type.Object({
|
|
157
|
-
Request: Type.Object({
|
|
158
|
-
method: Type.Literal("wallet_getCallsStatus"),
|
|
159
|
-
params: Type.Tuple([
|
|
160
|
-
TypeHex({
|
|
161
|
-
description: "The call ID returned from wallet_sendPreparedCalls",
|
|
162
|
-
}),
|
|
163
|
-
]),
|
|
164
|
-
}),
|
|
165
|
-
ReturnType: Type.Object({
|
|
166
|
-
id: TypeHex(),
|
|
167
|
-
chainId: TypeHex(),
|
|
168
|
-
atomic: Type.Boolean(),
|
|
169
|
-
status: Type.Union([
|
|
170
|
-
Type.Literal(100, {
|
|
171
|
-
description: "Batch has been received by the wallet but has not completed execution onchain",
|
|
172
|
-
}),
|
|
173
|
-
Type.Literal(200, {
|
|
174
|
-
description: "Batch has been included onchain without reverts, receipts array contains info of all calls",
|
|
175
|
-
}),
|
|
176
|
-
Type.Literal(400, {
|
|
177
|
-
description: "Batch has not been included onchain and wallet will not retry",
|
|
178
|
-
}),
|
|
179
|
-
Type.Literal(500, {
|
|
180
|
-
description: "Batch reverted *completely* and only changes related to gas charge may have been included onchain",
|
|
181
|
-
}),
|
|
182
|
-
Type.Literal(600, {
|
|
183
|
-
description: "Batch reverted *partially* and some changes related to batch calls may have been included onchain",
|
|
184
|
-
}),
|
|
185
|
-
]),
|
|
186
|
-
receipts: Type.Optional(Type.Array(Type.Object({
|
|
187
|
-
logs: Type.Array(Type.Object({
|
|
188
|
-
address: TypeAddress,
|
|
189
|
-
data: TypeHex(),
|
|
190
|
-
topics: Type.Array(TypeHex()),
|
|
191
|
-
})),
|
|
192
|
-
status: TypeHex({
|
|
193
|
-
description: "0x1 for success, 0x0 for failure",
|
|
194
|
-
}),
|
|
195
|
-
blockHash: TypeHex(),
|
|
196
|
-
blockNumber: TypeHex(),
|
|
197
|
-
gasUsed: TypeHex(),
|
|
198
|
-
transactionHash: TypeHex(),
|
|
199
|
-
}))),
|
|
200
|
-
}),
|
|
201
|
-
}, {
|
|
202
|
-
description: "This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.",
|
|
203
|
-
});
|
|
204
|
-
//# sourceMappingURL=request.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,GAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACnB,OAAO,EACP,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,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,CAAC;oBACnC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC;iBACpC,CAAC;gBACF,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;oBACf,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,WAAW,CAAC,CAAC;oBACrD,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,WAAW,CAAC,CAAC;iBACtD,CAAC;gBACF,OAAO,EAAE,OAAO,EAAE;gBAClB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;yBAChC,MAAM,CAAC,CAAC,KAAK,EAAE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MAAM,CAAC;QACtB,EAAE,EAAE,OAAO,EAAE;QACb,OAAO,EAAE,OAAO,EAAE;QAClB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;QACtB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,WAAW,EACT,+EAA+E;aAClF,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,WAAW,EACT,4FAA4F;aAC/F,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,WAAW,EACT,+DAA+D;aAClE,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,WAAW,EACT,mGAAmG;aACtG,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,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;CAC/F,CACF,CAAC","sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { Capabilities } from \"../capabilities/index.js\";\nimport {\n PermissionsContext,\n PermissionsData,\n} from \"../capabilities/permissions/index.js\";\nimport {\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeHex,\n TypeSerializedInitcode,\n TypeSignatureRequest,\n TypeUserOperationRequest_v6,\n TypeUserOperationRequest_v7,\n TypeUuid,\n} from \"../schemas.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 Type.Literal(\"user-operation-v070\"),\n ]),\n data: Type.Union([\n Type.Omit(TypeUserOperationRequest_v6, [\"signature\"]),\n Type.Omit(TypeUserOperationRequest_v7, [\"signature\"]),\n ]),\n chainId: TypeHex(),\n signature: Type.Object({\n type: Type.Transform(Type.String())\n .Decode((value) => {\n if (value.toLowerCase() !== \"ecdsa\") {\n throw new Error(\"Invalid signature type, must be 'ecdsa'\");\n }\n\n return \"ecdsa\" as const;\n })\n .Encode((value) => value),\n signature: TypeHex(),\n }),\n capabilities: Type.Optional(\n Type.Object({ permissions: PermissionsContext }),\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 },\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 Type.Literal(\"user-operation-v070\"),\n ]),\n data: Type.Union([\n Type.Omit(TypeUserOperationRequest_v6, [\"signature\"]),\n Type.Omit(TypeUserOperationRequest_v7, [\"signature\"]),\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 },\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 signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationHint: TypeCreationOptions,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n }),\n Type.Object({\n accountAddress: TypeAddress,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n counterfactualInfo: Type.Optional(TypeSerializedInitcode),\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 },\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 },\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.Number(),\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 },\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({ account: TypeAddress }),\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 },\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 description:\n \"Batch has been received by the wallet but has not completed execution onchain\",\n }),\n Type.Literal(200, {\n description:\n \"Batch has been included onchain without reverts, receipts array contains info of all calls\",\n }),\n Type.Literal(400, {\n description:\n \"Batch has not been included onchain and wallet will not retry\",\n }),\n Type.Literal(500, {\n description:\n \"Batch reverted *completely* and only changes related to gas charge may have been included onchain\",\n }),\n Type.Literal(600, {\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 },\n);\n"]}
|