@lit-protocol/vincent-e2e-test-utils 3.0.1 → 3.0.2-alpha.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 (256) hide show
  1. package/dist/package.json +2 -6
  2. package/dist/src/index.d.ts +3 -2
  3. package/dist/src/index.d.ts.map +1 -1
  4. package/dist/src/index.js +8 -16
  5. package/dist/src/index.js.map +1 -1
  6. package/dist/src/lib/setup/app-registration/areAbilitiesAndPoliciesEqual.d.ts +3 -0
  7. package/dist/src/lib/setup/app-registration/areAbilitiesAndPoliciesEqual.d.ts.map +1 -0
  8. package/dist/src/lib/setup/app-registration/areAbilitiesAndPoliciesEqual.js +32 -0
  9. package/dist/src/lib/setup/app-registration/areAbilitiesAndPoliciesEqual.js.map +1 -0
  10. package/dist/src/lib/setup/app-registration/handleAppRegistration.d.ts +14 -0
  11. package/dist/src/lib/setup/app-registration/handleAppRegistration.d.ts.map +1 -0
  12. package/dist/src/lib/setup/app-registration/handleAppRegistration.js +43 -0
  13. package/dist/src/lib/setup/app-registration/handleAppRegistration.js.map +1 -0
  14. package/dist/src/lib/setup/app-registration/registerNewApp.d.ts +17 -0
  15. package/dist/src/lib/setup/app-registration/registerNewApp.d.ts.map +1 -0
  16. package/dist/src/lib/setup/app-registration/registerNewApp.js +46 -0
  17. package/dist/src/lib/setup/app-registration/registerNewApp.js.map +1 -0
  18. package/dist/src/lib/setup/app-registration/registerNewAppVersion.d.ts +16 -0
  19. package/dist/src/lib/setup/app-registration/registerNewAppVersion.d.ts.map +1 -0
  20. package/dist/src/lib/setup/app-registration/registerNewAppVersion.js +68 -0
  21. package/dist/src/lib/setup/app-registration/registerNewAppVersion.js.map +1 -0
  22. package/dist/src/lib/setup/app-setup.d.ts +19 -0
  23. package/dist/src/lib/setup/app-setup.d.ts.map +1 -0
  24. package/dist/src/lib/setup/app-setup.js +37 -0
  25. package/dist/src/lib/setup/app-setup.js.map +1 -0
  26. package/dist/src/lib/setup/blockchain/installAppUsingUserEoa.d.ts +10 -0
  27. package/dist/src/lib/setup/blockchain/installAppUsingUserEoa.d.ts.map +1 -0
  28. package/dist/src/lib/setup/blockchain/installAppUsingUserEoa.js +17 -0
  29. package/dist/src/lib/setup/blockchain/installAppUsingUserEoa.js.map +1 -0
  30. package/dist/src/lib/setup/blockchain/registerNewAppVersionOnChain.d.ts +12 -0
  31. package/dist/src/lib/setup/blockchain/registerNewAppVersionOnChain.d.ts.map +1 -0
  32. package/dist/src/lib/setup/blockchain/registerNewAppVersionOnChain.js +23 -0
  33. package/dist/src/lib/setup/blockchain/registerNewAppVersionOnChain.js.map +1 -0
  34. package/dist/src/lib/setup/getEnv.d.ts +2 -0
  35. package/dist/src/lib/setup/getEnv.d.ts.map +1 -0
  36. package/dist/src/lib/setup/getEnv.js +16 -0
  37. package/dist/src/lib/setup/getEnv.js.map +1 -0
  38. package/dist/src/lib/setup/index.d.ts +9 -0
  39. package/dist/src/lib/setup/index.d.ts.map +1 -0
  40. package/dist/src/lib/setup/index.js +18 -0
  41. package/dist/src/lib/setup/index.js.map +1 -0
  42. package/dist/src/lib/setup/setupAgentSmartAccount.d.ts +19 -0
  43. package/dist/src/lib/setup/setupAgentSmartAccount.d.ts.map +1 -0
  44. package/dist/src/lib/setup/setupAgentSmartAccount.js +100 -0
  45. package/dist/src/lib/setup/setupAgentSmartAccount.js.map +1 -0
  46. package/dist/src/lib/setup/smart-account/createPermissionApproval.d.ts +11 -0
  47. package/dist/src/lib/setup/smart-account/createPermissionApproval.d.ts.map +1 -0
  48. package/dist/src/lib/setup/smart-account/createPermissionApproval.js +45 -0
  49. package/dist/src/lib/setup/smart-account/createPermissionApproval.js.map +1 -0
  50. package/dist/src/lib/setup/smart-account/deploySmartAccountToChain.d.ts +16 -0
  51. package/dist/src/lib/setup/smart-account/deploySmartAccountToChain.d.ts.map +1 -0
  52. package/dist/src/lib/setup/smart-account/deploySmartAccountToChain.js +128 -0
  53. package/dist/src/lib/setup/smart-account/deploySmartAccountToChain.js.map +1 -0
  54. package/dist/src/lib/setup/smart-account/deriveAgentAddress.d.ts +23 -0
  55. package/dist/src/lib/setup/smart-account/deriveAgentAddress.d.ts.map +1 -0
  56. package/dist/src/lib/setup/smart-account/deriveAgentAddress.js +36 -0
  57. package/dist/src/lib/setup/smart-account/deriveAgentAddress.js.map +1 -0
  58. package/dist/src/lib/setup/smart-account/vincentViemPkpSigner.d.ts +12 -0
  59. package/dist/src/lib/setup/smart-account/vincentViemPkpSigner.d.ts.map +1 -0
  60. package/dist/src/lib/setup/smart-account/vincentViemPkpSigner.js +82 -0
  61. package/dist/src/lib/setup/smart-account/vincentViemPkpSigner.js.map +1 -0
  62. package/dist/src/lib/setup/smart-account/wrapKernelAccountWithUserOpCapture.d.ts +10 -0
  63. package/dist/src/lib/setup/smart-account/wrapKernelAccountWithUserOpCapture.d.ts.map +1 -0
  64. package/dist/src/lib/setup/smart-account/wrapKernelAccountWithUserOpCapture.js +34 -0
  65. package/dist/src/lib/setup/smart-account/wrapKernelAccountWithUserOpCapture.js.map +1 -0
  66. package/dist/src/lib/setup/types.d.ts +92 -0
  67. package/dist/src/lib/setup/types.d.ts.map +1 -0
  68. package/dist/src/lib/{types.js.map → setup/types.js.map} +1 -1
  69. package/dist/src/lib/setup/vincent-api/completeAppInstallationViaVincentApi.d.ts +32 -0
  70. package/dist/src/lib/setup/vincent-api/completeAppInstallationViaVincentApi.d.ts.map +1 -0
  71. package/dist/src/lib/setup/vincent-api/completeAppInstallationViaVincentApi.js +58 -0
  72. package/dist/src/lib/setup/vincent-api/completeAppInstallationViaVincentApi.js.map +1 -0
  73. package/dist/src/lib/setup/vincent-api/generateAppManagerJwt.d.ts +4 -0
  74. package/dist/src/lib/setup/vincent-api/generateAppManagerJwt.d.ts.map +1 -0
  75. package/dist/src/lib/setup/vincent-api/generateAppManagerJwt.js +28 -0
  76. package/dist/src/lib/setup/vincent-api/generateAppManagerJwt.js.map +1 -0
  77. package/dist/src/lib/setup/vincent-api/installAppViaVincentApi.d.ts +31 -0
  78. package/dist/src/lib/setup/vincent-api/installAppViaVincentApi.d.ts.map +1 -0
  79. package/dist/src/lib/setup/vincent-api/installAppViaVincentApi.js +31 -0
  80. package/dist/src/lib/setup/vincent-api/installAppViaVincentApi.js.map +1 -0
  81. package/dist/src/lib/setup/vincent-api/registerAppVersionWithVincentApi.d.ts +9 -0
  82. package/dist/src/lib/setup/vincent-api/registerAppVersionWithVincentApi.d.ts.map +1 -0
  83. package/dist/src/lib/setup/vincent-api/registerAppVersionWithVincentApi.js +27 -0
  84. package/dist/src/lib/setup/vincent-api/registerAppVersionWithVincentApi.js.map +1 -0
  85. package/dist/src/lib/setup/vincent-api/registerAppWithVincentApi.d.ts +8 -0
  86. package/dist/src/lib/setup/vincent-api/registerAppWithVincentApi.d.ts.map +1 -0
  87. package/dist/src/lib/setup/vincent-api/registerAppWithVincentApi.js +30 -0
  88. package/dist/src/lib/setup/vincent-api/registerAppWithVincentApi.js.map +1 -0
  89. package/dist/src/lib/setup/vincent-api/setActiveVersionWithVincentApi.d.ts +7 -0
  90. package/dist/src/lib/setup/vincent-api/setActiveVersionWithVincentApi.d.ts.map +1 -0
  91. package/dist/src/lib/setup/vincent-api/setActiveVersionWithVincentApi.js +25 -0
  92. package/dist/src/lib/setup/vincent-api/setActiveVersionWithVincentApi.js.map +1 -0
  93. package/dist/src/lib/setup/wallets/ensureWalletHasTokens.d.ts +14 -0
  94. package/dist/src/lib/setup/wallets/ensureWalletHasTokens.d.ts.map +1 -0
  95. package/dist/src/lib/setup/wallets/ensureWalletHasTokens.js +27 -0
  96. package/dist/src/lib/setup/wallets/ensureWalletHasTokens.js.map +1 -0
  97. package/dist/src/lib/setup/wallets/ensureWalletHasUnexpiredCapacityCredit.d.ts +15 -0
  98. package/dist/src/lib/setup/wallets/ensureWalletHasUnexpiredCapacityCredit.d.ts.map +1 -0
  99. package/dist/src/lib/setup/wallets/ensureWalletHasUnexpiredCapacityCredit.js +63 -0
  100. package/dist/src/lib/setup/wallets/ensureWalletHasUnexpiredCapacityCredit.js.map +1 -0
  101. package/dist/src/lib/setup/wallets/setupWallets.d.ts +48 -0
  102. package/dist/src/lib/setup/wallets/setupWallets.d.ts.map +1 -0
  103. package/dist/src/lib/setup/wallets/setupWallets.js +159 -0
  104. package/dist/src/lib/setup/wallets/setupWallets.js.map +1 -0
  105. package/dist/src/lib/setupVincentDevelopmentEnv.d.ts +3 -0
  106. package/dist/src/lib/setupVincentDevelopmentEnv.d.ts.map +1 -0
  107. package/dist/src/lib/setupVincentDevelopmentEnv.js +64 -0
  108. package/dist/src/lib/setupVincentDevelopmentEnv.js.map +1 -0
  109. package/package.json +3 -7
  110. package/dist/src/lib/appManager/ensure-funded.d.ts +0 -2
  111. package/dist/src/lib/appManager/ensure-funded.d.ts.map +0 -1
  112. package/dist/src/lib/appManager/ensure-funded.js +0 -11
  113. package/dist/src/lib/appManager/ensure-funded.js.map +0 -1
  114. package/dist/src/lib/appManager/index.d.ts +0 -5
  115. package/dist/src/lib/appManager/index.d.ts.map +0 -1
  116. package/dist/src/lib/appManager/index.js +0 -12
  117. package/dist/src/lib/appManager/index.js.map +0 -1
  118. package/dist/src/lib/appManager/register-new-app-version.d.ts +0 -28
  119. package/dist/src/lib/appManager/register-new-app-version.d.ts.map +0 -1
  120. package/dist/src/lib/appManager/register-new-app-version.js +0 -82
  121. package/dist/src/lib/appManager/register-new-app-version.js.map +0 -1
  122. package/dist/src/lib/appManager/register-new-app.d.ts +0 -13
  123. package/dist/src/lib/appManager/register-new-app.d.ts.map +0 -1
  124. package/dist/src/lib/appManager/register-new-app.js +0 -25
  125. package/dist/src/lib/appManager/register-new-app.js.map +0 -1
  126. package/dist/src/lib/appManager/remove-delegatee-from-app.d.ts +0 -7
  127. package/dist/src/lib/appManager/remove-delegatee-from-app.d.ts.map +0 -1
  128. package/dist/src/lib/appManager/remove-delegatee-from-app.js +0 -26
  129. package/dist/src/lib/appManager/remove-delegatee-from-app.js.map +0 -1
  130. package/dist/src/lib/chain.d.ts +0 -13
  131. package/dist/src/lib/chain.d.ts.map +0 -1
  132. package/dist/src/lib/chain.js +0 -30
  133. package/dist/src/lib/chain.js.map +0 -1
  134. package/dist/src/lib/create-random-vincent-wallets.d.ts +0 -7
  135. package/dist/src/lib/create-random-vincent-wallets.d.ts.map +0 -1
  136. package/dist/src/lib/create-random-vincent-wallets.js +0 -12
  137. package/dist/src/lib/create-random-vincent-wallets.js.map +0 -1
  138. package/dist/src/lib/delegatee/ensure-funded.d.ts +0 -2
  139. package/dist/src/lib/delegatee/ensure-funded.d.ts.map +0 -1
  140. package/dist/src/lib/delegatee/ensure-funded.js +0 -11
  141. package/dist/src/lib/delegatee/ensure-funded.js.map +0 -1
  142. package/dist/src/lib/delegatee/get-app-info.d.ts +0 -5
  143. package/dist/src/lib/delegatee/get-app-info.d.ts.map +0 -1
  144. package/dist/src/lib/delegatee/get-app-info.js +0 -19
  145. package/dist/src/lib/delegatee/get-app-info.js.map +0 -1
  146. package/dist/src/lib/delegatee/index.d.ts +0 -3
  147. package/dist/src/lib/delegatee/index.d.ts.map +0 -1
  148. package/dist/src/lib/delegatee/index.js +0 -8
  149. package/dist/src/lib/delegatee/index.js.map +0 -1
  150. package/dist/src/lib/delegator/add-permission-for-abilities.d.ts +0 -4
  151. package/dist/src/lib/delegator/add-permission-for-abilities.d.ts.map +0 -1
  152. package/dist/src/lib/delegator/add-permission-for-abilities.js +0 -21
  153. package/dist/src/lib/delegator/add-permission-for-abilities.js.map +0 -1
  154. package/dist/src/lib/delegator/agent-pkp.d.ts +0 -20
  155. package/dist/src/lib/delegator/agent-pkp.d.ts.map +0 -1
  156. package/dist/src/lib/delegator/agent-pkp.js +0 -96
  157. package/dist/src/lib/delegator/agent-pkp.js.map +0 -1
  158. package/dist/src/lib/delegator/get-platform-user-pkp-wallet.d.ts +0 -8
  159. package/dist/src/lib/delegator/get-platform-user-pkp-wallet.d.ts.map +0 -1
  160. package/dist/src/lib/delegator/get-platform-user-pkp-wallet.js +0 -77
  161. package/dist/src/lib/delegator/get-platform-user-pkp-wallet.js.map +0 -1
  162. package/dist/src/lib/delegator/index.d.ts +0 -7
  163. package/dist/src/lib/delegator/index.d.ts.map +0 -1
  164. package/dist/src/lib/delegator/index.js +0 -20
  165. package/dist/src/lib/delegator/index.js.map +0 -1
  166. package/dist/src/lib/delegator/permit-vincent-app-version.d.ts +0 -19
  167. package/dist/src/lib/delegator/permit-vincent-app-version.d.ts.map +0 -1
  168. package/dist/src/lib/delegator/permit-vincent-app-version.js +0 -45
  169. package/dist/src/lib/delegator/permit-vincent-app-version.js.map +0 -1
  170. package/dist/src/lib/delegator/platform-user-pkp.d.ts +0 -10
  171. package/dist/src/lib/delegator/platform-user-pkp.d.ts.map +0 -1
  172. package/dist/src/lib/delegator/platform-user-pkp.js +0 -48
  173. package/dist/src/lib/delegator/platform-user-pkp.js.map +0 -1
  174. package/dist/src/lib/ensure-capacity-credit.d.ts +0 -4
  175. package/dist/src/lib/ensure-capacity-credit.d.ts.map +0 -1
  176. package/dist/src/lib/ensure-capacity-credit.js +0 -57
  177. package/dist/src/lib/ensure-capacity-credit.js.map +0 -1
  178. package/dist/src/lib/env.d.ts +0 -30
  179. package/dist/src/lib/env.d.ts.map +0 -1
  180. package/dist/src/lib/env.js +0 -58
  181. package/dist/src/lib/env.js.map +0 -1
  182. package/dist/src/lib/environment/crossmint.d.ts +0 -3
  183. package/dist/src/lib/environment/crossmint.d.ts.map +0 -1
  184. package/dist/src/lib/environment/crossmint.js +0 -23
  185. package/dist/src/lib/environment/crossmint.js.map +0 -1
  186. package/dist/src/lib/environment/safe.d.ts +0 -567
  187. package/dist/src/lib/environment/safe.d.ts.map +0 -1
  188. package/dist/src/lib/environment/safe.js +0 -41
  189. package/dist/src/lib/environment/safe.js.map +0 -1
  190. package/dist/src/lib/environment/zerodev.d.ts +0 -49
  191. package/dist/src/lib/environment/zerodev.d.ts.map +0 -1
  192. package/dist/src/lib/environment/zerodev.js +0 -32
  193. package/dist/src/lib/environment/zerodev.js.map +0 -1
  194. package/dist/src/lib/funder/check-funder-balance.d.ts +0 -3
  195. package/dist/src/lib/funder/check-funder-balance.d.ts.map +0 -1
  196. package/dist/src/lib/funder/check-funder-balance.js +0 -19
  197. package/dist/src/lib/funder/check-funder-balance.js.map +0 -1
  198. package/dist/src/lib/funder/ensure-wallet-has-test-tokens.d.ts +0 -5
  199. package/dist/src/lib/funder/ensure-wallet-has-test-tokens.d.ts.map +0 -1
  200. package/dist/src/lib/funder/ensure-wallet-has-test-tokens.js +0 -35
  201. package/dist/src/lib/funder/ensure-wallet-has-test-tokens.js.map +0 -1
  202. package/dist/src/lib/funder/index.d.ts +0 -5
  203. package/dist/src/lib/funder/index.d.ts.map +0 -1
  204. package/dist/src/lib/funder/index.js +0 -10
  205. package/dist/src/lib/funder/index.js.map +0 -1
  206. package/dist/src/lib/index.d.ts +0 -18
  207. package/dist/src/lib/index.d.ts.map +0 -1
  208. package/dist/src/lib/index.js +0 -31
  209. package/dist/src/lib/index.js.map +0 -1
  210. package/dist/src/lib/litContractsClient/LitContractsInstance.d.ts +0 -14
  211. package/dist/src/lib/litContractsClient/LitContractsInstance.d.ts.map +0 -1
  212. package/dist/src/lib/litContractsClient/LitContractsInstance.js +0 -48
  213. package/dist/src/lib/litContractsClient/LitContractsInstance.js.map +0 -1
  214. package/dist/src/lib/litContractsClient/get-lit-contract-client.d.ts +0 -7
  215. package/dist/src/lib/litContractsClient/get-lit-contract-client.d.ts.map +0 -1
  216. package/dist/src/lib/litContractsClient/get-lit-contract-client.js +0 -19
  217. package/dist/src/lib/litContractsClient/get-lit-contract-client.js.map +0 -1
  218. package/dist/src/lib/litContractsClient/index.d.ts +0 -3
  219. package/dist/src/lib/litContractsClient/index.d.ts.map +0 -1
  220. package/dist/src/lib/litContractsClient/index.js +0 -8
  221. package/dist/src/lib/litContractsClient/index.js.map +0 -1
  222. package/dist/src/lib/mint-new-pkp.d.ts +0 -16
  223. package/dist/src/lib/mint-new-pkp.d.ts.map +0 -1
  224. package/dist/src/lib/mint-new-pkp.js +0 -40
  225. package/dist/src/lib/mint-new-pkp.js.map +0 -1
  226. package/dist/src/lib/setup-vincent-development-environment.d.ts +0 -81
  227. package/dist/src/lib/setup-vincent-development-environment.d.ts.map +0 -1
  228. package/dist/src/lib/setup-vincent-development-environment.js +0 -185
  229. package/dist/src/lib/setup-vincent-development-environment.js.map +0 -1
  230. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.d.ts +0 -3
  231. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.d.ts.map +0 -1
  232. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.js +0 -96
  233. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.js.map +0 -1
  234. package/dist/src/lib/smartAccount/index.d.ts +0 -5
  235. package/dist/src/lib/smartAccount/index.d.ts.map +0 -1
  236. package/dist/src/lib/smartAccount/index.js +0 -10
  237. package/dist/src/lib/smartAccount/index.js.map +0 -1
  238. package/dist/src/lib/smartAccount/safe/setup-safe-account.d.ts +0 -15
  239. package/dist/src/lib/smartAccount/safe/setup-safe-account.d.ts.map +0 -1
  240. package/dist/src/lib/smartAccount/safe/setup-safe-account.js +0 -92
  241. package/dist/src/lib/smartAccount/safe/setup-safe-account.js.map +0 -1
  242. package/dist/src/lib/smartAccount/types.d.ts +0 -30
  243. package/dist/src/lib/smartAccount/types.d.ts.map +0 -1
  244. package/dist/src/lib/smartAccount/types.js.map +0 -1
  245. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.d.ts +0 -3
  246. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.d.ts.map +0 -1
  247. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.js +0 -24
  248. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.js.map +0 -1
  249. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.d.ts +0 -18
  250. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.d.ts.map +0 -1
  251. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.js +0 -112
  252. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.js.map +0 -1
  253. package/dist/src/lib/types.d.ts +0 -17
  254. package/dist/src/lib/types.d.ts.map +0 -1
  255. package/dist/src/lib/types.js +0 -3
  256. /package/dist/src/lib/{smartAccount → setup}/types.js +0 -0
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPimlicoTransport = exports.getPimlicoRpc = exports.getSafeTransport = exports.getSafeRpc = exports.entryPoint = exports.safeVersion = void 0;
4
- exports.createPimlicoPaymaster = createPimlicoPaymaster;
5
- const pimlico_1 = require("permissionless/clients/pimlico");
6
- const viem_1 = require("viem");
7
- const account_abstraction_1 = require("viem/account-abstraction");
8
- function getSafeRpcUrl() {
9
- const SAFE_RPC_URL = process.env.SAFE_RPC_URL;
10
- if (!SAFE_RPC_URL) {
11
- throw new Error('Missing SAFE_RPC_URL env variable for chain operations');
12
- }
13
- return SAFE_RPC_URL;
14
- }
15
- function getPimlicoRpcUrl() {
16
- const PIMLICO_RPC_URL = process.env.PIMLICO_RPC_URL;
17
- if (!PIMLICO_RPC_URL) {
18
- throw new Error('Missing PIMLICO_RPC_URL env variable for bundler operations');
19
- }
20
- return PIMLICO_RPC_URL;
21
- }
22
- exports.safeVersion = '1.4.1';
23
- exports.entryPoint = {
24
- address: account_abstraction_1.entryPoint07Address,
25
- version: '0.7',
26
- };
27
- const getSafeRpc = () => getSafeRpcUrl();
28
- exports.getSafeRpc = getSafeRpc;
29
- const getSafeTransport = () => (0, viem_1.http)(getSafeRpcUrl());
30
- exports.getSafeTransport = getSafeTransport;
31
- const getPimlicoRpc = () => getPimlicoRpcUrl();
32
- exports.getPimlicoRpc = getPimlicoRpc;
33
- const getPimlicoTransport = () => (0, viem_1.http)(getPimlicoRpcUrl());
34
- exports.getPimlicoTransport = getPimlicoTransport;
35
- function createPimlicoPaymaster() {
36
- return (0, pimlico_1.createPimlicoClient)({
37
- entryPoint: exports.entryPoint,
38
- transport: (0, exports.getPimlicoTransport)(),
39
- });
40
- }
41
- //# sourceMappingURL=safe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe.js","sourceRoot":"","sources":["../../../../src/lib/environment/safe.ts"],"names":[],"mappings":";;;AA+BA,wDAKC;AApCD,4DAAqE;AACrE,+BAA4B;AAC5B,kEAA+D;AAE/D,SAAS,aAAa;IACpB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAkC,CAAC;IACpE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,gBAAgB;IACvB,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAqC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AAEY,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,yCAAmB;IAC5B,OAAO,EAAE,KAAK;CACN,CAAC;AAEJ,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC;AAAnC,QAAA,UAAU,cAAyB;AACzC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,aAAa,EAAE,CAAC,CAAC;AAA/C,QAAA,gBAAgB,oBAA+B;AACrD,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAAzC,QAAA,aAAa,iBAA4B;AAC/C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,gBAAgB,EAAE,CAAC,CAAC;AAArD,QAAA,mBAAmB,uBAAkC;AAElE,SAAgB,sBAAsB;IACpC,OAAO,IAAA,6BAAmB,EAAC;QACzB,UAAU,EAAV,kBAAU;QACV,SAAS,EAAE,IAAA,2BAAmB,GAAE;KACjC,CAAC,CAAC;AACL,CAAC"}
@@ -1,49 +0,0 @@
1
- import type { Chain } from 'viem';
2
- export declare const kernelVersion: import("@zerodev/sdk/types").KERNEL_V3_VERSION_TYPE;
3
- export declare const entryPoint: import("@zerodev/sdk/types").EntryPointType<"0.7">;
4
- export declare const getZerodevRpc: () => string;
5
- export declare const getZerodevTransport: () => import("viem").HttpTransport<undefined, false>;
6
- /**
7
- * Creates a ZeroDev paymaster client for the specified chain.
8
- * This should be called at runtime with the actual chain object.
9
- */
10
- export declare function createZeroDevPaymaster(chain: Chain): {
11
- account: import("viem/account-abstraction").SmartAccount | undefined;
12
- batch?: {
13
- multicall?: boolean | import("viem").Prettify<import("viem").MulticallBatchOptions> | undefined;
14
- } | undefined;
15
- cacheTime: number;
16
- ccipRead?: false | {
17
- request?: (parameters: import("viem").CcipRequestParameters) => Promise<import("node_modules/viem/_types/utils/ccip").CcipRequestReturnType>;
18
- } | undefined;
19
- chain: Chain | undefined;
20
- experimental_blockTag?: import("viem").BlockTag | undefined;
21
- key: string;
22
- name: string;
23
- pollingInterval: number;
24
- request: import("viem").EIP1193RequestFn<import("@zerodev/sdk").ZeroDevPaymasterRpcSchema<"0.7">>;
25
- transport: import("viem").TransportConfig<string, import("viem").EIP1193RequestFn> & Record<string, any>;
26
- type: string;
27
- uid: string;
28
- getPaymasterData: (parameters: import("viem/account-abstraction").GetPaymasterDataParameters) => Promise<import("viem/account-abstraction").GetPaymasterDataReturnType>;
29
- getPaymasterStubData: (parameters: import("viem/account-abstraction").GetPaymasterStubDataParameters) => Promise<import("viem/account-abstraction").GetPaymasterStubDataReturnType>;
30
- sponsorUserOperation: (args: import("@zerodev/sdk").SponsorUserOperationParameters) => Promise<import("@zerodev/sdk").SponsorUserOperationReturnType>;
31
- estimateGasInERC20: (args: import("@zerodev/sdk/actions").EstimateGasInERC20Parameters) => Promise<import("@zerodev/sdk/actions").EstimateGasInERC20ReturnType>;
32
- extend: <const client extends {
33
- [x: string]: unknown;
34
- account?: undefined;
35
- batch?: undefined;
36
- cacheTime?: undefined;
37
- ccipRead?: undefined;
38
- chain?: undefined;
39
- experimental_blockTag?: undefined;
40
- key?: undefined;
41
- name?: undefined;
42
- pollingInterval?: undefined;
43
- request?: undefined;
44
- transport?: undefined;
45
- type?: undefined;
46
- uid?: undefined;
47
- } & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, Chain | undefined, import("viem/account-abstraction").SmartAccount | undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<Chain | undefined, import("viem/account-abstraction").SmartAccount | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, Chain | undefined, import("viem/account-abstraction").SmartAccount | undefined, import("@zerodev/sdk").ZeroDevPaymasterRpcSchema<"0.7">, import("viem/account-abstraction").PaymasterActions & import("@zerodev/sdk").ZeroDevPaymasterClientActions>) => client) => import("viem").Client<import("viem").Transport, Chain | undefined, import("viem/account-abstraction").SmartAccount | undefined, import("@zerodev/sdk").ZeroDevPaymasterRpcSchema<"0.7">, { [K in keyof client]: client[K]; } & import("viem/account-abstraction").PaymasterActions & import("@zerodev/sdk").ZeroDevPaymasterClientActions>;
48
- };
49
- //# sourceMappingURL=zerodev.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zerodev.d.ts","sourceRoot":"","sources":["../../../../src/lib/environment/zerodev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAclC,eAAO,MAAM,aAAa,qDAAc,CAAC;AACzC,eAAO,MAAM,UAAU,oDAAuB,CAAC;AAG/C,eAAO,MAAM,aAAa,cAA2B,CAAC;AACtD,eAAO,MAAM,mBAAmB,sDAAiC,CAAC;AAElE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKlD"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getZerodevTransport = exports.getZerodevRpc = exports.entryPoint = exports.kernelVersion = void 0;
4
- exports.createZeroDevPaymaster = createZeroDevPaymaster;
5
- const sdk_1 = require("@zerodev/sdk");
6
- const constants_1 = require("@zerodev/sdk/constants");
7
- const viem_1 = require("viem");
8
- function getZerodevRpcUrl() {
9
- const ZERODEV_RPC_URL = process.env.ZERODEV_RPC_URL;
10
- if (!ZERODEV_RPC_URL) {
11
- throw new Error('Missing ZERODEV_RPC_URL env variable');
12
- }
13
- return ZERODEV_RPC_URL;
14
- }
15
- exports.kernelVersion = constants_1.KERNEL_V3_3;
16
- exports.entryPoint = (0, constants_1.getEntryPoint)('0.7');
17
- // Lazy getters that only validate when accessed
18
- const getZerodevRpc = () => getZerodevRpcUrl();
19
- exports.getZerodevRpc = getZerodevRpc;
20
- const getZerodevTransport = () => (0, viem_1.http)(getZerodevRpcUrl());
21
- exports.getZerodevTransport = getZerodevTransport;
22
- /**
23
- * Creates a ZeroDev paymaster client for the specified chain.
24
- * This should be called at runtime with the actual chain object.
25
- */
26
- function createZeroDevPaymaster(chain) {
27
- return (0, sdk_1.createZeroDevPaymasterClient)({
28
- chain,
29
- transport: (0, exports.getZerodevTransport)(),
30
- });
31
- }
32
- //# sourceMappingURL=zerodev.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zerodev.js","sourceRoot":"","sources":["../../../../src/lib/environment/zerodev.ts"],"names":[],"mappings":";;;AAyBA,wDAKC;AA5BD,sCAA4D;AAC5D,sDAAoE;AACpE,+BAA4B;AAE5B,SAAS,gBAAgB;IACvB,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAqC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AAEY,QAAA,aAAa,GAAG,uBAAW,CAAC;AAC5B,QAAA,UAAU,GAAG,IAAA,yBAAa,EAAC,KAAK,CAAC,CAAC;AAE/C,gDAAgD;AACzC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC;AAAzC,QAAA,aAAa,iBAA4B;AAC/C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,WAAI,EAAC,gBAAgB,EAAE,CAAC,CAAC;AAArD,QAAA,mBAAmB,uBAAkC;AAElE;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,KAAY;IACjD,OAAO,IAAA,kCAA4B,EAAC;QAClC,KAAK;QACL,SAAS,EAAE,IAAA,2BAAmB,GAAE;KACjC,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- import { ethers } from 'ethers';
2
- export declare const checkFunderBalance: () => Promise<ethers.BigNumber>;
3
- //# sourceMappingURL=check-funder-balance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-funder-balance.d.ts","sourceRoot":"","sources":["../../../../src/lib/funder/check-funder-balance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,eAAO,MAAM,kBAAkB,iCAe9B,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkFunderBalance = void 0;
4
- const ethers_1 = require("ethers");
5
- const chain_1 = require("../chain");
6
- const index_1 = require("./index");
7
- const checkFunderBalance = async () => {
8
- const { wallets: { funder }, } = await (0, chain_1.getChainHelpers)();
9
- const funderBalance = await funder.getBalance();
10
- console.log('Funder Balance:', ethers_1.ethers.utils.formatEther(funderBalance));
11
- if (funderBalance.lt(index_1.MINIMUM_FUNDER_BALANCE)) {
12
- const errorMessage = `❌ Insufficient funder balance. Current balance is below the required ${ethers_1.ethers.utils.formatEther(index_1.MINIMUM_FUNDER_BALANCE)} threshold. Please top up your funder wallet at: https://chronicle-yellowstone-faucet.getlit.dev/`;
13
- console.log(errorMessage);
14
- throw new Error(errorMessage);
15
- }
16
- return funderBalance;
17
- };
18
- exports.checkFunderBalance = checkFunderBalance;
19
- //# sourceMappingURL=check-funder-balance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-funder-balance.js","sourceRoot":"","sources":["../../../../src/lib/funder/check-funder-balance.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,oCAA2C;AAC3C,mCAAiD;AAE1C,MAAM,kBAAkB,GAAG,KAAK,IAAI,EAAE;IAC3C,MAAM,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,GAAG,MAAM,IAAA,uBAAe,GAAE,CAAC;IAE5B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IAExE,IAAI,aAAa,CAAC,EAAE,CAAC,8BAAsB,CAAC,EAAE,CAAC;QAC7C,MAAM,YAAY,GAAG,wEAAwE,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,8BAAsB,CAAC,mGAAmG,CAAC;QACjP,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAfW,QAAA,kBAAkB,sBAe7B"}
@@ -1,5 +0,0 @@
1
- export declare const ensureWalletHasTestTokens: ({ address, minAmountEther, }: {
2
- address: string;
3
- minAmountEther?: string;
4
- }) => Promise<void>;
5
- //# sourceMappingURL=ensure-wallet-has-test-tokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ensure-wallet-has-test-tokens.d.ts","sourceRoot":"","sources":["../../../../src/lib/funder/ensure-wallet-has-test-tokens.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,yBAAyB,GAAU,8BAG7C;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,kBAmCA,CAAC"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureWalletHasTestTokens = void 0;
4
- const ethers_1 = require("ethers");
5
- const chain_1 = require("../chain");
6
- const FUND_AMOUNT = ethers_1.ethers.utils.parseEther('0.01');
7
- const MIN_AMOUNT = ethers_1.ethers.utils.parseEther('0.005');
8
- // Note that _outside of this test framework_, the agent wallet owner will have funded their own wallet / agent wallets with test tokens,
9
- // but because we create the agent wallet owner, its agent PKP, and the appManager as part of this e2e test, this code is responsible for funding them with test tokens.
10
- const ensureWalletHasTestTokens = async ({ address, minAmountEther, }) => {
11
- const minAmount = minAmountEther ? ethers_1.ethers.utils.parseEther(minAmountEther) : MIN_AMOUNT;
12
- const { wallets: { funder }, } = await (0, chain_1.getChainHelpers)();
13
- const walletBalance = await funder.provider.getBalance(address);
14
- const fundAmount = minAmount.gt(FUND_AMOUNT) ? minAmount.sub(walletBalance) : FUND_AMOUNT;
15
- if (walletBalance.gte(minAmount)) {
16
- console.log(`ℹ️ ${address} has ${ethers_1.ethers.utils.formatEther(walletBalance)} Lit test tokens`);
17
- return;
18
- }
19
- else {
20
- console.log(`ℹ️ ${address} has less than ${ethers_1.ethers.utils.formatEther(minAmount)}`);
21
- console.log(`ℹ️ Minimum of ${ethers_1.ethers.utils.formatEther(minAmount)} Lit test tokens are required`);
22
- console.log(`ℹ️ Funding ${address} with ${ethers_1.ethers.utils.formatEther(fundAmount)} Lit test tokens from funder account: ${funder.address}...`);
23
- const tx = await funder.sendTransaction({
24
- to: address,
25
- value: fundAmount,
26
- });
27
- const txReceipt = await tx.wait();
28
- if (txReceipt.status !== 1) {
29
- throw new Error(`Transaction failed. Tx hash: ${txReceipt.transactionHash}`);
30
- }
31
- console.log(`ℹ️ Funded ${address} with ${ethers_1.ethers.utils.formatEther(fundAmount)} Lit test tokens\nTx hash: ${txReceipt.transactionHash}`);
32
- }
33
- };
34
- exports.ensureWalletHasTestTokens = ensureWalletHasTestTokens;
35
- //# sourceMappingURL=ensure-wallet-has-test-tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ensure-wallet-has-test-tokens.js","sourceRoot":"","sources":["../../../../src/lib/funder/ensure-wallet-has-test-tokens.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,oCAA2C;AAE3C,MAAM,WAAW,GAAG,eAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACpD,MAAM,UAAU,GAAG,eAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAEpD,yIAAyI;AACzI,wKAAwK;AACjK,MAAM,yBAAyB,GAAG,KAAK,EAAE,EAC9C,OAAO,EACP,cAAc,GAIf,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,eAAM,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACxF,MAAM,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,GAAG,MAAM,IAAA,uBAAe,GAAE,CAAC;IAE5B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IAE1F,IAAI,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,QAAQ,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC7F,OAAO;IACT,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,kBAAkB,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACnF,OAAO,CAAC,GAAG,CACT,kBAAkB,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,+BAA+B,CACrF,CAAC;QACF,OAAO,CAAC,GAAG,CACT,eAAe,OAAO,SAAS,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,yCAAyC,MAAM,CAAC,OAAO,KAAK,CAChI,CAAC;QAEF,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC;YACtC,EAAE,EAAE,OAAO;YACX,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QAClC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,gCAAgC,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;QAC/E,CAAC;QAED,OAAO,CAAC,GAAG,CACT,cAAc,OAAO,SAAS,eAAM,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,8BAA8B,SAAS,CAAC,eAAe,EAAE,CAC5H,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAzCW,QAAA,yBAAyB,6BAyCpC"}
@@ -1,5 +0,0 @@
1
- import { ethers } from 'ethers';
2
- export { checkFunderBalance } from './check-funder-balance';
3
- export { ensureWalletHasTestTokens } from './ensure-wallet-has-test-tokens';
4
- export declare const MINIMUM_FUNDER_BALANCE: ethers.BigNumber;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/funder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,eAAO,MAAM,sBAAsB,kBAAkC,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MINIMUM_FUNDER_BALANCE = exports.ensureWalletHasTestTokens = exports.checkFunderBalance = void 0;
4
- const ethers_1 = require("ethers");
5
- var check_funder_balance_1 = require("./check-funder-balance");
6
- Object.defineProperty(exports, "checkFunderBalance", { enumerable: true, get: function () { return check_funder_balance_1.checkFunderBalance; } });
7
- var ensure_wallet_has_test_tokens_1 = require("./ensure-wallet-has-test-tokens");
8
- Object.defineProperty(exports, "ensureWalletHasTestTokens", { enumerable: true, get: function () { return ensure_wallet_has_test_tokens_1.ensureWalletHasTestTokens; } });
9
- exports.MINIMUM_FUNDER_BALANCE = ethers_1.ethers.utils.parseEther('0.13');
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/funder/index.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAC3B,iFAA4E;AAAnE,0IAAA,yBAAyB,OAAA;AAErB,QAAA,sBAAsB,GAAG,eAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import * as delegator from './delegator';
2
- export { delegator };
3
- import * as delegatee from './delegatee';
4
- export { delegatee };
5
- import * as funder from './funder';
6
- export { funder };
7
- import * as chain from './chain';
8
- export { chain };
9
- import * as appManager from './appManager';
10
- export { appManager };
11
- export { mintNewPkp, type PkpInfo } from './mint-new-pkp';
12
- export { ensureUnexpiredCapacityToken } from './ensure-capacity-credit';
13
- export { getEnv } from './env';
14
- export { getChainHelpers } from './chain';
15
- export { createRandomVincentWallets } from './create-random-vincent-wallets';
16
- export { setupVincentDevelopmentEnvironment, type VincentDevEnvironment, } from './setup-vincent-development-environment';
17
- export { setupZerodevAccount, setupCrossmintAccount, setupSafeAccount, type SmartAccountInfo, type ZerodevSmartAccountInfo, type CrossmintSmartAccountInfo, type SafeSmartAccountInfo, } from './smartAccount';
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EACL,kCAAkC,EAClC,KAAK,qBAAqB,GAC3B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,GAC1B,MAAM,gBAAgB,CAAC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupSafeAccount = exports.setupCrossmintAccount = exports.setupZerodevAccount = exports.setupVincentDevelopmentEnvironment = exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
4
- const tslib_1 = require("tslib");
5
- const delegator = tslib_1.__importStar(require("./delegator"));
6
- exports.delegator = delegator;
7
- const delegatee = tslib_1.__importStar(require("./delegatee"));
8
- exports.delegatee = delegatee;
9
- const funder = tslib_1.__importStar(require("./funder"));
10
- exports.funder = funder;
11
- const chain = tslib_1.__importStar(require("./chain"));
12
- exports.chain = chain;
13
- const appManager = tslib_1.__importStar(require("./appManager"));
14
- exports.appManager = appManager;
15
- var mint_new_pkp_1 = require("./mint-new-pkp");
16
- Object.defineProperty(exports, "mintNewPkp", { enumerable: true, get: function () { return mint_new_pkp_1.mintNewPkp; } });
17
- var ensure_capacity_credit_1 = require("./ensure-capacity-credit");
18
- Object.defineProperty(exports, "ensureUnexpiredCapacityToken", { enumerable: true, get: function () { return ensure_capacity_credit_1.ensureUnexpiredCapacityToken; } });
19
- var env_1 = require("./env");
20
- Object.defineProperty(exports, "getEnv", { enumerable: true, get: function () { return env_1.getEnv; } });
21
- var chain_1 = require("./chain");
22
- Object.defineProperty(exports, "getChainHelpers", { enumerable: true, get: function () { return chain_1.getChainHelpers; } });
23
- var create_random_vincent_wallets_1 = require("./create-random-vincent-wallets");
24
- Object.defineProperty(exports, "createRandomVincentWallets", { enumerable: true, get: function () { return create_random_vincent_wallets_1.createRandomVincentWallets; } });
25
- var setup_vincent_development_environment_1 = require("./setup-vincent-development-environment");
26
- Object.defineProperty(exports, "setupVincentDevelopmentEnvironment", { enumerable: true, get: function () { return setup_vincent_development_environment_1.setupVincentDevelopmentEnvironment; } });
27
- var smartAccount_1 = require("./smartAccount");
28
- Object.defineProperty(exports, "setupZerodevAccount", { enumerable: true, get: function () { return smartAccount_1.setupZerodevAccount; } });
29
- Object.defineProperty(exports, "setupCrossmintAccount", { enumerable: true, get: function () { return smartAccount_1.setupCrossmintAccount; } });
30
- Object.defineProperty(exports, "setupSafeAccount", { enumerable: true, get: function () { return smartAccount_1.setupSafeAccount; } });
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAyC;AAChC,8BAAS;AAElB,+DAAyC;AAChC,8BAAS;AAElB,yDAAmC;AAC1B,wBAAM;AAEf,uDAAiC;AACxB,sBAAK;AAEd,iEAA2C;AAClC,gCAAU;AAEnB,+CAA0D;AAAjD,0GAAA,UAAU,OAAA;AACnB,mEAAwE;AAA/D,sIAAA,4BAA4B,OAAA;AACrC,6BAA+B;AAAtB,6FAAA,MAAM,OAAA;AACf,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AACxB,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,iGAGiD;AAF/C,2JAAA,kCAAkC,OAAA;AAIpC,+CAQwB;AAPtB,mHAAA,mBAAmB,OAAA;AACnB,qHAAA,qBAAqB,OAAA;AACrB,gHAAA,gBAAgB,OAAA"}
@@ -1,14 +0,0 @@
1
- import type { ethers } from 'ethers';
2
- import type { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
3
- import { LitContracts } from '@lit-protocol/contracts-sdk';
4
- export declare class LitContractsInstance {
5
- private readonly contractsInstance;
6
- private isConnected;
7
- private connectHandle;
8
- constructor({ wallet }: {
9
- wallet: ethers.Wallet | PKPEthersWallet;
10
- });
11
- connect(): Promise<boolean>;
12
- get litContracts(): LitContracts;
13
- }
14
- //# sourceMappingURL=LitContractsInstance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LitContractsInstance.d.ts","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/LitContractsInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAe;IAEjD,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO,CAAC,aAAa,CAAiC;gBAE1C,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,eAAe,CAAA;KAAE;IAS7D,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IA4BjC,IAAI,YAAY,IAAI,YAAY,CAE/B;CACF"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LitContractsInstance = void 0;
4
- const contracts_sdk_1 = require("@lit-protocol/contracts-sdk");
5
- class LitContractsInstance {
6
- contractsInstance;
7
- isConnected = false;
8
- connectHandle = null;
9
- constructor({ wallet }) {
10
- this.contractsInstance = new contracts_sdk_1.LitContracts({
11
- debug: true,
12
- network: 'datil',
13
- signer: wallet,
14
- provider: wallet.provider,
15
- });
16
- }
17
- async connect() {
18
- if (!this.isConnected) {
19
- // Coalesce concurrent calls
20
- if (this.connectHandle) {
21
- return this.connectHandle;
22
- }
23
- // Stash a handle so concurrent calls to connect are coaelesced into 1
24
- this.connectHandle = this.contractsInstance.connect().then(() => true);
25
- try {
26
- // Don't return until we know the result of pending connect attempt
27
- await this.connectHandle;
28
- this.isConnected = true;
29
- }
30
- catch (e) {
31
- // We allow multiple calls to (retries!) to `connect()` even in case where one succeeded
32
- // if `isConnected` is false (e.g. a prior attempt failed)
33
- this.isConnected = false;
34
- throw e;
35
- }
36
- finally {
37
- this.connectHandle = null;
38
- }
39
- return this.isConnected;
40
- }
41
- return true;
42
- }
43
- get litContracts() {
44
- return this.contractsInstance;
45
- }
46
- }
47
- exports.LitContractsInstance = LitContractsInstance;
48
- //# sourceMappingURL=LitContractsInstance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LitContractsInstance.js","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/LitContractsInstance.ts"],"names":[],"mappings":";;;AAIA,+DAA2D;AAE3D,MAAa,oBAAoB;IACd,iBAAiB,CAAe;IAEzC,WAAW,GAAG,KAAK,CAAC;IAEpB,aAAa,GAA4B,IAAI,CAAC;IAEtD,YAAY,EAAE,MAAM,EAA+C;QACjE,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAAY,CAAC;YACxC,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,4BAA4B;YAC5B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC5B,CAAC;YAED,sEAAsE;YACtE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YAEvE,IAAI,CAAC;gBACH,mEAAmE;gBACnE,MAAM,IAAI,CAAC,aAAa,CAAC;gBACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YAC1B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,wFAAwF;gBACxF,0DAA0D;gBAC1D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;gBACzB,MAAM,CAAC,CAAC;YACV,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC5B,CAAC;YACD,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;CACF;AA/CD,oDA+CC"}
@@ -1,7 +0,0 @@
1
- import type { ethers } from 'ethers';
2
- import type { LitContracts } from '@lit-protocol/contracts-sdk';
3
- import type { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
4
- export declare function getLitContractsClient({ wallet, }: {
5
- wallet: ethers.Wallet | PKPEthersWallet;
6
- }): Promise<LitContracts>;
7
- //# sourceMappingURL=get-lit-contract-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-lit-contract-client.d.ts","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/get-lit-contract-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAMhE,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,eAAe,CAAC;CACzC,GAAG,OAAO,CAAC,YAAY,CAAC,CAcxB"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLitContractsClient = getLitContractsClient;
4
- const LitContractsInstance_1 = require("./LitContractsInstance");
5
- const instancesByWallet = new WeakMap();
6
- async function getLitContractsClient({ wallet, }) {
7
- let instance = instancesByWallet.get(wallet);
8
- if (instance) {
9
- // connect() is idempotent; if we're retrying from outside, attempt to connect again
10
- // This is a no-op if already connected 🎉 but if a prior attempt fails, it'll try again.
11
- await instance.connect();
12
- return instance.litContracts;
13
- }
14
- instance = new LitContractsInstance_1.LitContractsInstance({ wallet });
15
- instancesByWallet.set(wallet, instance);
16
- await instance.connect();
17
- return instance.litContracts;
18
- }
19
- //# sourceMappingURL=get-lit-contract-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-lit-contract-client.js","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/get-lit-contract-client.ts"],"names":[],"mappings":";;AASA,sDAkBC;AAtBD,iEAA8D;AAE9D,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAyD,CAAC;AAExF,KAAK,UAAU,qBAAqB,CAAC,EAC1C,MAAM,GAGP;IACC,IAAI,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,QAAQ,EAAE,CAAC;QACb,oFAAoF;QACpF,yFAAyF;QACzF,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC;IAED,QAAQ,GAAG,IAAI,2CAAoB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACxC,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC;IAEzB,OAAO,QAAQ,CAAC,YAAY,CAAC;AAC/B,CAAC"}
@@ -1,3 +0,0 @@
1
- export { getLitContractsClient } from './get-lit-contract-client';
2
- export { LitContractsInstance } from './LitContractsInstance';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LitContractsInstance = exports.getLitContractsClient = void 0;
4
- var get_lit_contract_client_1 = require("./get-lit-contract-client");
5
- Object.defineProperty(exports, "getLitContractsClient", { enumerable: true, get: function () { return get_lit_contract_client_1.getLitContractsClient; } });
6
- var LitContractsInstance_1 = require("./LitContractsInstance");
7
- Object.defineProperty(exports, "LitContractsInstance", { enumerable: true, get: function () { return LitContractsInstance_1.LitContractsInstance; } });
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/litContractsClient/index.ts"],"names":[],"mappings":";;;AAAA,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA"}
@@ -1,16 +0,0 @@
1
- import { ethers } from 'ethers';
2
- import type { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
3
- export type PkpInfo = {
4
- ethAddress: string;
5
- tokenId: string;
6
- publicKey: string;
7
- };
8
- /**
9
- * Helper function to mint a new PKP and return its information
10
- * @param wallet wallet that will be the PKP owner and permitted auth method
11
- * @returns the newly minted PKP's tokenId and ethAddress
12
- */
13
- export declare const mintNewPkp: ({ wallet, }: {
14
- wallet: ethers.Wallet | PKPEthersWallet;
15
- }) => Promise<PkpInfo>;
16
- //# sourceMappingURL=mint-new-pkp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mint-new-pkp.d.ts","sourceRoot":"","sources":["../../../src/lib/mint-new-pkp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAMhE,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAU,aAE9B;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,eAAe,CAAC;CACzC,KAAG,OAAO,CAAC,OAAO,CAgDlB,CAAC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mintNewPkp = void 0;
4
- const ethers_1 = require("ethers");
5
- const constants_1 = require("@lit-protocol/constants");
6
- const get_lit_contract_client_1 = require("./litContractsClient/get-lit-contract-client");
7
- /**
8
- * Helper function to mint a new PKP and return its information
9
- * @param wallet wallet that will be the PKP owner and permitted auth method
10
- * @returns the newly minted PKP's tokenId and ethAddress
11
- */
12
- const mintNewPkp = async ({ wallet, }) => {
13
- const litContractClient = await (0, get_lit_contract_client_1.getLitContractsClient)({ wallet });
14
- await litContractClient.connect();
15
- const mintPkpTx = await litContractClient.pkpHelperContract.write.mintNextAndAddAuthMethods(constants_1.AUTH_METHOD_TYPE.EthWallet, [constants_1.AUTH_METHOD_TYPE.EthWallet], [wallet.address], ['0x'], [[constants_1.AUTH_METHOD_SCOPE.SignAnything]], true, // addPkpEthAddressAsPermittedAddress
16
- false, // sendPkpToItself
17
- {
18
- value: await litContractClient.pkpNftContract.read.mintCost(),
19
- gasLimit: 5_000_000,
20
- });
21
- const mintPkpReceipt = await mintPkpTx.wait();
22
- if (!mintPkpReceipt.events) {
23
- throw new Error('Mint Pkp Receipt does not have events');
24
- }
25
- const pkpMintedEvent = mintPkpReceipt.events.find((event) => event.topics[0] === '0x3b2cc0657d0387a736293d66389f78e4c8025e413c7a1ee67b7707d4418c46b8');
26
- if (!pkpMintedEvent) {
27
- throw new Error('Mint Pkp Receipt does not have PkpMinted event; cannot identify minted PKPs publicKey');
28
- }
29
- const tokenId = ethers_1.ethers.utils.keccak256('0x' + pkpMintedEvent.data.slice(130, 260));
30
- const ethAddress = await litContractClient.pkpNftContract.read.getEthAddress(tokenId);
31
- const publicKey = await litContractClient.pkpNftContract.read.getPubkey(tokenId);
32
- console.log(`ℹ️ Minted new PKP owned by ${await wallet.getAddress()} with ethAddress: ${ethAddress}`);
33
- return {
34
- tokenId: ethers_1.ethers.BigNumber.from(tokenId).toString(),
35
- ethAddress,
36
- publicKey,
37
- };
38
- };
39
- exports.mintNewPkp = mintNewPkp;
40
- //# sourceMappingURL=mint-new-pkp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mint-new-pkp.js","sourceRoot":"","sources":["../../../src/lib/mint-new-pkp.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAIhC,uDAA8E;AAE9E,0FAAqF;AAQrF;;;;GAIG;AACI,MAAM,UAAU,GAAG,KAAK,EAAE,EAC/B,MAAM,GAGP,EAAoB,EAAE;IACrB,MAAM,iBAAiB,GAAG,MAAM,IAAA,+CAAqB,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAClE,MAAM,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAElC,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAAC,yBAAyB,CACzF,4BAAgB,CAAC,SAAS,EAC1B,CAAC,4BAAgB,CAAC,SAAS,CAAC,EAC5B,CAAC,MAAM,CAAC,OAAO,CAAC,EAChB,CAAC,IAAI,CAAC,EACN,CAAC,CAAC,6BAAiB,CAAC,YAAY,CAAC,CAAC,EAClC,IAAI,EAAE,qCAAqC;IAC3C,KAAK,EAAE,kBAAkB;IACzB;QACE,KAAK,EAAE,MAAM,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC7D,QAAQ,EAAE,SAAS;KACpB,CACF,CAAC;IAEF,MAAM,cAAc,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;IAE9C,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAC/C,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,oEAAoE,CAC3F,CAAC;IAEF,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,eAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACnF,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtF,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAEjF,OAAO,CAAC,GAAG,CACT,+BAA+B,MAAM,MAAM,CAAC,UAAU,EAAE,qBAAqB,UAAU,EAAE,CAC1F,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,eAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;QAClD,UAAU;QACV,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,UAAU,cAoDrB"}
@@ -1,81 +0,0 @@
1
- import type { Wallet } from 'ethers';
2
- import type { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
3
- import type { PermissionData } from '@lit-protocol/vincent-contracts-sdk';
4
- import type { PkpInfo } from './mint-new-pkp';
5
- import type { SmartAccountInfo } from './smartAccount';
6
- export interface VincentDevEnvironment {
7
- agentPkpInfo: PkpInfo;
8
- agentAddress: string;
9
- platformUserPkpInfo: PkpInfo;
10
- wallets: {
11
- appDelegatee: Wallet;
12
- funder: Wallet;
13
- appManager: Wallet;
14
- platformUserWalletOwner: Wallet;
15
- platformUserPkpWallet: PKPEthersWallet;
16
- };
17
- appId: number;
18
- appVersion: number;
19
- smartAccount?: SmartAccountInfo;
20
- }
21
- /**
22
- * Helper function to set up a Vincent development environment with the new PKP hierarchy.
23
- * This function handles all the necessary setup steps including:
24
- * - Checking and funding all required accounts (funder, app delegatee, app manager)
25
- * - Registering or updating your app with abilities and policies
26
- * - Creating or using an existing Platform User PKP (owned by EOA)
27
- * - Creating or using an existing Agent PKP for the app (owned by Platform User PKP)
28
- * - Setting up permissions for the Agent PKP
29
- * - Ensuring a valid capacity token exists
30
- * - Optionally creating a smart account owned by agentWalletOwner with the PKP as a permitted signer
31
- *
32
- * PKP Hierarchy: EOA → Platform User PKP → Agent PKP (per app)
33
- *
34
- * @param permissionData permission data containing abilities and their policies
35
- * @param smartAccountType type of smart account to create: 'zerodev', 'crossmint', 'safe', or false to disable
36
- * @returns the setup result including agent PKP info, wallets, app ID, app version, and optional smart account info
37
- * @example
38
- * ```typescript
39
- * // Example with no policies
40
- * const permissionData = {
41
- * [bundledVincentAbility.ipfsCid]: {},
42
- * };
43
- *
44
- * // Example with policies
45
- * const permissionDataWithPolicies = {
46
- * [bundledVincentAbility.ipfsCid]: {
47
- * [spendingLimitPolicy.ipfsCid]: {
48
- * limit: '1000000',
49
- * period: '86400',
50
- * },
51
- * },
52
- * };
53
- *
54
- * // EOA mode
55
- * const result = await setupVincentDevelopmentEnvironment({ permissionData });
56
- *
57
- * // ZeroDev smart account mode (requires SMART_ACCOUNT_CHAIN_ID and ZERODEV_RPC_URL env vars)
58
- * const result = await setupVincentDevelopmentEnvironment({
59
- * permissionData,
60
- * smartAccountType: 'zerodev',
61
- * });
62
- *
63
- * // Crossmint smart account mode (requires SMART_ACCOUNT_CHAIN_ID and CROSSMINT_API_KEY env vars)
64
- * const result = await setupVincentDevelopmentEnvironment({
65
- * permissionData,
66
- * smartAccountType: 'crossmint',
67
- * });
68
- *
69
- * // Safe smart account mode (requires SMART_ACCOUNT_CHAIN_ID, SAFE_RPC_URL, and PIMLICO_RPC_URL env vars)
70
- * const result = await setupVincentDevelopmentEnvironment({
71
- * permissionData,
72
- * smartAccountType: 'safe',
73
- * });
74
- * ```
75
- */
76
- export declare const setupVincentDevelopmentEnvironment: ({ permissionData, smartAccountType, agentAddress, }: {
77
- permissionData: PermissionData;
78
- smartAccountType?: "zerodev" | "crossmint" | "safe";
79
- agentAddress?: string;
80
- }) => Promise<VincentDevEnvironment>;
81
- //# sourceMappingURL=setup-vincent-development-environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-vincent-development-environment.d.ts","sourceRoot":"","sources":["../../../src/lib/setup-vincent-development-environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWvD,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,uBAAuB,EAAE,MAAM,CAAC;QAChC,qBAAqB,EAAE,eAAe,CAAC;KACxC,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,eAAO,MAAM,kCAAkC,GAAU,qDAItD;IACD,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,OAAO,CAAC,qBAAqB,CAyIhC,CAAC"}