@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,178 @@
1
+ export const MultiOwnerModularAccountFactoryAbi_V1_0_0 = [
2
+ {
3
+ inputs: [
4
+ { internalType: "address", name: "owner", type: "address" },
5
+ { internalType: "address", name: "multiOwnerPlugin", type: "address" },
6
+ { internalType: "address", name: "implementation", type: "address" },
7
+ {
8
+ internalType: "bytes32",
9
+ name: "multiOwnerPluginManifestHash",
10
+ type: "bytes32",
11
+ },
12
+ {
13
+ internalType: "contract IEntryPoint",
14
+ name: "entryPoint",
15
+ type: "address",
16
+ },
17
+ ],
18
+ stateMutability: "nonpayable",
19
+ type: "constructor",
20
+ },
21
+ { inputs: [], name: "InvalidAction", type: "error" },
22
+ { inputs: [], name: "InvalidOwner", type: "error" },
23
+ { inputs: [], name: "OwnersArrayEmpty", type: "error" },
24
+ { inputs: [], name: "OwnersLimitExceeded", type: "error" },
25
+ { inputs: [], name: "TransferFailed", type: "error" },
26
+ {
27
+ anonymous: false,
28
+ inputs: [
29
+ {
30
+ indexed: true,
31
+ internalType: "address",
32
+ name: "previousOwner",
33
+ type: "address",
34
+ },
35
+ {
36
+ indexed: true,
37
+ internalType: "address",
38
+ name: "newOwner",
39
+ type: "address",
40
+ },
41
+ ],
42
+ name: "OwnershipTransferStarted",
43
+ type: "event",
44
+ },
45
+ {
46
+ anonymous: false,
47
+ inputs: [
48
+ {
49
+ indexed: true,
50
+ internalType: "address",
51
+ name: "previousOwner",
52
+ type: "address",
53
+ },
54
+ {
55
+ indexed: true,
56
+ internalType: "address",
57
+ name: "newOwner",
58
+ type: "address",
59
+ },
60
+ ],
61
+ name: "OwnershipTransferred",
62
+ type: "event",
63
+ },
64
+ {
65
+ inputs: [],
66
+ name: "ENTRYPOINT",
67
+ outputs: [
68
+ { internalType: "contract IEntryPoint", name: "", type: "address" },
69
+ ],
70
+ stateMutability: "view",
71
+ type: "function",
72
+ },
73
+ {
74
+ inputs: [],
75
+ name: "IMPL",
76
+ outputs: [{ internalType: "address", name: "", type: "address" }],
77
+ stateMutability: "view",
78
+ type: "function",
79
+ },
80
+ {
81
+ inputs: [],
82
+ name: "MULTI_OWNER_PLUGIN",
83
+ outputs: [{ internalType: "address", name: "", type: "address" }],
84
+ stateMutability: "view",
85
+ type: "function",
86
+ },
87
+ {
88
+ inputs: [],
89
+ name: "acceptOwnership",
90
+ outputs: [],
91
+ stateMutability: "nonpayable",
92
+ type: "function",
93
+ },
94
+ {
95
+ inputs: [
96
+ { internalType: "uint32", name: "unstakeDelay", type: "uint32" },
97
+ { internalType: "uint256", name: "amount", type: "uint256" },
98
+ ],
99
+ name: "addStake",
100
+ outputs: [],
101
+ stateMutability: "payable",
102
+ type: "function",
103
+ },
104
+ {
105
+ inputs: [
106
+ { internalType: "uint256", name: "salt", type: "uint256" },
107
+ { internalType: "address[]", name: "owners", type: "address[]" },
108
+ ],
109
+ name: "createAccount",
110
+ outputs: [{ internalType: "address", name: "addr", type: "address" }],
111
+ stateMutability: "nonpayable",
112
+ type: "function",
113
+ },
114
+ {
115
+ inputs: [
116
+ { internalType: "uint256", name: "salt", type: "uint256" },
117
+ { internalType: "address[]", name: "owners", type: "address[]" },
118
+ ],
119
+ name: "getAddress",
120
+ outputs: [{ internalType: "address", name: "", type: "address" }],
121
+ stateMutability: "view",
122
+ type: "function",
123
+ },
124
+ {
125
+ inputs: [],
126
+ name: "owner",
127
+ outputs: [{ internalType: "address", name: "", type: "address" }],
128
+ stateMutability: "view",
129
+ type: "function",
130
+ },
131
+ {
132
+ inputs: [],
133
+ name: "pendingOwner",
134
+ outputs: [{ internalType: "address", name: "", type: "address" }],
135
+ stateMutability: "view",
136
+ type: "function",
137
+ },
138
+ {
139
+ inputs: [],
140
+ name: "renounceOwnership",
141
+ outputs: [],
142
+ stateMutability: "view",
143
+ type: "function",
144
+ },
145
+ {
146
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
147
+ name: "transferOwnership",
148
+ outputs: [],
149
+ stateMutability: "nonpayable",
150
+ type: "function",
151
+ },
152
+ {
153
+ inputs: [],
154
+ name: "unlockStake",
155
+ outputs: [],
156
+ stateMutability: "nonpayable",
157
+ type: "function",
158
+ },
159
+ {
160
+ inputs: [
161
+ { internalType: "address payable", name: "to", type: "address" },
162
+ { internalType: "address", name: "token", type: "address" },
163
+ { internalType: "uint256", name: "amount", type: "uint256" },
164
+ ],
165
+ name: "withdraw",
166
+ outputs: [],
167
+ stateMutability: "nonpayable",
168
+ type: "function",
169
+ },
170
+ {
171
+ inputs: [{ internalType: "address payable", name: "to", type: "address" }],
172
+ name: "withdrawStake",
173
+ outputs: [],
174
+ stateMutability: "nonpayable",
175
+ type: "function",
176
+ },
177
+ { stateMutability: "payable", type: "receive" },
178
+ ] as const;
@@ -0,0 +1,181 @@
1
+ export const MultisigModularAccountFactoryAbi_V1_0_0 = [
2
+ {
3
+ inputs: [
4
+ { internalType: "address", name: "owner", type: "address" },
5
+ { internalType: "address", name: "multisigPlugin", type: "address" },
6
+ { internalType: "address", name: "implementation", type: "address" },
7
+ {
8
+ internalType: "bytes32",
9
+ name: "multisigPluginManifestHash",
10
+ type: "bytes32",
11
+ },
12
+ {
13
+ internalType: "contract IEntryPoint",
14
+ name: "entryPoint",
15
+ type: "address",
16
+ },
17
+ ],
18
+ stateMutability: "nonpayable",
19
+ type: "constructor",
20
+ },
21
+ { inputs: [], name: "InvalidAction", type: "error" },
22
+ { inputs: [], name: "InvalidOwner", type: "error" },
23
+ { inputs: [], name: "InvalidThreshold", type: "error" },
24
+ { inputs: [], name: "OwnersArrayEmpty", type: "error" },
25
+ { inputs: [], name: "OwnersLimitExceeded", type: "error" },
26
+ { inputs: [], name: "TransferFailed", type: "error" },
27
+ {
28
+ anonymous: false,
29
+ inputs: [
30
+ {
31
+ indexed: true,
32
+ internalType: "address",
33
+ name: "previousOwner",
34
+ type: "address",
35
+ },
36
+ {
37
+ indexed: true,
38
+ internalType: "address",
39
+ name: "newOwner",
40
+ type: "address",
41
+ },
42
+ ],
43
+ name: "OwnershipTransferStarted",
44
+ type: "event",
45
+ },
46
+ {
47
+ anonymous: false,
48
+ inputs: [
49
+ {
50
+ indexed: true,
51
+ internalType: "address",
52
+ name: "previousOwner",
53
+ type: "address",
54
+ },
55
+ {
56
+ indexed: true,
57
+ internalType: "address",
58
+ name: "newOwner",
59
+ type: "address",
60
+ },
61
+ ],
62
+ name: "OwnershipTransferred",
63
+ type: "event",
64
+ },
65
+ {
66
+ inputs: [],
67
+ name: "ENTRYPOINT",
68
+ outputs: [
69
+ { internalType: "contract IEntryPoint", name: "", type: "address" },
70
+ ],
71
+ stateMutability: "view",
72
+ type: "function",
73
+ },
74
+ {
75
+ inputs: [],
76
+ name: "IMPL",
77
+ outputs: [{ internalType: "address", name: "", type: "address" }],
78
+ stateMutability: "view",
79
+ type: "function",
80
+ },
81
+ {
82
+ inputs: [],
83
+ name: "MULTISIG_PLUGIN",
84
+ outputs: [{ internalType: "address", name: "", type: "address" }],
85
+ stateMutability: "view",
86
+ type: "function",
87
+ },
88
+ {
89
+ inputs: [],
90
+ name: "acceptOwnership",
91
+ outputs: [],
92
+ stateMutability: "nonpayable",
93
+ type: "function",
94
+ },
95
+ {
96
+ inputs: [
97
+ { internalType: "uint32", name: "unstakeDelay", type: "uint32" },
98
+ { internalType: "uint256", name: "amount", type: "uint256" },
99
+ ],
100
+ name: "addStake",
101
+ outputs: [],
102
+ stateMutability: "payable",
103
+ type: "function",
104
+ },
105
+ {
106
+ inputs: [
107
+ { internalType: "uint256", name: "salt", type: "uint256" },
108
+ { internalType: "address[]", name: "owners", type: "address[]" },
109
+ { internalType: "uint128", name: "threshold", type: "uint128" },
110
+ ],
111
+ name: "createAccount",
112
+ outputs: [{ internalType: "address", name: "addr", type: "address" }],
113
+ stateMutability: "nonpayable",
114
+ type: "function",
115
+ },
116
+ {
117
+ inputs: [
118
+ { internalType: "uint256", name: "salt", type: "uint256" },
119
+ { internalType: "address[]", name: "owners", type: "address[]" },
120
+ { internalType: "uint128", name: "threshold", type: "uint128" },
121
+ ],
122
+ name: "getAddress",
123
+ outputs: [{ internalType: "address", name: "", type: "address" }],
124
+ stateMutability: "view",
125
+ type: "function",
126
+ },
127
+ {
128
+ inputs: [],
129
+ name: "owner",
130
+ outputs: [{ internalType: "address", name: "", type: "address" }],
131
+ stateMutability: "view",
132
+ type: "function",
133
+ },
134
+ {
135
+ inputs: [],
136
+ name: "pendingOwner",
137
+ outputs: [{ internalType: "address", name: "", type: "address" }],
138
+ stateMutability: "view",
139
+ type: "function",
140
+ },
141
+ {
142
+ inputs: [],
143
+ name: "renounceOwnership",
144
+ outputs: [],
145
+ stateMutability: "view",
146
+ type: "function",
147
+ },
148
+ {
149
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
150
+ name: "transferOwnership",
151
+ outputs: [],
152
+ stateMutability: "nonpayable",
153
+ type: "function",
154
+ },
155
+ {
156
+ inputs: [],
157
+ name: "unlockStake",
158
+ outputs: [],
159
+ stateMutability: "nonpayable",
160
+ type: "function",
161
+ },
162
+ {
163
+ inputs: [
164
+ { internalType: "address payable", name: "to", type: "address" },
165
+ { internalType: "address", name: "token", type: "address" },
166
+ { internalType: "uint256", name: "amount", type: "uint256" },
167
+ ],
168
+ name: "withdraw",
169
+ outputs: [],
170
+ stateMutability: "nonpayable",
171
+ type: "function",
172
+ },
173
+ {
174
+ inputs: [{ internalType: "address payable", name: "to", type: "address" }],
175
+ name: "withdrawStake",
176
+ outputs: [],
177
+ stateMutability: "nonpayable",
178
+ type: "function",
179
+ },
180
+ { stateMutability: "payable", type: "receive" },
181
+ ] as const;
@@ -0,0 +1,8 @@
1
+ export { LightAccountFactoryAbi_V1_0_1 } from "./LightAccountFactoryAbi_V1_0_1";
2
+ export { LightAccountFactoryAbi_V1_0_2 } from "./LightAccountFactoryAbi_V1_0_2";
3
+ export { LightAccountFactoryAbi_V1_1_0 } from "./LightAccountFactoryAbi_V1_1_0";
4
+ export { LightAccountFactoryAbi_V2_0_0 } from "./LightAccountFactoryAbi_V2_0_0";
5
+ export { ModularAccountFactoryAbi_V2_0_0 } from "./ModularAccountFactoryAbi_V2_0_0";
6
+ export { MultiOwnerLightAccountFactoryAbi_V2_0_0 } from "./MultiOwnerLightAccountFactoryAbi_V2_0_0";
7
+ export { MultiOwnerModularAccountFactoryAbi_V1_0_0 } from "./MultiOwnerModularAccountFactoryAbi_V1_0_0";
8
+ export { MultisigModularAccountFactoryAbi_V1_0_0 } from "./MultisigModularAccountFactoryAbi_V1_0_0";
@@ -0,0 +1,11 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { PaymasterCapability } from "./paymaster";
3
+ import { PermissionsCapability } from "./permissions";
4
+
5
+ export const Capabilities = Type.Object(
6
+ {
7
+ permissions: Type.Optional(PermissionsCapability),
8
+ paymasterService: Type.Optional(PaymasterCapability),
9
+ },
10
+ { minProperties: 1 },
11
+ );
@@ -0,0 +1,5 @@
1
+ import { Type } from "@sinclair/typebox";
2
+
3
+ export const PaymasterCapability = Type.Object({
4
+ policyId: Type.String(),
5
+ });
@@ -0,0 +1,124 @@
1
+ import { PermissionType } from "@account-kit/smart-contracts/experimental";
2
+ import {
3
+ Type,
4
+ type TLiteral,
5
+ type TLiteralValue,
6
+ type TObject,
7
+ type TSchema,
8
+ } from "@sinclair/typebox";
9
+ import { KeySigner, TypeAddress, TypeHex } from "../../schemas";
10
+
11
+ const Permission = <
12
+ TData extends TSchema,
13
+ TLiteralVal extends TLiteralValue,
14
+ TType extends TLiteral<TLiteralVal>,
15
+ >(
16
+ type: TLiteralVal,
17
+ data: TData,
18
+ description: string,
19
+ ): TObject<{ type: TType; data: TData }> => {
20
+ return Type.Object(
21
+ {
22
+ type: Type.Literal(type),
23
+ data,
24
+ },
25
+ { description: description },
26
+ ) as never;
27
+ };
28
+
29
+ const NativeTokenTransfer = Permission(
30
+ PermissionType.NATIVE_TOKEN_TRANSFER,
31
+ Type.Object({
32
+ allowance: TypeHex(),
33
+ }),
34
+ "allows transfer of native tokens from the account",
35
+ );
36
+
37
+ const Erc20TokenTransfer = Permission(
38
+ PermissionType.ERC20_TOKEN_TRANSFER,
39
+ Type.Object({
40
+ allowance: TypeHex(),
41
+ address: TypeAddress,
42
+ }),
43
+ "allows transfer or approval of erc20 tokens from the account",
44
+ );
45
+
46
+ const GasLimit = Permission(
47
+ PermissionType.GAS_LIMIT,
48
+ Type.Object({
49
+ limit: TypeHex(),
50
+ }),
51
+ "allows the key to spend gas for UOs",
52
+ );
53
+
54
+ const ContractAccess = Permission(
55
+ PermissionType.CONTRACT_ACCESS,
56
+ Type.Object({
57
+ address: TypeAddress,
58
+ }),
59
+ "grants access to all functions in a contract",
60
+ );
61
+
62
+ const AccountFunction = Permission(
63
+ PermissionType.ACCOUNT_FUNCTIONS,
64
+ Type.Object({
65
+ functions: Type.Array(TypeHex(), { minItems: 1 }),
66
+ }),
67
+ "grants access to functions in the account",
68
+ );
69
+
70
+ const AllExternalFunctionAccess = Permission(
71
+ PermissionType.FUNCTIONS_ON_ALL_CONTRACTS,
72
+ Type.Object({
73
+ functions: Type.Array(TypeHex(), { minItems: 1 }),
74
+ }),
75
+ "access to a function selector in any address or contract",
76
+ );
77
+
78
+ const ContractFunctionAccess = Permission(
79
+ PermissionType.FUNCTIONS_ON_CONTRACT,
80
+ Type.Object({
81
+ address: TypeAddress,
82
+ functions: Type.Array(TypeHex(), { minItems: 1 }),
83
+ }),
84
+ "grants access to specified functions on a specific contract",
85
+ );
86
+
87
+ const Root = Permission(
88
+ PermissionType.ROOT,
89
+ Type.Optional(Type.Never()),
90
+ "grants full access to everything",
91
+ );
92
+
93
+ export const PermissionsArray = Type.Array(
94
+ Type.Union([
95
+ // 7715 permissions
96
+ NativeTokenTransfer,
97
+ Erc20TokenTransfer,
98
+ GasLimit,
99
+ // additional permissions
100
+ ContractAccess,
101
+ AccountFunction,
102
+ AllExternalFunctionAccess,
103
+ ContractFunctionAccess,
104
+ Root,
105
+ ]),
106
+ { minItems: 1 },
107
+ );
108
+
109
+ export const PermissionsContext = Type.Object({
110
+ context: TypeHex(),
111
+ });
112
+
113
+ export const PermissionsData = Type.Object({
114
+ chainId: TypeHex(),
115
+ expiry: Type.Optional(Type.Number()),
116
+ key: KeySigner,
117
+ permissions: PermissionsArray,
118
+ });
119
+
120
+ export const PermissionsCapability = Type.Union([
121
+ PermissionsContext,
122
+ // TODO: support permissions object here instead of only context-encoded permissions
123
+ // PermissionsData,
124
+ ]);
@@ -0,0 +1,127 @@
1
+ import { PermissionType } from "@account-kit/smart-contracts/experimental";
2
+ import type { Static } from "@sinclair/typebox";
3
+ import { concatHex, sliceHex, type Hex } from "viem";
4
+ import type { PermissionsData } from ".";
5
+ import type { KeySigner } from "../../schemas";
6
+ import { assertNever } from "../../utils";
7
+
8
+ export const SESSION_ID_LENGTH_BYTES = 16;
9
+ export const ENTITY_ID_LENGTH_BYTES = 4;
10
+
11
+ export const PermissionsContextVersion = {
12
+ REMOTE_MODE_DEFERRED_ACTION: "0x00",
13
+ LOCAL_MODE_DEFERRED_ACTION: "0x01",
14
+ NON_DEFERRED_ACTION: "0x02",
15
+ } as const;
16
+
17
+ type ContextVersionHex =
18
+ (typeof PermissionsContextVersion)[keyof typeof PermissionsContextVersion];
19
+
20
+ type DecodedPermissionsContext = {
21
+ contextVersion: keyof typeof PermissionsContextVersion;
22
+ } & (
23
+ | {
24
+ contextVersion: "REMOTE_MODE_DEFERRED_ACTION";
25
+ sessionId: Hex;
26
+ signature: Hex;
27
+ deferredAction?: never;
28
+ }
29
+ | {
30
+ contextVersion: "LOCAL_MODE_DEFERRED_ACTION";
31
+ deferredAction: Hex;
32
+ sessionId?: never;
33
+ signature?: never;
34
+ }
35
+ | {
36
+ contextVersion: "NON_DEFERRED_ACTION";
37
+ deferredAction?: never;
38
+ sessionId?: never;
39
+ signature?: never;
40
+ entityId: Hex;
41
+ isGlobalValidation: boolean;
42
+ }
43
+ );
44
+
45
+ export const encodePermissionsContext = (
46
+ context: DecodedPermissionsContext,
47
+ ): Hex => {
48
+ switch (context.contextVersion) {
49
+ case "REMOTE_MODE_DEFERRED_ACTION":
50
+ return concatHex([
51
+ PermissionsContextVersion.REMOTE_MODE_DEFERRED_ACTION,
52
+ context.sessionId,
53
+ context.signature,
54
+ ]);
55
+ case "LOCAL_MODE_DEFERRED_ACTION":
56
+ return concatHex([
57
+ PermissionsContextVersion.LOCAL_MODE_DEFERRED_ACTION,
58
+ context.deferredAction,
59
+ ]);
60
+ case "NON_DEFERRED_ACTION":
61
+ return concatHex([
62
+ PermissionsContextVersion.NON_DEFERRED_ACTION,
63
+ context.isGlobalValidation ? "0x01" : "0x00",
64
+ context.entityId,
65
+ ]);
66
+ default:
67
+ return assertNever(context, "Unexpected context version");
68
+ }
69
+ };
70
+
71
+ export const decodePermissionsContext = (
72
+ input: Hex,
73
+ ): DecodedPermissionsContext => {
74
+ const contextVersion = sliceHex(input, 0, 1) as ContextVersionHex;
75
+ switch (contextVersion) {
76
+ case "0x00": {
77
+ const sessionId = sliceHex(input, 1, SESSION_ID_LENGTH_BYTES + 1);
78
+ const signature = sliceHex(input, SESSION_ID_LENGTH_BYTES + 1);
79
+ return {
80
+ contextVersion: "REMOTE_MODE_DEFERRED_ACTION",
81
+ sessionId,
82
+ signature,
83
+ };
84
+ }
85
+ case "0x01": {
86
+ const deferredAction = sliceHex(input, 1);
87
+ return {
88
+ contextVersion: "LOCAL_MODE_DEFERRED_ACTION",
89
+ deferredAction,
90
+ };
91
+ }
92
+ case "0x02": {
93
+ const isGlobalValidation = sliceHex(input, 1, 2) === "0x01";
94
+ const entityId = sliceHex(input, 2, ENTITY_ID_LENGTH_BYTES + 2);
95
+ return {
96
+ contextVersion: "NON_DEFERRED_ACTION",
97
+ isGlobalValidation,
98
+ entityId,
99
+ };
100
+ }
101
+ default:
102
+ return assertNever(
103
+ contextVersion,
104
+ `Unexpected context version: ${contextVersion}`,
105
+ );
106
+ }
107
+ };
108
+
109
+ export const prefixSignatureKeyType = (
110
+ sig: Hex,
111
+ type: KeySigner["type"],
112
+ ): Hex => {
113
+ switch (type) {
114
+ case "secp256k1":
115
+ return concatHex(["0x00", sig]);
116
+ case "contract":
117
+ return concatHex(["0x01", sig]);
118
+ default:
119
+ return assertNever(type, "Unexpected session key type");
120
+ }
121
+ };
122
+
123
+ export const isGlobalValidation = (
124
+ data: Pick<Static<typeof PermissionsData>, "permissions">,
125
+ ): boolean => {
126
+ return data.permissions.some((p) => p.type === PermissionType.ROOT);
127
+ };
@@ -0,0 +1,28 @@
1
+ import type { SmartAccountSigner } from "@aa-sdk/core";
2
+ import type { Static } from "@sinclair/typebox";
3
+ import type { Address } from "abitype";
4
+ import type { wallet_createAccount } from "../../rpc/request";
5
+ import type { InnerWalletApiClient } from "../../types";
6
+
7
+ export type CreateAccountParams = Omit<
8
+ Extract<
9
+ Static<typeof wallet_createAccount>["Request"]["params"][0],
10
+ { signerAddress: Address }
11
+ >,
12
+ "signerAddress"
13
+ >;
14
+
15
+ export type CreateAccountResult = Static<
16
+ typeof wallet_createAccount
17
+ >["ReturnType"];
18
+
19
+ export async function createAccount(
20
+ client: InnerWalletApiClient,
21
+ signer: SmartAccountSigner,
22
+ params: CreateAccountParams,
23
+ ): Promise<CreateAccountResult> {
24
+ return client.request({
25
+ method: "wallet_createAccount",
26
+ params: [{ signerAddress: await signer.getAddress(), ...params }],
27
+ });
28
+ }
@@ -0,0 +1,29 @@
1
+ import type { Address, JsonRpcAccount } from "viem";
2
+ import type {
3
+ GetCallsStatusParams as IsomorphicGetCallsStatusParams,
4
+ GetCallsStatusResponse as IsomorphicGetCallsStatusResult,
5
+ } from "../../isomorphic/actions/getCallsStatus";
6
+ import type { InnerWalletApiClient } from "../../types";
7
+
8
+ export type GetCallsStatusParams = IsomorphicGetCallsStatusParams;
9
+
10
+ export type GetCallsStatusResult = IsomorphicGetCallsStatusResult;
11
+
12
+ export async function getCallsStatus<
13
+ TAccount extends JsonRpcAccount<Address> | undefined =
14
+ | JsonRpcAccount<Address>
15
+ | undefined,
16
+ >(
17
+ client: InnerWalletApiClient<TAccount>,
18
+ params: GetCallsStatusParams,
19
+ ): Promise<GetCallsStatusResult>;
20
+
21
+ export async function getCallsStatus(
22
+ client: InnerWalletApiClient,
23
+ params: GetCallsStatusParams,
24
+ ): Promise<GetCallsStatusResult> {
25
+ return await client.request({
26
+ method: "wallet_getCallsStatus",
27
+ params: [params],
28
+ });
29
+ }