@account-kit/wallet-client 0.1.0-alpha.8 → 4.50.0

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.
Files changed (269) hide show
  1. package/LICENSE +21 -0
  2. package/dist/esm/client/actions/formatSign.d.ts +30 -0
  3. package/dist/esm/client/actions/formatSign.js +32 -0
  4. package/dist/esm/client/actions/formatSign.js.map +1 -0
  5. package/dist/esm/client/actions/getCallsStatus.d.ts +6 -3
  6. package/dist/esm/client/actions/getCallsStatus.js +3 -0
  7. package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
  8. package/dist/esm/client/actions/grantPermissions.d.ts +10 -11
  9. package/dist/esm/client/actions/grantPermissions.js +26 -12
  10. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  11. package/dist/esm/client/actions/listAccounts.d.ts +10 -3
  12. package/dist/esm/client/actions/listAccounts.js +14 -2
  13. package/dist/esm/client/actions/listAccounts.js.map +1 -1
  14. package/dist/esm/client/actions/prepareCalls.d.ts +6 -3
  15. package/dist/esm/client/actions/prepareCalls.js +12 -8
  16. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  17. package/dist/esm/client/actions/prepareSign.d.ts +28 -0
  18. package/dist/esm/client/actions/prepareSign.js +31 -0
  19. package/dist/esm/client/actions/prepareSign.js.map +1 -0
  20. package/dist/esm/client/actions/requestAccount.d.ts +3 -1
  21. package/dist/esm/client/actions/requestAccount.js +5 -3
  22. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  23. package/dist/esm/client/actions/sendPreparedCalls.d.ts +3 -1
  24. package/dist/esm/client/actions/sendPreparedCalls.js +2 -0
  25. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  26. package/dist/esm/client/actions/signMessage.d.ts +5 -2
  27. package/dist/esm/client/actions/signMessage.js +5 -2
  28. package/dist/esm/client/actions/signMessage.js.map +1 -1
  29. package/dist/esm/client/actions/signPreparedCalls.d.ts +2 -2
  30. package/dist/esm/client/actions/signPreparedCalls.js +28 -39
  31. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
  32. package/dist/esm/client/actions/signSignatureRequest.d.ts +6 -10
  33. package/dist/esm/client/actions/signSignatureRequest.js +4 -7
  34. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  35. package/dist/esm/client/actions/signTypedData.d.ts +2 -0
  36. package/dist/esm/client/actions/signTypedData.js +2 -0
  37. package/dist/esm/client/actions/signTypedData.js.map +1 -1
  38. package/dist/esm/client/decorator.d.ts +0 -2
  39. package/dist/esm/client/decorator.js +1 -3
  40. package/dist/esm/client/decorator.js.map +1 -1
  41. package/dist/esm/client/index.d.ts +10 -6
  42. package/dist/esm/client/index.js +18 -21
  43. package/dist/esm/client/index.js.map +1 -1
  44. package/dist/esm/exports/index.d.ts +1 -5
  45. package/dist/esm/exports/index.js +1 -6
  46. package/dist/esm/exports/index.js.map +1 -1
  47. package/dist/esm/internal/account.d.ts +33 -0
  48. package/dist/esm/{isomorphic/utils/createAccount.js → internal/account.js} +33 -35
  49. package/dist/esm/internal/account.js.map +1 -0
  50. package/dist/esm/types.d.ts +5 -11
  51. package/dist/esm/types.js.map +1 -1
  52. package/dist/esm/utils.d.ts +14 -1
  53. package/dist/esm/utils.js +13 -1
  54. package/dist/esm/utils.js.map +1 -1
  55. package/dist/esm/version.d.ts +1 -0
  56. package/dist/esm/version.js +4 -0
  57. package/dist/esm/version.js.map +1 -0
  58. package/dist/types/client/actions/formatSign.d.ts +31 -0
  59. package/dist/types/client/actions/formatSign.d.ts.map +1 -0
  60. package/dist/types/client/actions/getCallsStatus.d.ts +6 -3
  61. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
  62. package/dist/types/client/actions/grantPermissions.d.ts +10 -11
  63. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  64. package/dist/types/client/actions/listAccounts.d.ts +10 -3
  65. package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
  66. package/dist/types/client/actions/prepareCalls.d.ts +6 -3
  67. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
  68. package/dist/types/client/actions/prepareSign.d.ts +29 -0
  69. package/dist/types/client/actions/prepareSign.d.ts.map +1 -0
  70. package/dist/types/client/actions/requestAccount.d.ts +3 -1
  71. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  72. package/dist/types/client/actions/sendPreparedCalls.d.ts +3 -1
  73. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  74. package/dist/types/client/actions/signMessage.d.ts +5 -2
  75. package/dist/types/client/actions/signMessage.d.ts.map +1 -1
  76. package/dist/types/client/actions/signPreparedCalls.d.ts +2 -2
  77. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
  78. package/dist/types/client/actions/signSignatureRequest.d.ts +6 -10
  79. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  80. package/dist/types/client/actions/signTypedData.d.ts +2 -0
  81. package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
  82. package/dist/types/client/decorator.d.ts +0 -2
  83. package/dist/types/client/decorator.d.ts.map +1 -1
  84. package/dist/types/client/index.d.ts +10 -6
  85. package/dist/types/client/index.d.ts.map +1 -1
  86. package/dist/types/exports/index.d.ts +1 -5
  87. package/dist/types/exports/index.d.ts.map +1 -1
  88. package/dist/types/internal/account.d.ts +34 -0
  89. package/dist/types/internal/account.d.ts.map +1 -0
  90. package/dist/types/types.d.ts +5 -11
  91. package/dist/types/types.d.ts.map +1 -1
  92. package/dist/types/utils.d.ts +14 -1
  93. package/dist/types/utils.d.ts.map +1 -1
  94. package/dist/types/version.d.ts +2 -0
  95. package/dist/types/version.d.ts.map +1 -0
  96. package/package.json +33 -28
  97. package/src/client/actions/formatSign.ts +55 -0
  98. package/src/client/actions/getCallsStatus.ts +10 -6
  99. package/src/client/actions/grantPermissions.ts +46 -18
  100. package/src/client/actions/listAccounts.ts +22 -5
  101. package/src/client/actions/prepareCalls.ts +22 -16
  102. package/src/client/actions/prepareSign.ts +51 -0
  103. package/src/client/actions/requestAccount.ts +6 -4
  104. package/src/client/actions/sendPreparedCalls.ts +3 -1
  105. package/src/client/actions/signMessage.ts +5 -2
  106. package/src/client/actions/signPreparedCalls.ts +40 -45
  107. package/src/client/actions/signSignatureRequest.ts +12 -15
  108. package/src/client/actions/signTypedData.ts +2 -0
  109. package/src/client/decorator.ts +1 -8
  110. package/src/client/index.ts +41 -33
  111. package/src/exports/index.ts +1 -13
  112. package/src/{isomorphic/utils/createAccount.ts → internal/account.ts} +37 -54
  113. package/src/types.ts +7 -18
  114. package/src/utils.ts +15 -1
  115. package/src/version.ts +3 -0
  116. package/dist/esm/capabilities/eip7702Auth.d.ts +0 -4
  117. package/dist/esm/capabilities/eip7702Auth.js +0 -18
  118. package/dist/esm/capabilities/eip7702Auth.js.map +0 -1
  119. package/dist/esm/capabilities/index.d.ts +0 -38
  120. package/dist/esm/capabilities/index.js +0 -12
  121. package/dist/esm/capabilities/index.js.map +0 -1
  122. package/dist/esm/capabilities/overrides.d.ts +0 -26
  123. package/dist/esm/capabilities/overrides.js +0 -14
  124. package/dist/esm/capabilities/overrides.js.map +0 -1
  125. package/dist/esm/capabilities/paymaster.d.ts +0 -3
  126. package/dist/esm/capabilities/paymaster.js +0 -5
  127. package/dist/esm/capabilities/paymaster.js.map +0 -1
  128. package/dist/esm/capabilities/permissions/index.d.ts +0 -145
  129. package/dist/esm/capabilities/permissions/index.js +0 -83
  130. package/dist/esm/capabilities/permissions/index.js.map +0 -1
  131. package/dist/esm/capabilities/permissions/mav2.d.ts +0 -36
  132. package/dist/esm/capabilities/permissions/mav2.js +0 -88
  133. package/dist/esm/capabilities/permissions/mav2.js.map +0 -1
  134. package/dist/esm/client/actions/createAccount.d.ts +0 -35
  135. package/dist/esm/client/actions/createAccount.js +0 -32
  136. package/dist/esm/client/actions/createAccount.js.map +0 -1
  137. package/dist/esm/client/client.e2e-test.d.ts +0 -1
  138. package/dist/esm/client/client.e2e-test.js +0 -375
  139. package/dist/esm/client/client.e2e-test.js.map +0 -1
  140. package/dist/esm/exports/internal.d.ts +0 -13
  141. package/dist/esm/exports/internal.js +0 -15
  142. package/dist/esm/exports/internal.js.map +0 -1
  143. package/dist/esm/isomorphic/actions/createSession.d.ts +0 -14
  144. package/dist/esm/isomorphic/actions/createSession.js +0 -89
  145. package/dist/esm/isomorphic/actions/createSession.js.map +0 -1
  146. package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +0 -21
  147. package/dist/esm/isomorphic/actions/getCallsStatus.js +0 -113
  148. package/dist/esm/isomorphic/actions/getCallsStatus.js.map +0 -1
  149. package/dist/esm/isomorphic/actions/prepareCalls.d.ts +0 -8
  150. package/dist/esm/isomorphic/actions/prepareCalls.js +0 -101
  151. package/dist/esm/isomorphic/actions/prepareCalls.js.map +0 -1
  152. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +0 -8
  153. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +0 -148
  154. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +0 -1
  155. package/dist/esm/isomorphic/client.d.ts +0 -239
  156. package/dist/esm/isomorphic/client.js +0 -37
  157. package/dist/esm/isomorphic/client.js.map +0 -1
  158. package/dist/esm/isomorphic/utils/7702.d.ts +0 -18
  159. package/dist/esm/isomorphic/utils/7702.js +0 -74
  160. package/dist/esm/isomorphic/utils/7702.js.map +0 -1
  161. package/dist/esm/isomorphic/utils/createAccount.d.ts +0 -23
  162. package/dist/esm/isomorphic/utils/createAccount.js.map +0 -1
  163. package/dist/esm/isomorphic/utils/createDummySigner.d.ts +0 -3
  164. package/dist/esm/isomorphic/utils/createDummySigner.js +0 -17
  165. package/dist/esm/isomorphic/utils/createDummySigner.js.map +0 -1
  166. package/dist/esm/isomorphic/utils/decodeSignature.d.ts +0 -3
  167. package/dist/esm/isomorphic/utils/decodeSignature.js +0 -13
  168. package/dist/esm/isomorphic/utils/decodeSignature.js.map +0 -1
  169. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +0 -21
  170. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +0 -34
  171. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +0 -1
  172. package/dist/esm/isomorphic/utils/supportsFeature.d.ts +0 -4
  173. package/dist/esm/isomorphic/utils/supportsFeature.js +0 -21
  174. package/dist/esm/isomorphic/utils/supportsFeature.js.map +0 -1
  175. package/dist/esm/local/client.d.ts +0 -3
  176. package/dist/esm/local/client.js +0 -97
  177. package/dist/esm/local/client.js.map +0 -1
  178. package/dist/esm/remote/client.d.ts +0 -9
  179. package/dist/esm/remote/client.js +0 -41
  180. package/dist/esm/remote/client.js.map +0 -1
  181. package/dist/esm/rpc/examples.d.ts +0 -230
  182. package/dist/esm/rpc/examples.js +0 -314
  183. package/dist/esm/rpc/examples.js.map +0 -1
  184. package/dist/esm/rpc/request.d.ts +0 -711
  185. package/dist/esm/rpc/request.js +0 -213
  186. package/dist/esm/rpc/request.js.map +0 -1
  187. package/dist/esm/rpc/schema.d.ts +0 -659
  188. package/dist/esm/rpc/schema.js +0 -5
  189. package/dist/esm/rpc/schema.js.map +0 -1
  190. package/dist/esm/schemas.d.ts +0 -693
  191. package/dist/esm/schemas.js +0 -419
  192. package/dist/esm/schemas.js.map +0 -1
  193. package/dist/types/capabilities/eip7702Auth.d.ts +0 -5
  194. package/dist/types/capabilities/eip7702Auth.d.ts.map +0 -1
  195. package/dist/types/capabilities/index.d.ts +0 -39
  196. package/dist/types/capabilities/index.d.ts.map +0 -1
  197. package/dist/types/capabilities/overrides.d.ts +0 -27
  198. package/dist/types/capabilities/overrides.d.ts.map +0 -1
  199. package/dist/types/capabilities/paymaster.d.ts +0 -4
  200. package/dist/types/capabilities/paymaster.d.ts.map +0 -1
  201. package/dist/types/capabilities/permissions/index.d.ts +0 -146
  202. package/dist/types/capabilities/permissions/index.d.ts.map +0 -1
  203. package/dist/types/capabilities/permissions/mav2.d.ts +0 -37
  204. package/dist/types/capabilities/permissions/mav2.d.ts.map +0 -1
  205. package/dist/types/client/actions/createAccount.d.ts +0 -36
  206. package/dist/types/client/actions/createAccount.d.ts.map +0 -1
  207. package/dist/types/client/client.e2e-test.d.ts +0 -2
  208. package/dist/types/client/client.e2e-test.d.ts.map +0 -1
  209. package/dist/types/exports/internal.d.ts +0 -14
  210. package/dist/types/exports/internal.d.ts.map +0 -1
  211. package/dist/types/isomorphic/actions/createSession.d.ts +0 -15
  212. package/dist/types/isomorphic/actions/createSession.d.ts.map +0 -1
  213. package/dist/types/isomorphic/actions/getCallsStatus.d.ts +0 -22
  214. package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +0 -1
  215. package/dist/types/isomorphic/actions/prepareCalls.d.ts +0 -9
  216. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +0 -1
  217. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +0 -9
  218. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +0 -1
  219. package/dist/types/isomorphic/client.d.ts +0 -240
  220. package/dist/types/isomorphic/client.d.ts.map +0 -1
  221. package/dist/types/isomorphic/utils/7702.d.ts +0 -19
  222. package/dist/types/isomorphic/utils/7702.d.ts.map +0 -1
  223. package/dist/types/isomorphic/utils/createAccount.d.ts +0 -24
  224. package/dist/types/isomorphic/utils/createAccount.d.ts.map +0 -1
  225. package/dist/types/isomorphic/utils/createDummySigner.d.ts +0 -4
  226. package/dist/types/isomorphic/utils/createDummySigner.d.ts.map +0 -1
  227. package/dist/types/isomorphic/utils/decodeSignature.d.ts +0 -4
  228. package/dist/types/isomorphic/utils/decodeSignature.d.ts.map +0 -1
  229. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +0 -22
  230. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +0 -1
  231. package/dist/types/isomorphic/utils/supportsFeature.d.ts +0 -5
  232. package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +0 -1
  233. package/dist/types/local/client.d.ts +0 -4
  234. package/dist/types/local/client.d.ts.map +0 -1
  235. package/dist/types/remote/client.d.ts +0 -10
  236. package/dist/types/remote/client.d.ts.map +0 -1
  237. package/dist/types/rpc/examples.d.ts +0 -231
  238. package/dist/types/rpc/examples.d.ts.map +0 -1
  239. package/dist/types/rpc/request.d.ts +0 -712
  240. package/dist/types/rpc/request.d.ts.map +0 -1
  241. package/dist/types/rpc/schema.d.ts +0 -660
  242. package/dist/types/rpc/schema.d.ts.map +0 -1
  243. package/dist/types/schemas.d.ts +0 -694
  244. package/dist/types/schemas.d.ts.map +0 -1
  245. package/src/capabilities/eip7702Auth.ts +0 -26
  246. package/src/capabilities/index.ts +0 -12
  247. package/src/capabilities/overrides.ts +0 -35
  248. package/src/capabilities/paymaster.ts +0 -5
  249. package/src/capabilities/permissions/index.ts +0 -163
  250. package/src/capabilities/permissions/mav2.ts +0 -138
  251. package/src/client/actions/createAccount.ts +0 -53
  252. package/src/client/client.e2e-test.ts +0 -463
  253. package/src/exports/internal.ts +0 -16
  254. package/src/isomorphic/actions/createSession.ts +0 -151
  255. package/src/isomorphic/actions/getCallsStatus.ts +0 -170
  256. package/src/isomorphic/actions/prepareCalls.ts +0 -152
  257. package/src/isomorphic/actions/sendPreparedCalls.ts +0 -222
  258. package/src/isomorphic/client.ts +0 -94
  259. package/src/isomorphic/utils/7702.ts +0 -132
  260. package/src/isomorphic/utils/createDummySigner.ts +0 -27
  261. package/src/isomorphic/utils/decodeSignature.ts +0 -18
  262. package/src/isomorphic/utils/parsePermissionsContext.ts +0 -49
  263. package/src/isomorphic/utils/supportsFeature.ts +0 -34
  264. package/src/local/client.ts +0 -136
  265. package/src/remote/client.ts +0 -67
  266. package/src/rpc/examples.ts +0 -342
  267. package/src/rpc/request.ts +0 -299
  268. package/src/rpc/schema.ts +0 -40
  269. package/src/schemas.ts +0 -585
@@ -1,659 +0,0 @@
1
- export declare const WalletServerRpcSchema: {
2
- Request: {
3
- params: [{
4
- capabilities?: {
5
- eip7702Auth?: true | {
6
- account?: `0x${string}` | undefined;
7
- delegation: "ModularAccountV2" | "0x69007702764179f14F51cdce752f4f775d74E139";
8
- } | undefined;
9
- permissions?: {
10
- context: `0x${string}`;
11
- } | {
12
- signature: `0x${string}`;
13
- sessionId: `0x${string}`;
14
- } | undefined;
15
- paymasterService?: {
16
- policyId: string;
17
- } | undefined;
18
- gasParamsOverride?: {
19
- callGasLimit?: `0x${string}` | {
20
- multiplier: number;
21
- } | undefined;
22
- verificationGasLimit?: `0x${string}` | {
23
- multiplier: number;
24
- } | undefined;
25
- preVerificationGas?: `0x${string}` | {
26
- multiplier: number;
27
- } | undefined;
28
- maxFeePerGas?: `0x${string}` | {
29
- multiplier: number;
30
- } | undefined;
31
- maxPriorityFeePerGas?: `0x${string}` | {
32
- multiplier: number;
33
- } | undefined;
34
- paymasterVerificationGasLimit?: `0x${string}` | {
35
- multiplier: number;
36
- } | undefined;
37
- paymasterPostOpGasLimit?: `0x${string}` | {
38
- multiplier: number;
39
- } | undefined;
40
- } | undefined;
41
- } | undefined;
42
- chainId: `0x${string}`;
43
- calls: {
44
- data?: `0x${string}` | undefined;
45
- value?: `0x${string}` | undefined;
46
- to: `0x${string}`;
47
- }[];
48
- from: `0x${string}`;
49
- }];
50
- method: "wallet_prepareCalls";
51
- };
52
- ReturnType: {
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
- rawPayload: `0x${string}`;
91
- } | {
92
- type: "personal_sign";
93
- data: string | {
94
- raw: `0x${string}`;
95
- };
96
- rawPayload: `0x${string}`;
97
- };
98
- } | {
99
- type: "user-operation-v070";
100
- chainId: `0x${string}`;
101
- data: {
102
- factory?: `0x${string}` | undefined;
103
- factoryData?: `0x${string}` | undefined;
104
- paymaster?: `0x${string}` | undefined;
105
- paymasterData?: `0x${string}` | undefined;
106
- paymasterVerificationGasLimit?: `0x${string}` | undefined;
107
- paymasterPostOpGasLimit?: `0x${string}` | undefined;
108
- sender: `0x${string}`;
109
- nonce: `0x${string}`;
110
- callData: `0x${string}`;
111
- callGasLimit: `0x${string}`;
112
- verificationGasLimit: `0x${string}`;
113
- preVerificationGas: `0x${string}`;
114
- maxFeePerGas: `0x${string}`;
115
- maxPriorityFeePerGas: `0x${string}`;
116
- };
117
- signatureRequest: {
118
- type: "eth_signTypedData_v4";
119
- data: {
120
- domain?: {
121
- chainId?: number | undefined;
122
- salt?: `0x${string}` | undefined;
123
- name?: string | undefined;
124
- verifyingContract?: `0x${string}` | undefined;
125
- version?: string | undefined;
126
- } | undefined;
127
- types: {
128
- [x: string]: {
129
- type: string;
130
- name: string;
131
- }[];
132
- };
133
- primaryType: string;
134
- message: {
135
- [x: string]: unknown;
136
- };
137
- };
138
- rawPayload: `0x${string}`;
139
- } | {
140
- type: "personal_sign";
141
- data: string | {
142
- raw: `0x${string}`;
143
- };
144
- rawPayload: `0x${string}`;
145
- };
146
- } | {
147
- type: "authorization";
148
- chainId: `0x${string}`;
149
- data: {
150
- nonce: `0x${string}`;
151
- address: `0x${string}`;
152
- };
153
- signatureRequest: {
154
- type: "eip7702Auth";
155
- rawPayload: `0x${string}`;
156
- };
157
- })[];
158
- } | {
159
- type: "user-operation-v060";
160
- chainId: `0x${string}`;
161
- data: {
162
- sender: `0x${string}`;
163
- nonce: `0x${string}`;
164
- initCode: `0x${string}`;
165
- callData: `0x${string}`;
166
- callGasLimit: `0x${string}`;
167
- verificationGasLimit: `0x${string}`;
168
- preVerificationGas: `0x${string}`;
169
- maxFeePerGas: `0x${string}`;
170
- maxPriorityFeePerGas: `0x${string}`;
171
- paymasterAndData: `0x${string}`;
172
- };
173
- signatureRequest: {
174
- type: "eth_signTypedData_v4";
175
- data: {
176
- domain?: {
177
- chainId?: number | undefined;
178
- salt?: `0x${string}` | undefined;
179
- name?: string | undefined;
180
- verifyingContract?: `0x${string}` | undefined;
181
- version?: string | undefined;
182
- } | undefined;
183
- types: {
184
- [x: string]: {
185
- type: string;
186
- name: string;
187
- }[];
188
- };
189
- primaryType: string;
190
- message: {
191
- [x: string]: unknown;
192
- };
193
- };
194
- rawPayload: `0x${string}`;
195
- } | {
196
- type: "personal_sign";
197
- data: string | {
198
- raw: `0x${string}`;
199
- };
200
- rawPayload: `0x${string}`;
201
- };
202
- } | {
203
- type: "user-operation-v070";
204
- chainId: `0x${string}`;
205
- data: {
206
- factory?: `0x${string}` | undefined;
207
- factoryData?: `0x${string}` | undefined;
208
- paymaster?: `0x${string}` | undefined;
209
- paymasterData?: `0x${string}` | undefined;
210
- paymasterVerificationGasLimit?: `0x${string}` | undefined;
211
- paymasterPostOpGasLimit?: `0x${string}` | undefined;
212
- sender: `0x${string}`;
213
- nonce: `0x${string}`;
214
- callData: `0x${string}`;
215
- callGasLimit: `0x${string}`;
216
- verificationGasLimit: `0x${string}`;
217
- preVerificationGas: `0x${string}`;
218
- maxFeePerGas: `0x${string}`;
219
- maxPriorityFeePerGas: `0x${string}`;
220
- };
221
- signatureRequest: {
222
- type: "eth_signTypedData_v4";
223
- data: {
224
- domain?: {
225
- chainId?: number | undefined;
226
- salt?: `0x${string}` | undefined;
227
- name?: string | undefined;
228
- verifyingContract?: `0x${string}` | undefined;
229
- version?: string | undefined;
230
- } | undefined;
231
- types: {
232
- [x: string]: {
233
- type: string;
234
- name: string;
235
- }[];
236
- };
237
- primaryType: string;
238
- message: {
239
- [x: string]: unknown;
240
- };
241
- };
242
- rawPayload: `0x${string}`;
243
- } | {
244
- type: "personal_sign";
245
- data: string | {
246
- raw: `0x${string}`;
247
- };
248
- rawPayload: `0x${string}`;
249
- };
250
- };
251
- } | {
252
- Request: {
253
- params: [({
254
- type: "array";
255
- data: (({
256
- type: "user-operation-v060";
257
- chainId: `0x${string}`;
258
- data: {
259
- sender: `0x${string}`;
260
- nonce: `0x${string}`;
261
- initCode: `0x${string}`;
262
- callData: `0x${string}`;
263
- callGasLimit: `0x${string}`;
264
- verificationGasLimit: `0x${string}`;
265
- preVerificationGas: `0x${string}`;
266
- maxFeePerGas: `0x${string}`;
267
- maxPriorityFeePerGas: `0x${string}`;
268
- paymasterAndData: `0x${string}`;
269
- };
270
- } & {
271
- signature: {
272
- type: "secp256k1";
273
- data: `0x${string}` | {
274
- r: `0x${string}`;
275
- s: `0x${string}`;
276
- yParity: `0x${string}`;
277
- } | {
278
- r: `0x${string}`;
279
- s: `0x${string}`;
280
- v: `0x${string}`;
281
- };
282
- } | {
283
- type: "ecdsa";
284
- data: `0x${string}` | {
285
- r: `0x${string}`;
286
- s: `0x${string}`;
287
- yParity: `0x${string}`;
288
- } | {
289
- r: `0x${string}`;
290
- s: `0x${string}`;
291
- v: `0x${string}`;
292
- };
293
- };
294
- }) | ({
295
- type: "user-operation-v070";
296
- chainId: `0x${string}`;
297
- data: {
298
- factory?: `0x${string}` | undefined;
299
- factoryData?: `0x${string}` | undefined;
300
- paymaster?: `0x${string}` | undefined;
301
- paymasterData?: `0x${string}` | undefined;
302
- paymasterVerificationGasLimit?: `0x${string}` | undefined;
303
- paymasterPostOpGasLimit?: `0x${string}` | undefined;
304
- sender: `0x${string}`;
305
- nonce: `0x${string}`;
306
- callData: `0x${string}`;
307
- callGasLimit: `0x${string}`;
308
- verificationGasLimit: `0x${string}`;
309
- preVerificationGas: `0x${string}`;
310
- maxFeePerGas: `0x${string}`;
311
- maxPriorityFeePerGas: `0x${string}`;
312
- };
313
- } & {
314
- signature: {
315
- type: "secp256k1";
316
- data: `0x${string}` | {
317
- r: `0x${string}`;
318
- s: `0x${string}`;
319
- yParity: `0x${string}`;
320
- } | {
321
- r: `0x${string}`;
322
- s: `0x${string}`;
323
- v: `0x${string}`;
324
- };
325
- } | {
326
- type: "ecdsa";
327
- data: `0x${string}` | {
328
- r: `0x${string}`;
329
- s: `0x${string}`;
330
- yParity: `0x${string}`;
331
- } | {
332
- r: `0x${string}`;
333
- s: `0x${string}`;
334
- v: `0x${string}`;
335
- };
336
- };
337
- }) | ({
338
- type: "authorization";
339
- chainId: `0x${string}`;
340
- data: {
341
- nonce: `0x${string}`;
342
- address: `0x${string}`;
343
- };
344
- } & {
345
- signature: {
346
- type: "secp256k1";
347
- data: `0x${string}` | {
348
- r: `0x${string}`;
349
- s: `0x${string}`;
350
- yParity: `0x${string}`;
351
- } | {
352
- r: `0x${string}`;
353
- s: `0x${string}`;
354
- v: `0x${string}`;
355
- };
356
- } | {
357
- type: "ecdsa";
358
- data: `0x${string}` | {
359
- r: `0x${string}`;
360
- s: `0x${string}`;
361
- yParity: `0x${string}`;
362
- } | {
363
- r: `0x${string}`;
364
- s: `0x${string}`;
365
- v: `0x${string}`;
366
- };
367
- };
368
- }))[];
369
- } | ({
370
- type: "user-operation-v060";
371
- chainId: `0x${string}`;
372
- data: {
373
- sender: `0x${string}`;
374
- nonce: `0x${string}`;
375
- initCode: `0x${string}`;
376
- callData: `0x${string}`;
377
- callGasLimit: `0x${string}`;
378
- verificationGasLimit: `0x${string}`;
379
- preVerificationGas: `0x${string}`;
380
- maxFeePerGas: `0x${string}`;
381
- maxPriorityFeePerGas: `0x${string}`;
382
- paymasterAndData: `0x${string}`;
383
- };
384
- } & {
385
- signature: {
386
- type: "secp256k1";
387
- data: `0x${string}` | {
388
- r: `0x${string}`;
389
- s: `0x${string}`;
390
- yParity: `0x${string}`;
391
- } | {
392
- r: `0x${string}`;
393
- s: `0x${string}`;
394
- v: `0x${string}`;
395
- };
396
- } | {
397
- type: "ecdsa";
398
- data: `0x${string}` | {
399
- r: `0x${string}`;
400
- s: `0x${string}`;
401
- yParity: `0x${string}`;
402
- } | {
403
- r: `0x${string}`;
404
- s: `0x${string}`;
405
- v: `0x${string}`;
406
- };
407
- };
408
- }) | ({
409
- type: "user-operation-v070";
410
- chainId: `0x${string}`;
411
- data: {
412
- factory?: `0x${string}` | undefined;
413
- factoryData?: `0x${string}` | undefined;
414
- paymaster?: `0x${string}` | undefined;
415
- paymasterData?: `0x${string}` | undefined;
416
- paymasterVerificationGasLimit?: `0x${string}` | undefined;
417
- paymasterPostOpGasLimit?: `0x${string}` | undefined;
418
- sender: `0x${string}`;
419
- nonce: `0x${string}`;
420
- callData: `0x${string}`;
421
- callGasLimit: `0x${string}`;
422
- verificationGasLimit: `0x${string}`;
423
- preVerificationGas: `0x${string}`;
424
- maxFeePerGas: `0x${string}`;
425
- maxPriorityFeePerGas: `0x${string}`;
426
- };
427
- } & {
428
- signature: {
429
- type: "secp256k1";
430
- data: `0x${string}` | {
431
- r: `0x${string}`;
432
- s: `0x${string}`;
433
- yParity: `0x${string}`;
434
- } | {
435
- r: `0x${string}`;
436
- s: `0x${string}`;
437
- v: `0x${string}`;
438
- };
439
- } | {
440
- type: "ecdsa";
441
- data: `0x${string}` | {
442
- r: `0x${string}`;
443
- s: `0x${string}`;
444
- yParity: `0x${string}`;
445
- } | {
446
- r: `0x${string}`;
447
- s: `0x${string}`;
448
- v: `0x${string}`;
449
- };
450
- };
451
- })) & {
452
- capabilities?: {
453
- permissions?: {
454
- context: `0x${string}`;
455
- } | {
456
- signature: `0x${string}`;
457
- sessionId: `0x${string}`;
458
- } | undefined;
459
- } | undefined;
460
- }];
461
- method: "wallet_sendPreparedCalls";
462
- };
463
- ReturnType: {
464
- preparedCallIds: `0x${string}`[];
465
- };
466
- } | {
467
- Request: {
468
- params: [{
469
- id?: string | undefined;
470
- creationOptions?: {
471
- salt?: `0x${string}` | undefined;
472
- accountType?: "sma-b" | "la-v2" | "la-v1.0.1" | "la-v1.0.2" | "la-v1.1.0" | undefined;
473
- } | {
474
- accountType: "7702";
475
- } | undefined;
476
- signerAddress: `0x${string}`;
477
- }];
478
- method: "wallet_createAccount";
479
- };
480
- ReturnType: {
481
- accountAddress: `0x${string}`;
482
- id: string;
483
- };
484
- } | {
485
- Request: {
486
- params: [{
487
- id?: string | undefined;
488
- creationHint?: {
489
- salt?: `0x${string}` | undefined;
490
- accountType?: "sma-b" | "la-v2" | "la-v1.0.1" | "la-v1.0.2" | "la-v1.1.0" | undefined;
491
- } | {
492
- accountType: "7702";
493
- } | undefined;
494
- includeCounterfactualInfo?: boolean | undefined;
495
- signerAddress: `0x${string}`;
496
- } | {
497
- includeCounterfactualInfo?: boolean | undefined;
498
- accountAddress: `0x${string}`;
499
- }];
500
- method: "wallet_requestAccount";
501
- };
502
- ReturnType: {
503
- delegation?: `0x${string}` | undefined;
504
- counterfactualInfo?: {
505
- factoryData: `0x${string}`;
506
- factoryAddress: `0x${string}`;
507
- factoryType: "unknown" | "LightAccountV2.0.0" | "LightAccountV1.1.0" | "LightAccountV1.0.2" | "LightAccountV1.0.1" | "MAv1.0.0-MultiOwner" | "LightAccountV2.0.0-MultiOwner" | "MAv1.0.0-MultiSig" | "MAv2.0.0-sma-b" | "MAv2.0.0-ma-ssv" | "MAv2.0.0-ma-webauthn";
508
- } | undefined;
509
- accountAddress: `0x${string}`;
510
- id: string;
511
- };
512
- } | {
513
- Request: {
514
- params: [{
515
- limit?: number | undefined;
516
- after?: string | undefined;
517
- signerAddress: `0x${string}`;
518
- }];
519
- method: "wallet_listAccounts";
520
- };
521
- ReturnType: {
522
- accounts: {
523
- accountAddress: `0x${string}`;
524
- id: string;
525
- }[];
526
- meta: {
527
- after: string | null;
528
- totalCount: number;
529
- };
530
- };
531
- } | {
532
- Request: {
533
- params: [{
534
- expirySec?: number | undefined;
535
- chainId: `0x${string}`;
536
- key: {
537
- type: "secp256k1" | "ecdsa" | "contract";
538
- publicKey: `0x${string}`;
539
- };
540
- permissions: ({
541
- type: "native-token-transfer";
542
- data: {
543
- allowance: `0x${string}`;
544
- };
545
- } | {
546
- type: "erc20-token-transfer";
547
- data: {
548
- address: `0x${string}`;
549
- allowance: `0x${string}`;
550
- };
551
- } | {
552
- type: "gas-limit";
553
- data: {
554
- limit: `0x${string}`;
555
- };
556
- } | {
557
- type: "contract-access";
558
- data: {
559
- address: `0x${string}`;
560
- };
561
- } | {
562
- type: "account-functions";
563
- data: {
564
- functions: `0x${string}`[];
565
- };
566
- } | {
567
- type: "functions-on-all-contracts";
568
- data: {
569
- functions: `0x${string}`[];
570
- };
571
- } | {
572
- type: "functions-on-contract";
573
- data: {
574
- address: `0x${string}`;
575
- functions: `0x${string}`[];
576
- };
577
- } | {
578
- data?: undefined;
579
- type: "root";
580
- })[];
581
- } & {
582
- account: `0x${string}`;
583
- }];
584
- method: "wallet_createSession";
585
- };
586
- ReturnType: {
587
- signatureRequest: {
588
- type: "eth_signTypedData_v4";
589
- data: {
590
- domain?: {
591
- chainId?: number | undefined;
592
- salt?: `0x${string}` | undefined;
593
- name?: string | undefined;
594
- verifyingContract?: `0x${string}` | undefined;
595
- version?: string | undefined;
596
- } | undefined;
597
- types: {
598
- [x: string]: {
599
- type: string;
600
- name: string;
601
- }[];
602
- };
603
- primaryType: string;
604
- message: {
605
- [x: string]: unknown;
606
- };
607
- };
608
- rawPayload: `0x${string}`;
609
- };
610
- sessionId: `0x${string}`;
611
- };
612
- } | {
613
- Request: {
614
- params: [`0x${string}`];
615
- method: "wallet_getCallsStatus";
616
- };
617
- ReturnType: {
618
- receipts?: {
619
- status: `0x${string}`;
620
- logs: {
621
- address: `0x${string}`;
622
- data: `0x${string}`;
623
- topics: `0x${string}`[];
624
- }[];
625
- blockHash: `0x${string}`;
626
- blockNumber: `0x${string}`;
627
- gasUsed: `0x${string}`;
628
- transactionHash: `0x${string}`;
629
- }[] | undefined;
630
- chainId: `0x${string}`;
631
- id: `0x${string}`;
632
- atomic: boolean;
633
- status: 200 | 100 | 400 | 500 | 600;
634
- };
635
- };
636
- export type WalletServerRpcSchemaType = typeof WalletServerRpcSchema;
637
- type MethodToViemRpcSchema = {
638
- [K in WalletServerRpcSchemaType["Request"]["method"]]: {
639
- Method: K;
640
- Parameters: Extract<WalletServerRpcSchemaType["Request"], {
641
- method: K;
642
- }>["params"];
643
- ReturnType: Extract<WalletServerRpcSchemaType, {
644
- Request: {
645
- method: K;
646
- };
647
- }>["ReturnType"];
648
- };
649
- };
650
- export type WalletServerViemRpcSchema = [
651
- MethodToViemRpcSchema["wallet_createAccount"],
652
- MethodToViemRpcSchema["wallet_requestAccount"],
653
- MethodToViemRpcSchema["wallet_listAccounts"],
654
- MethodToViemRpcSchema["wallet_prepareCalls"],
655
- MethodToViemRpcSchema["wallet_sendPreparedCalls"],
656
- MethodToViemRpcSchema["wallet_getCallsStatus"],
657
- MethodToViemRpcSchema["wallet_createSession"]
658
- ];
659
- export {};
@@ -1,5 +0,0 @@
1
- import {} from "@sinclair/typebox";
2
- import { RpcSchema } from "ox";
3
- import * as Requests from "./request.js";
4
- export const WalletServerRpcSchema = RpcSchema.from();
5
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/rpc/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,cAAc,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC,IAAI,EAQhD,CAAC","sourcesContent":["import { type Static } from \"@sinclair/typebox\";\nimport { RpcSchema } from \"ox\";\nimport * as Requests from \"./request.js\";\n\nexport const WalletServerRpcSchema = RpcSchema.from<\n | Static<typeof Requests.wallet_prepareCalls>\n | Static<typeof Requests.wallet_sendPreparedCalls>\n | Static<typeof Requests.wallet_createAccount>\n | Static<typeof Requests.wallet_requestAccount>\n | Static<typeof Requests.wallet_listAccounts>\n | Static<typeof Requests.wallet_createSession>\n | Static<typeof Requests.wallet_getCallsStatus>\n>();\n\nexport type WalletServerRpcSchemaType = typeof WalletServerRpcSchema;\n\ntype MethodToViemRpcSchema = {\n [K in WalletServerRpcSchemaType[\"Request\"][\"method\"]]: {\n Method: K;\n Parameters: Extract<\n WalletServerRpcSchemaType[\"Request\"],\n { method: K }\n >[\"params\"];\n ReturnType: Extract<\n WalletServerRpcSchemaType,\n { Request: { method: K } }\n >[\"ReturnType\"];\n };\n};\n\n// TODO: figure out how we can do this without manually listing all the methods\nexport type WalletServerViemRpcSchema = [\n MethodToViemRpcSchema[\"wallet_createAccount\"],\n MethodToViemRpcSchema[\"wallet_requestAccount\"],\n MethodToViemRpcSchema[\"wallet_listAccounts\"],\n MethodToViemRpcSchema[\"wallet_prepareCalls\"],\n MethodToViemRpcSchema[\"wallet_sendPreparedCalls\"],\n MethodToViemRpcSchema[\"wallet_getCallsStatus\"],\n MethodToViemRpcSchema[\"wallet_createSession\"],\n];\n"]}