@account-kit/wallet-client 0.0.1-alpha.1

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 (259) hide show
  1. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_1.d.ts +55 -0
  2. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_1.js +45 -0
  3. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_1.js.map +1 -0
  4. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_2.d.ts +55 -0
  5. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_2.js +45 -0
  6. package/dist/esm/abi/LightAccountFactoryAbi_V1_0_2.js.map +1 -0
  7. package/dist/esm/abi/LightAccountFactoryAbi_V1_1_0.d.ts +55 -0
  8. package/dist/esm/abi/LightAccountFactoryAbi_V1_1_0.js +45 -0
  9. package/dist/esm/abi/LightAccountFactoryAbi_V1_1_0.js.map +1 -0
  10. package/dist/esm/abi/LightAccountFactoryAbi_V2_0_0.d.ts +256 -0
  11. package/dist/esm/abi/LightAccountFactoryAbi_V2_0_0.js +202 -0
  12. package/dist/esm/abi/LightAccountFactoryAbi_V2_0_0.js.map +1 -0
  13. package/dist/esm/abi/ModularAccountFactoryAbi_V2_0_0.d.ts +492 -0
  14. package/dist/esm/abi/ModularAccountFactoryAbi_V2_0_0.js +399 -0
  15. package/dist/esm/abi/ModularAccountFactoryAbi_V2_0_0.js.map +1 -0
  16. package/dist/esm/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.d.ts +286 -0
  17. package/dist/esm/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.js +225 -0
  18. package/dist/esm/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.js.map +1 -0
  19. package/dist/esm/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.d.ts +234 -0
  20. package/dist/esm/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.js +179 -0
  21. package/dist/esm/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.js.map +1 -0
  22. package/dist/esm/abi/MultisigModularAccountFactoryAbi_V1_0_0.d.ts +246 -0
  23. package/dist/esm/abi/MultisigModularAccountFactoryAbi_V1_0_0.js +182 -0
  24. package/dist/esm/abi/MultisigModularAccountFactoryAbi_V1_0_0.js.map +1 -0
  25. package/dist/esm/abi/index.d.ts +8 -0
  26. package/dist/esm/abi/index.js +9 -0
  27. package/dist/esm/abi/index.js.map +1 -0
  28. package/dist/esm/capabilities/index.d.ts +8 -0
  29. package/dist/esm/capabilities/index.js +8 -0
  30. package/dist/esm/capabilities/index.js.map +1 -0
  31. package/dist/esm/capabilities/paymaster.d.ts +3 -0
  32. package/dist/esm/capabilities/paymaster.js +5 -0
  33. package/dist/esm/capabilities/paymaster.js.map +1 -0
  34. package/dist/esm/capabilities/permissions/index.d.ts +98 -0
  35. package/dist/esm/capabilities/permissions/index.js +60 -0
  36. package/dist/esm/capabilities/permissions/index.js.map +1 -0
  37. package/dist/esm/capabilities/permissions/mav2.d.ts +36 -0
  38. package/dist/esm/capabilities/permissions/mav2.js +79 -0
  39. package/dist/esm/capabilities/permissions/mav2.js.map +1 -0
  40. package/dist/esm/client/actions/createAccount.d.ts +10 -0
  41. package/dist/esm/client/actions/createAccount.js +7 -0
  42. package/dist/esm/client/actions/createAccount.js.map +1 -0
  43. package/dist/esm/client/actions/getCallsStatus.d.ts +6 -0
  44. package/dist/esm/client/actions/getCallsStatus.js +7 -0
  45. package/dist/esm/client/actions/getCallsStatus.js.map +1 -0
  46. package/dist/esm/client/actions/grantPermissions.d.ts +13 -0
  47. package/dist/esm/client/actions/grantPermissions.js +11 -0
  48. package/dist/esm/client/actions/grantPermissions.js.map +1 -0
  49. package/dist/esm/client/actions/listAccounts.d.ts +6 -0
  50. package/dist/esm/client/actions/listAccounts.js +4 -0
  51. package/dist/esm/client/actions/listAccounts.js.map +1 -0
  52. package/dist/esm/client/actions/prepareCalls.d.ts +15 -0
  53. package/dist/esm/client/actions/prepareCalls.js +17 -0
  54. package/dist/esm/client/actions/prepareCalls.js.map +1 -0
  55. package/dist/esm/client/actions/requestAccount.d.ts +11 -0
  56. package/dist/esm/client/actions/requestAccount.js +28 -0
  57. package/dist/esm/client/actions/requestAccount.js.map +1 -0
  58. package/dist/esm/client/actions/sendPreparedCalls.d.ts +6 -0
  59. package/dist/esm/client/actions/sendPreparedCalls.js +8 -0
  60. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -0
  61. package/dist/esm/client/actions/signMessage.d.ts +6 -0
  62. package/dist/esm/client/actions/signMessage.js +7 -0
  63. package/dist/esm/client/actions/signMessage.js.map +1 -0
  64. package/dist/esm/client/actions/signSignatureRequest.d.ts +10 -0
  65. package/dist/esm/client/actions/signSignatureRequest.js +15 -0
  66. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -0
  67. package/dist/esm/client/actions/signTypedData.d.ts +6 -0
  68. package/dist/esm/client/actions/signTypedData.js +7 -0
  69. package/dist/esm/client/actions/signTypedData.js.map +1 -0
  70. package/dist/esm/client/client.e2e-test.d.ts +1 -0
  71. package/dist/esm/client/client.e2e-test.js +238 -0
  72. package/dist/esm/client/client.e2e-test.js.map +1 -0
  73. package/dist/esm/client/decorator.d.ts +24 -0
  74. package/dist/esm/client/decorator.js +25 -0
  75. package/dist/esm/client/decorator.js.map +1 -0
  76. package/dist/esm/client/index.d.ts +18 -0
  77. package/dist/esm/client/index.js +43 -0
  78. package/dist/esm/client/index.js.map +1 -0
  79. package/dist/esm/exports/index.d.ts +13 -0
  80. package/dist/esm/exports/index.js +18 -0
  81. package/dist/esm/exports/index.js.map +1 -0
  82. package/dist/esm/exports/internal.d.ts +13 -0
  83. package/dist/esm/exports/internal.js +15 -0
  84. package/dist/esm/exports/internal.js.map +1 -0
  85. package/dist/esm/isomorphic/actions/createSession.d.ts +14 -0
  86. package/dist/esm/isomorphic/actions/createSession.js +63 -0
  87. package/dist/esm/isomorphic/actions/createSession.js.map +1 -0
  88. package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +21 -0
  89. package/dist/esm/isomorphic/actions/getCallsStatus.js +60 -0
  90. package/dist/esm/isomorphic/actions/getCallsStatus.js.map +1 -0
  91. package/dist/esm/isomorphic/actions/prepareCalls.d.ts +8 -0
  92. package/dist/esm/isomorphic/actions/prepareCalls.js +57 -0
  93. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -0
  94. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +8 -0
  95. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +43 -0
  96. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -0
  97. package/dist/esm/isomorphic/client.d.ts +97 -0
  98. package/dist/esm/isomorphic/client.js +30 -0
  99. package/dist/esm/isomorphic/client.js.map +1 -0
  100. package/dist/esm/isomorphic/utils/createAccount.d.ts +22 -0
  101. package/dist/esm/isomorphic/utils/createAccount.js +32 -0
  102. package/dist/esm/isomorphic/utils/createAccount.js.map +1 -0
  103. package/dist/esm/isomorphic/utils/createDummySigner.d.ts +3 -0
  104. package/dist/esm/isomorphic/utils/createDummySigner.js +17 -0
  105. package/dist/esm/isomorphic/utils/createDummySigner.js.map +1 -0
  106. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +20 -0
  107. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +21 -0
  108. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +1 -0
  109. package/dist/esm/local/client.d.ts +3 -0
  110. package/dist/esm/local/client.js +89 -0
  111. package/dist/esm/local/client.js.map +1 -0
  112. package/dist/esm/remote/client.d.ts +3 -0
  113. package/dist/esm/remote/client.js +42 -0
  114. package/dist/esm/remote/client.js.map +1 -0
  115. package/dist/esm/rpc/request.d.ts +329 -0
  116. package/dist/esm/rpc/request.js +194 -0
  117. package/dist/esm/rpc/request.js.map +1 -0
  118. package/dist/esm/rpc/schema.d.ts +319 -0
  119. package/dist/esm/rpc/schema.js +5 -0
  120. package/dist/esm/rpc/schema.js.map +1 -0
  121. package/dist/esm/schemas.d.ts +216 -0
  122. package/dist/esm/schemas.js +211 -0
  123. package/dist/esm/schemas.js.map +1 -0
  124. package/dist/esm/types.d.ts +27 -0
  125. package/dist/esm/types.js +2 -0
  126. package/dist/esm/types.js.map +1 -0
  127. package/dist/esm/utils.d.ts +4 -0
  128. package/dist/esm/utils.js +12 -0
  129. package/dist/esm/utils.js.map +1 -0
  130. package/dist/types/abi/LightAccountFactoryAbi_V1_0_1.d.ts +56 -0
  131. package/dist/types/abi/LightAccountFactoryAbi_V1_0_1.d.ts.map +1 -0
  132. package/dist/types/abi/LightAccountFactoryAbi_V1_0_2.d.ts +56 -0
  133. package/dist/types/abi/LightAccountFactoryAbi_V1_0_2.d.ts.map +1 -0
  134. package/dist/types/abi/LightAccountFactoryAbi_V1_1_0.d.ts +56 -0
  135. package/dist/types/abi/LightAccountFactoryAbi_V1_1_0.d.ts.map +1 -0
  136. package/dist/types/abi/LightAccountFactoryAbi_V2_0_0.d.ts +257 -0
  137. package/dist/types/abi/LightAccountFactoryAbi_V2_0_0.d.ts.map +1 -0
  138. package/dist/types/abi/ModularAccountFactoryAbi_V2_0_0.d.ts +493 -0
  139. package/dist/types/abi/ModularAccountFactoryAbi_V2_0_0.d.ts.map +1 -0
  140. package/dist/types/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.d.ts +287 -0
  141. package/dist/types/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.d.ts.map +1 -0
  142. package/dist/types/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.d.ts +235 -0
  143. package/dist/types/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.d.ts.map +1 -0
  144. package/dist/types/abi/MultisigModularAccountFactoryAbi_V1_0_0.d.ts +247 -0
  145. package/dist/types/abi/MultisigModularAccountFactoryAbi_V1_0_0.d.ts.map +1 -0
  146. package/dist/types/abi/index.d.ts +9 -0
  147. package/dist/types/abi/index.d.ts.map +1 -0
  148. package/dist/types/capabilities/index.d.ts +9 -0
  149. package/dist/types/capabilities/index.d.ts.map +1 -0
  150. package/dist/types/capabilities/paymaster.d.ts +4 -0
  151. package/dist/types/capabilities/paymaster.d.ts.map +1 -0
  152. package/dist/types/capabilities/permissions/index.d.ts +99 -0
  153. package/dist/types/capabilities/permissions/index.d.ts.map +1 -0
  154. package/dist/types/capabilities/permissions/mav2.d.ts +37 -0
  155. package/dist/types/capabilities/permissions/mav2.d.ts.map +1 -0
  156. package/dist/types/client/actions/createAccount.d.ts +11 -0
  157. package/dist/types/client/actions/createAccount.d.ts.map +1 -0
  158. package/dist/types/client/actions/getCallsStatus.d.ts +7 -0
  159. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -0
  160. package/dist/types/client/actions/grantPermissions.d.ts +14 -0
  161. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -0
  162. package/dist/types/client/actions/listAccounts.d.ts +7 -0
  163. package/dist/types/client/actions/listAccounts.d.ts.map +1 -0
  164. package/dist/types/client/actions/prepareCalls.d.ts +16 -0
  165. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -0
  166. package/dist/types/client/actions/requestAccount.d.ts +12 -0
  167. package/dist/types/client/actions/requestAccount.d.ts.map +1 -0
  168. package/dist/types/client/actions/sendPreparedCalls.d.ts +7 -0
  169. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -0
  170. package/dist/types/client/actions/signMessage.d.ts +7 -0
  171. package/dist/types/client/actions/signMessage.d.ts.map +1 -0
  172. package/dist/types/client/actions/signSignatureRequest.d.ts +11 -0
  173. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -0
  174. package/dist/types/client/actions/signTypedData.d.ts +7 -0
  175. package/dist/types/client/actions/signTypedData.d.ts.map +1 -0
  176. package/dist/types/client/client.e2e-test.d.ts +2 -0
  177. package/dist/types/client/client.e2e-test.d.ts.map +1 -0
  178. package/dist/types/client/decorator.d.ts +25 -0
  179. package/dist/types/client/decorator.d.ts.map +1 -0
  180. package/dist/types/client/index.d.ts +19 -0
  181. package/dist/types/client/index.d.ts.map +1 -0
  182. package/dist/types/exports/index.d.ts +14 -0
  183. package/dist/types/exports/index.d.ts.map +1 -0
  184. package/dist/types/exports/internal.d.ts +14 -0
  185. package/dist/types/exports/internal.d.ts.map +1 -0
  186. package/dist/types/isomorphic/actions/createSession.d.ts +15 -0
  187. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -0
  188. package/dist/types/isomorphic/actions/getCallsStatus.d.ts +22 -0
  189. package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +1 -0
  190. package/dist/types/isomorphic/actions/prepareCalls.d.ts +9 -0
  191. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -0
  192. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +9 -0
  193. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -0
  194. package/dist/types/isomorphic/client.d.ts +98 -0
  195. package/dist/types/isomorphic/client.d.ts.map +1 -0
  196. package/dist/types/isomorphic/utils/createAccount.d.ts +23 -0
  197. package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -0
  198. package/dist/types/isomorphic/utils/createDummySigner.d.ts +4 -0
  199. package/dist/types/isomorphic/utils/createDummySigner.d.ts.map +1 -0
  200. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +21 -0
  201. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +1 -0
  202. package/dist/types/local/client.d.ts +4 -0
  203. package/dist/types/local/client.d.ts.map +1 -0
  204. package/dist/types/remote/client.d.ts +4 -0
  205. package/dist/types/remote/client.d.ts.map +1 -0
  206. package/dist/types/rpc/request.d.ts +330 -0
  207. package/dist/types/rpc/request.d.ts.map +1 -0
  208. package/dist/types/rpc/schema.d.ts +320 -0
  209. package/dist/types/rpc/schema.d.ts.map +1 -0
  210. package/dist/types/schemas.d.ts +217 -0
  211. package/dist/types/schemas.d.ts.map +1 -0
  212. package/dist/types/types.d.ts +28 -0
  213. package/dist/types/types.d.ts.map +1 -0
  214. package/dist/types/utils.d.ts +5 -0
  215. package/dist/types/utils.d.ts.map +1 -0
  216. package/package.json +67 -0
  217. package/src/abi/LightAccountFactoryAbi_V1_0_1.ts +44 -0
  218. package/src/abi/LightAccountFactoryAbi_V1_0_2.ts +44 -0
  219. package/src/abi/LightAccountFactoryAbi_V1_1_0.ts +44 -0
  220. package/src/abi/LightAccountFactoryAbi_V2_0_0.ts +201 -0
  221. package/src/abi/ModularAccountFactoryAbi_V2_0_0.ts +398 -0
  222. package/src/abi/MultiOwnerLightAccountFactoryAbi_V2_0_0.ts +224 -0
  223. package/src/abi/MultiOwnerModularAccountFactoryAbi_V1_0_0.ts +178 -0
  224. package/src/abi/MultisigModularAccountFactoryAbi_V1_0_0.ts +181 -0
  225. package/src/abi/index.ts +8 -0
  226. package/src/capabilities/index.ts +11 -0
  227. package/src/capabilities/paymaster.ts +5 -0
  228. package/src/capabilities/permissions/index.ts +124 -0
  229. package/src/capabilities/permissions/mav2.ts +127 -0
  230. package/src/client/actions/createAccount.ts +28 -0
  231. package/src/client/actions/getCallsStatus.ts +29 -0
  232. package/src/client/actions/grantPermissions.ts +48 -0
  233. package/src/client/actions/listAccounts.ts +18 -0
  234. package/src/client/actions/prepareCalls.ts +55 -0
  235. package/src/client/actions/requestAccount.ts +71 -0
  236. package/src/client/actions/sendPreparedCalls.ts +23 -0
  237. package/src/client/actions/signMessage.ts +32 -0
  238. package/src/client/actions/signSignatureRequest.ts +34 -0
  239. package/src/client/actions/signTypedData.ts +32 -0
  240. package/src/client/client.e2e-test.ts +294 -0
  241. package/src/client/decorator.ts +102 -0
  242. package/src/client/index.ts +93 -0
  243. package/src/exports/index.ts +32 -0
  244. package/src/exports/internal.ts +16 -0
  245. package/src/isomorphic/actions/createSession.ts +116 -0
  246. package/src/isomorphic/actions/getCallsStatus.ts +98 -0
  247. package/src/isomorphic/actions/prepareCalls.ts +99 -0
  248. package/src/isomorphic/actions/sendPreparedCalls.ts +95 -0
  249. package/src/isomorphic/client.ts +81 -0
  250. package/src/isomorphic/utils/createAccount.ts +58 -0
  251. package/src/isomorphic/utils/createDummySigner.ts +26 -0
  252. package/src/isomorphic/utils/parsePermissionsContext.ts +33 -0
  253. package/src/local/client.ts +132 -0
  254. package/src/remote/client.ts +67 -0
  255. package/src/rpc/request.ts +258 -0
  256. package/src/rpc/schema.ts +40 -0
  257. package/src/schemas.ts +257 -0
  258. package/src/types.ts +60 -0
  259. package/src/utils.ts +13 -0
@@ -0,0 +1,329 @@
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").TString;
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
+ }>>;
68
+ }>]>;
69
+ }>;
70
+ ReturnType: import("@sinclair/typebox").TObject<{
71
+ type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user-operation-v060">, import("@sinclair/typebox").TLiteral<"user-operation-v070">]>;
72
+ data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
73
+ sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
74
+ nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
75
+ initCode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
76
+ callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
77
+ callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
78
+ verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
79
+ preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
80
+ maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
81
+ maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
82
+ paymasterAndData: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TLiteral<"0x">]>;
83
+ }>, import("@sinclair/typebox").TObject<{
84
+ sender: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
85
+ nonce: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
86
+ callData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
87
+ callGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
88
+ verificationGasLimit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
89
+ preVerificationGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
90
+ maxFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
91
+ maxPriorityFeePerGas: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
92
+ factory: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
93
+ factoryData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
94
+ paymaster: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
95
+ paymasterData: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
96
+ paymasterVerificationGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
97
+ paymasterPostOpGasLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
98
+ }>]>;
99
+ chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
100
+ signatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
101
+ type: import("@sinclair/typebox").TLiteral<"personal_sign">;
102
+ data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
103
+ raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
104
+ }>]>;
105
+ }>, import("@sinclair/typebox").TObject<{
106
+ type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
107
+ data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
108
+ domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
109
+ chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
110
+ name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
111
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
112
+ verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
113
+ version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
114
+ }>>;
115
+ types: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
116
+ name: import("@sinclair/typebox").TString;
117
+ type: import("@sinclair/typebox").TString;
118
+ }>>>;
119
+ primaryType: import("@sinclair/typebox").TString;
120
+ message: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
121
+ }>, {
122
+ domain?: {
123
+ salt?: `0x${string}` | undefined;
124
+ chainId?: number | undefined;
125
+ name?: string | undefined;
126
+ verifyingContract?: `0x${string}` | undefined;
127
+ version?: string | undefined;
128
+ } | undefined;
129
+ types: {
130
+ [x: string]: {
131
+ type: string;
132
+ name: string;
133
+ }[];
134
+ };
135
+ primaryType: string;
136
+ message: {
137
+ [x: string]: unknown;
138
+ };
139
+ }>;
140
+ }>]>;
141
+ }>;
142
+ }>;
143
+ export declare const wallet_requestAccount: import("@sinclair/typebox").TObject<{
144
+ Request: import("@sinclair/typebox").TObject<{
145
+ method: import("@sinclair/typebox").TLiteral<"wallet_requestAccount">;
146
+ params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
147
+ signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
148
+ id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
149
+ creationHint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
150
+ accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
151
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
152
+ }>>;
153
+ includeCounterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
154
+ }>, import("@sinclair/typebox").TObject<{
155
+ accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
156
+ includeCounterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
157
+ }>]>]>;
158
+ }>;
159
+ ReturnType: import("@sinclair/typebox").TObject<{
160
+ accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
161
+ id: import("@sinclair/typebox").TString;
162
+ counterfactualInfo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
163
+ 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">]>;
164
+ factoryAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
165
+ factoryData: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
166
+ }>>;
167
+ }>;
168
+ }>;
169
+ export declare const wallet_createAccount: import("@sinclair/typebox").TObject<{
170
+ Request: import("@sinclair/typebox").TObject<{
171
+ method: import("@sinclair/typebox").TLiteral<"wallet_createAccount">;
172
+ params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
173
+ signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
174
+ id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
175
+ creationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
176
+ accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
177
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
178
+ }>>;
179
+ }>]>;
180
+ }>;
181
+ ReturnType: import("@sinclair/typebox").TObject<{
182
+ accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
183
+ id: import("@sinclair/typebox").TString;
184
+ }>;
185
+ }>;
186
+ export declare const wallet_listAccounts: import("@sinclair/typebox").TObject<{
187
+ Request: import("@sinclair/typebox").TObject<{
188
+ method: import("@sinclair/typebox").TLiteral<"wallet_listAccounts">;
189
+ params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TObject<{
190
+ signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
191
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
192
+ after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
193
+ }>]>;
194
+ }>;
195
+ ReturnType: import("@sinclair/typebox").TObject<{
196
+ accounts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
197
+ accountAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
198
+ id: import("@sinclair/typebox").TString;
199
+ }>>;
200
+ meta: import("@sinclair/typebox").TObject<{
201
+ totalCount: import("@sinclair/typebox").TNumber;
202
+ after: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
203
+ }>;
204
+ }>;
205
+ }>;
206
+ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
207
+ Request: import("@sinclair/typebox").TObject<{
208
+ method: import("@sinclair/typebox").TLiteral<"wallet_createSession">;
209
+ params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
210
+ chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
211
+ expiry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
212
+ key: import("@sinclair/typebox").TObject<{
213
+ type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"secp256k1">, import("@sinclair/typebox").TLiteral<"contract">]>;
214
+ publicKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
215
+ }>;
216
+ permissions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
217
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.NATIVE_TOKEN_TRANSFER>;
218
+ data: import("@sinclair/typebox").TObject<{
219
+ allowance: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
220
+ }>;
221
+ }>, import("@sinclair/typebox").TObject<{
222
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.ERC20_TOKEN_TRANSFER>;
223
+ data: import("@sinclair/typebox").TObject<{
224
+ allowance: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
225
+ address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
226
+ }>;
227
+ }>, import("@sinclair/typebox").TObject<{
228
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.GAS_LIMIT>;
229
+ data: import("@sinclair/typebox").TObject<{
230
+ limit: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
231
+ }>;
232
+ }>, import("@sinclair/typebox").TObject<{
233
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.CONTRACT_ACCESS>;
234
+ data: import("@sinclair/typebox").TObject<{
235
+ address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
236
+ }>;
237
+ }>, import("@sinclair/typebox").TObject<{
238
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.ACCOUNT_FUNCTIONS>;
239
+ data: import("@sinclair/typebox").TObject<{
240
+ functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
241
+ }>;
242
+ }>, import("@sinclair/typebox").TObject<{
243
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.FUNCTIONS_ON_ALL_CONTRACTS>;
244
+ data: import("@sinclair/typebox").TObject<{
245
+ functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
246
+ }>;
247
+ }>, import("@sinclair/typebox").TObject<{
248
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.FUNCTIONS_ON_CONTRACT>;
249
+ data: import("@sinclair/typebox").TObject<{
250
+ address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
251
+ functions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
252
+ }>;
253
+ }>, import("@sinclair/typebox").TObject<{
254
+ type: import("@sinclair/typebox").TLiteral<import("@account-kit/smart-contracts/experimental").PermissionType.ROOT>;
255
+ data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNever>;
256
+ }>]>>;
257
+ }>, import("@sinclair/typebox").TObject<{
258
+ account: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
259
+ }>]>]>;
260
+ }>;
261
+ ReturnType: import("@sinclair/typebox").TObject<{
262
+ sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
263
+ signatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
264
+ type: import("@sinclair/typebox").TLiteral<"personal_sign">;
265
+ data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
266
+ raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
267
+ }>]>;
268
+ }>, import("@sinclair/typebox").TObject<{
269
+ type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
270
+ data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
271
+ domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
272
+ chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
273
+ name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
274
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
275
+ verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
276
+ version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
277
+ }>>;
278
+ types: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
279
+ name: import("@sinclair/typebox").TString;
280
+ type: import("@sinclair/typebox").TString;
281
+ }>>>;
282
+ primaryType: import("@sinclair/typebox").TString;
283
+ message: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
284
+ }>, {
285
+ domain?: {
286
+ salt?: `0x${string}` | undefined;
287
+ chainId?: number | undefined;
288
+ name?: string | undefined;
289
+ verifyingContract?: `0x${string}` | undefined;
290
+ version?: string | undefined;
291
+ } | undefined;
292
+ types: {
293
+ [x: string]: {
294
+ type: string;
295
+ name: string;
296
+ }[];
297
+ };
298
+ primaryType: string;
299
+ message: {
300
+ [x: string]: unknown;
301
+ };
302
+ }>;
303
+ }>]>;
304
+ }>;
305
+ }>;
306
+ export declare const wallet_getCallsStatus: import("@sinclair/typebox").TObject<{
307
+ Request: import("@sinclair/typebox").TObject<{
308
+ method: import("@sinclair/typebox").TLiteral<"wallet_getCallsStatus">;
309
+ params: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">]>;
310
+ }>;
311
+ ReturnType: import("@sinclair/typebox").TObject<{
312
+ id: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
313
+ chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
314
+ atomic: import("@sinclair/typebox").TBoolean;
315
+ 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>]>;
316
+ receipts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
317
+ logs: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
318
+ address: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
319
+ data: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
320
+ topics: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
321
+ }>>;
322
+ status: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
323
+ blockHash: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
324
+ blockNumber: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
325
+ gasUsed: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
326
+ transactionHash: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
327
+ }>>>;
328
+ }>;
329
+ }>;
@@ -0,0 +1,194 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { Capabilities } from "../capabilities";
3
+ import { PermissionsContext, PermissionsData, } from "../capabilities/permissions";
4
+ import { TypeAddress, TypeBase64UrlEncodedString, TypeCreationOptions, TypeHex, TypeSerializedInitcode, TypeSignatureRequest, TypeUserOperationRequest_v6, TypeUserOperationRequest_v7, TypeUuid, } from "../schemas";
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
+ // ignored, but in the spec can be used when the signature on the UO needs to be formatted differently
21
+ // potentially useful for deferred actions?
22
+ type: Type.String(),
23
+ signature: TypeHex(),
24
+ }),
25
+ capabilities: Type.Optional(Type.Object({ permissions: PermissionsContext })),
26
+ }),
27
+ ]),
28
+ }),
29
+ ReturnType: Type.Object({
30
+ preparedCallIds: Type.Array(TypeHex()),
31
+ }),
32
+ }, {
33
+ description: "This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation",
34
+ });
35
+ export const wallet_prepareCalls = Type.Object({
36
+ Request: Type.Object({
37
+ method: Type.Literal("wallet_prepareCalls"),
38
+ params: Type.Tuple([
39
+ Type.Object({
40
+ calls: Type.Array(Type.Object({
41
+ to: TypeAddress,
42
+ data: Type.Optional(TypeHex()),
43
+ value: Type.Optional(TypeHex()),
44
+ })),
45
+ from: TypeAddress,
46
+ chainId: TypeHex(),
47
+ capabilities: Type.Optional(Capabilities),
48
+ }),
49
+ ]),
50
+ }),
51
+ ReturnType: Type.Object({
52
+ type: Type.Union([
53
+ Type.Literal("user-operation-v060"),
54
+ Type.Literal("user-operation-v070"),
55
+ ]),
56
+ data: Type.Union([
57
+ Type.Omit(TypeUserOperationRequest_v6, ["signature"]),
58
+ Type.Omit(TypeUserOperationRequest_v7, ["signature"]),
59
+ ]),
60
+ chainId: TypeHex(),
61
+ signatureRequest: TypeSignatureRequest,
62
+ }),
63
+ }, {
64
+ 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",
65
+ });
66
+ export const wallet_requestAccount = Type.Object({
67
+ Request: Type.Object({
68
+ method: Type.Literal("wallet_requestAccount"),
69
+ params: Type.Tuple([
70
+ Type.Union([
71
+ Type.Object({
72
+ signerAddress: TypeAddress,
73
+ id: Type.Optional(TypeUuid),
74
+ creationHint: TypeCreationOptions,
75
+ includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
76
+ }),
77
+ Type.Object({
78
+ accountAddress: TypeAddress,
79
+ includeCounterfactualInfo: Type.Optional(Type.Boolean({ default: false })),
80
+ }),
81
+ ]),
82
+ ]),
83
+ }),
84
+ ReturnType: Type.Object({
85
+ accountAddress: TypeAddress,
86
+ id: TypeUuid,
87
+ counterfactualInfo: Type.Optional(TypeSerializedInitcode),
88
+ }),
89
+ }, {
90
+ 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.`,
91
+ });
92
+ export const wallet_createAccount = Type.Object({
93
+ Request: Type.Object({
94
+ method: Type.Literal("wallet_createAccount"),
95
+ params: Type.Tuple([
96
+ Type.Object({
97
+ signerAddress: TypeAddress,
98
+ id: Type.Optional(TypeUuid),
99
+ creationOptions: TypeCreationOptions,
100
+ }),
101
+ ]),
102
+ }),
103
+ ReturnType: Type.Object({
104
+ accountAddress: TypeAddress,
105
+ id: TypeUuid,
106
+ }),
107
+ }, {
108
+ 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.`,
109
+ });
110
+ export const wallet_listAccounts = Type.Object({
111
+ Request: Type.Object({
112
+ method: Type.Literal("wallet_listAccounts"),
113
+ params: Type.Tuple([
114
+ Type.Object({
115
+ signerAddress: TypeAddress,
116
+ limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100, default: 100 })),
117
+ after: Type.Optional(TypeBase64UrlEncodedString),
118
+ }),
119
+ ]),
120
+ }),
121
+ ReturnType: Type.Object({
122
+ accounts: Type.Array(Type.Object({
123
+ accountAddress: TypeAddress,
124
+ id: TypeUuid,
125
+ })),
126
+ meta: Type.Object({
127
+ totalCount: Type.Number(),
128
+ after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),
129
+ }),
130
+ }),
131
+ }, {
132
+ description: "This method is used to list all smart accounts for a given signer.",
133
+ });
134
+ export const wallet_createSession = Type.Object({
135
+ Request: Type.Object({
136
+ method: Type.Literal("wallet_createSession"),
137
+ params: Type.Tuple([
138
+ Type.Intersect([PermissionsData, Type.Object({ account: TypeAddress })]),
139
+ ]),
140
+ }),
141
+ ReturnType: Type.Object({
142
+ sessionId: TypeHex(),
143
+ signatureRequest: TypeSignatureRequest,
144
+ }),
145
+ });
146
+ export const wallet_getCallsStatus = Type.Object({
147
+ Request: Type.Object({
148
+ method: Type.Literal("wallet_getCallsStatus"),
149
+ params: Type.Tuple([
150
+ TypeHex({
151
+ description: "The call ID returned from wallet_sendPreparedCalls",
152
+ }),
153
+ ]),
154
+ }),
155
+ ReturnType: Type.Object({
156
+ id: TypeHex(),
157
+ chainId: TypeHex(),
158
+ atomic: Type.Boolean(),
159
+ status: Type.Union([
160
+ Type.Literal(100, {
161
+ description: "Batch has been received by the wallet but has not completed execution onchain",
162
+ }),
163
+ Type.Literal(200, {
164
+ description: "Batch has been included onchain without reverts, receipts array contains info of all calls",
165
+ }),
166
+ Type.Literal(400, {
167
+ description: "Batch has not been included onchain and wallet will not retry",
168
+ }),
169
+ Type.Literal(500, {
170
+ description: "Batch reverted *completely* and only changes related to gas charge may have been included onchain",
171
+ }),
172
+ Type.Literal(600, {
173
+ description: "Batch reverted *partially* and some changes related to batch calls may have been included onchain",
174
+ }),
175
+ ]),
176
+ receipts: Type.Optional(Type.Array(Type.Object({
177
+ logs: Type.Array(Type.Object({
178
+ address: TypeAddress,
179
+ data: TypeHex(),
180
+ topics: Type.Array(TypeHex()),
181
+ })),
182
+ status: TypeHex({
183
+ description: "0x1 for success, 0x0 for failure",
184
+ }),
185
+ blockHash: TypeHex(),
186
+ blockNumber: TypeHex(),
187
+ gasUsed: TypeHex(),
188
+ transactionHash: TypeHex(),
189
+ }))),
190
+ }),
191
+ }, {
192
+ description: "This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.",
193
+ });
194
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/rpc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BAChB,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\";\nimport {\n PermissionsContext,\n PermissionsData,\n} from \"../capabilities/permissions\";\nimport {\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeHex,\n TypeSerializedInitcode,\n TypeSignatureRequest,\n TypeUserOperationRequest_v6,\n TypeUserOperationRequest_v7,\n TypeUuid,\n} from \"../schemas\";\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 // ignored, but in the spec can be used when the signature on the UO needs to be formatted differently\n // potentially useful for deferred actions?\n type: Type.String(),\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 Request: Type.Object({\n method: Type.Literal(\"wallet_createSession\"),\n params: Type.Tuple([\n Type.Intersect([PermissionsData, Type.Object({ account: TypeAddress })]),\n ]),\n }),\n ReturnType: Type.Object({\n sessionId: TypeHex(),\n signatureRequest: TypeSignatureRequest,\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"]}