@crossmint/client-sdk-smart-wallet 0.1.35 → 0.2.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 (285) hide show
  1. package/README.md +293 -0
  2. package/dist/abi/entryPoint.cjs +1 -0
  3. package/dist/abi/entryPoint.d.cts +777 -0
  4. package/dist/abi/entryPoint.d.ts +777 -0
  5. package/dist/abi/entryPoint.js +1 -0
  6. package/dist/abi/erc1155.cjs +1 -0
  7. package/dist/abi/erc1155.d.cts +254 -0
  8. package/dist/abi/erc1155.d.ts +254 -0
  9. package/dist/abi/erc1155.js +1 -0
  10. package/dist/abi/erc20.cjs +1 -0
  11. package/dist/abi/erc20.d.cts +170 -0
  12. package/dist/abi/erc20.d.ts +170 -0
  13. package/dist/abi/erc20.js +1 -0
  14. package/dist/abi/erc721.cjs +1 -0
  15. package/dist/abi/erc721.d.cts +247 -0
  16. package/dist/abi/erc721.d.ts +247 -0
  17. package/dist/abi/erc721.js +1 -0
  18. package/dist/apiService-D4DIxjMr.d.ts +136 -0
  19. package/dist/apiService-Dum8A8_6.d.cts +136 -0
  20. package/dist/apiService.cjs +1 -0
  21. package/dist/apiService.d.cts +9 -0
  22. package/dist/apiService.d.ts +9 -0
  23. package/dist/apiService.js +1 -0
  24. package/dist/{chunk-IUIBQFWY.cjs → chunk-23IWY6XV.cjs} +1 -1
  25. package/dist/chunk-2MQHIAJE.js +1 -0
  26. package/dist/chunk-4PMBBA3O.cjs +1 -0
  27. package/dist/chunk-5T3HB4Y6.js +1 -0
  28. package/dist/chunk-73LUJQGU.cjs +1 -0
  29. package/dist/chunk-75JNTS3U.js +1 -0
  30. package/dist/chunk-AS5VIM5V.cjs +1 -0
  31. package/dist/chunk-BCWZIVSQ.js +1 -0
  32. package/dist/{chunk-SODH64MG.cjs → chunk-D33JIUOQ.cjs} +1 -1
  33. package/dist/chunk-DB2QM3HB.js +1 -0
  34. package/dist/chunk-EMZ5NAG2.cjs +1 -0
  35. package/dist/chunk-GGKMZPIA.js +1 -0
  36. package/dist/chunk-I5RZI2HB.js +1 -0
  37. package/dist/chunk-J5SRLI35.cjs +1 -0
  38. package/dist/chunk-KXYDJTZS.cjs +1 -0
  39. package/dist/{chunk-I22LKNPM.js → chunk-LJ43A5BN.js} +1 -1
  40. package/dist/chunk-LPLLPZFU.cjs +1 -0
  41. package/dist/chunk-MLTT5BGD.cjs +1 -0
  42. package/dist/chunk-NXTHA2ZL.js +1 -0
  43. package/dist/chunk-OWZ3LXVG.js +1 -0
  44. package/dist/chunk-Q23CHZRT.cjs +1 -0
  45. package/dist/chunk-Q6YGAHDR.cjs +1 -0
  46. package/dist/chunk-SVGKSKZD.cjs +1 -0
  47. package/dist/chunk-T5PL4ATW.js +1 -0
  48. package/dist/chunk-U2JMKBCC.cjs +1 -0
  49. package/dist/chunk-UBRUUSMF.js +1 -0
  50. package/dist/chunk-VEZ3PQGX.js +1 -0
  51. package/dist/chunk-Z3KARJF5.js +1 -0
  52. package/dist/error/index.cjs +1 -1
  53. package/dist/error/index.d.cts +25 -43
  54. package/dist/error/index.d.ts +25 -43
  55. package/dist/error/index.js +1 -1
  56. package/dist/error/processor.cjs +1 -1
  57. package/dist/error/processor.d.cts +0 -13
  58. package/dist/error/processor.d.ts +0 -13
  59. package/dist/error/processor.js +1 -1
  60. package/dist/evm/chains/definitions/story-testnet.cjs +1 -0
  61. package/dist/evm/chains/definitions/story-testnet.js +1 -0
  62. package/dist/evm/chains/definitions/story.cjs +1 -0
  63. package/dist/evm/chains/definitions/story.js +1 -0
  64. package/dist/evm/chains/index.cjs +1 -0
  65. package/dist/{blockchain/chains.d.cts → evm/chains/index.d.cts} +4 -7
  66. package/dist/{blockchain/chains.d.ts → evm/chains/index.d.ts} +4 -7
  67. package/dist/evm/chains/index.js +1 -0
  68. package/dist/evm/rpc.cjs +1 -0
  69. package/dist/{blockchain → evm}/rpc.d.cts +4 -3
  70. package/dist/{blockchain → evm}/rpc.d.ts +4 -3
  71. package/dist/evm/rpc.js +1 -0
  72. package/dist/evm/smartWalletClient.d.cts +59 -0
  73. package/dist/evm/smartWalletClient.d.ts +59 -0
  74. package/dist/evm/transfer.cjs +1 -0
  75. package/dist/evm/transfer.d.cts +8 -0
  76. package/dist/evm/transfer.d.ts +8 -0
  77. package/dist/evm/transfer.js +1 -0
  78. package/dist/evm/wallet.cjs +1 -0
  79. package/dist/evm/wallet.d.cts +9 -0
  80. package/dist/evm/wallet.d.ts +9 -0
  81. package/dist/evm/wallet.js +1 -0
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +9 -20
  84. package/dist/index.d.ts +9 -20
  85. package/dist/index.js +1 -1
  86. package/dist/sdk.cjs +1 -0
  87. package/dist/{SmartWalletSDK.d.ts → sdk.d.cts} +18 -21
  88. package/dist/{SmartWalletSDK.d.cts → sdk.d.ts} +18 -21
  89. package/dist/sdk.js +1 -0
  90. package/dist/services/index.cjs +1 -1
  91. package/dist/services/index.js +1 -1
  92. package/dist/services/logger.cjs +1 -1
  93. package/dist/services/logger.js +1 -1
  94. package/dist/smartWalletService.cjs +1 -0
  95. package/dist/smartWalletService.d.cts +9 -0
  96. package/dist/smartWalletService.d.ts +9 -0
  97. package/dist/smartWalletService.js +1 -0
  98. package/dist/types/api.d.cts +195 -0
  99. package/dist/types/api.d.ts +195 -0
  100. package/dist/types/transfer.d.cts +46 -0
  101. package/dist/types/transfer.d.ts +46 -0
  102. package/dist/utils/constants.cjs +1 -1
  103. package/dist/utils/constants.d.cts +5 -6
  104. package/dist/utils/constants.d.ts +5 -6
  105. package/dist/utils/constants.js +1 -1
  106. package/dist/utils/index.cjs +1 -0
  107. package/dist/utils/index.d.cts +3 -0
  108. package/dist/utils/index.d.ts +3 -0
  109. package/dist/utils/index.js +1 -0
  110. package/package.json +3 -8
  111. package/dist/SmartWalletSDK.cjs +0 -1
  112. package/dist/SmartWalletSDK.js +0 -1
  113. package/dist/api/CrossmintWalletService.cjs +0 -1
  114. package/dist/api/CrossmintWalletService.d.cts +0 -31
  115. package/dist/api/CrossmintWalletService.d.ts +0 -31
  116. package/dist/api/CrossmintWalletService.js +0 -1
  117. package/dist/blockchain/chains.cjs +0 -1
  118. package/dist/blockchain/chains.js +0 -1
  119. package/dist/blockchain/rpc.cjs +0 -1
  120. package/dist/blockchain/rpc.js +0 -1
  121. package/dist/blockchain/transfer.cjs +0 -1
  122. package/dist/blockchain/transfer.d.cts +0 -23
  123. package/dist/blockchain/transfer.d.ts +0 -23
  124. package/dist/blockchain/transfer.js +0 -1
  125. package/dist/blockchain/wallets/EVMSmartWallet.cjs +0 -1
  126. package/dist/blockchain/wallets/EVMSmartWallet.d.cts +0 -102
  127. package/dist/blockchain/wallets/EVMSmartWallet.d.ts +0 -102
  128. package/dist/blockchain/wallets/EVMSmartWallet.js +0 -1
  129. package/dist/blockchain/wallets/SendTransactionService.cjs +0 -1
  130. package/dist/blockchain/wallets/SendTransactionService.d.cts +0 -84
  131. package/dist/blockchain/wallets/SendTransactionService.d.ts +0 -84
  132. package/dist/blockchain/wallets/SendTransactionService.js +0 -1
  133. package/dist/blockchain/wallets/account/cache.cjs +0 -1
  134. package/dist/blockchain/wallets/account/cache.d.cts +0 -25
  135. package/dist/blockchain/wallets/account/cache.d.ts +0 -25
  136. package/dist/blockchain/wallets/account/cache.js +0 -1
  137. package/dist/blockchain/wallets/account/config.cjs +0 -1
  138. package/dist/blockchain/wallets/account/config.d.cts +0 -47
  139. package/dist/blockchain/wallets/account/config.d.ts +0 -47
  140. package/dist/blockchain/wallets/account/config.js +0 -1
  141. package/dist/blockchain/wallets/account/creator.cjs +0 -1
  142. package/dist/blockchain/wallets/account/creator.d.cts +0 -26
  143. package/dist/blockchain/wallets/account/creator.d.ts +0 -26
  144. package/dist/blockchain/wallets/account/creator.js +0 -1
  145. package/dist/blockchain/wallets/account/eoa.cjs +0 -1
  146. package/dist/blockchain/wallets/account/eoa.d.cts +0 -21
  147. package/dist/blockchain/wallets/account/eoa.d.ts +0 -21
  148. package/dist/blockchain/wallets/account/eoa.js +0 -1
  149. package/dist/blockchain/wallets/account/passkey.cjs +0 -1
  150. package/dist/blockchain/wallets/account/passkey.d.cts +0 -29
  151. package/dist/blockchain/wallets/account/passkey.d.ts +0 -29
  152. package/dist/blockchain/wallets/account/passkey.js +0 -1
  153. package/dist/blockchain/wallets/account/signer.cjs +0 -1
  154. package/dist/blockchain/wallets/account/signer.d.cts +0 -14
  155. package/dist/blockchain/wallets/account/signer.d.ts +0 -14
  156. package/dist/blockchain/wallets/account/signer.js +0 -1
  157. package/dist/blockchain/wallets/account/strategy.d.cts +0 -20
  158. package/dist/blockchain/wallets/account/strategy.d.ts +0 -20
  159. package/dist/blockchain/wallets/clientDecorator.cjs +0 -1
  160. package/dist/blockchain/wallets/clientDecorator.d.cts +0 -38
  161. package/dist/blockchain/wallets/clientDecorator.d.ts +0 -38
  162. package/dist/blockchain/wallets/clientDecorator.js +0 -1
  163. package/dist/blockchain/wallets/definitions/story-testnet.cjs +0 -1
  164. package/dist/blockchain/wallets/definitions/story-testnet.js +0 -1
  165. package/dist/blockchain/wallets/definitions/story.cjs +0 -1
  166. package/dist/blockchain/wallets/definitions/story.js +0 -1
  167. package/dist/blockchain/wallets/index.cjs +0 -1
  168. package/dist/blockchain/wallets/index.d.cts +0 -20
  169. package/dist/blockchain/wallets/index.d.ts +0 -20
  170. package/dist/blockchain/wallets/index.js +0 -1
  171. package/dist/blockchain/wallets/paymaster.cjs +0 -1
  172. package/dist/blockchain/wallets/paymaster.d.cts +0 -29
  173. package/dist/blockchain/wallets/paymaster.d.ts +0 -29
  174. package/dist/blockchain/wallets/paymaster.js +0 -1
  175. package/dist/blockchain/wallets/service.cjs +0 -1
  176. package/dist/blockchain/wallets/service.d.cts +0 -41
  177. package/dist/blockchain/wallets/service.d.ts +0 -41
  178. package/dist/blockchain/wallets/service.js +0 -1
  179. package/dist/chunk-2R6HK64N.cjs +0 -1
  180. package/dist/chunk-3F6P4HUZ.js +0 -1
  181. package/dist/chunk-5FGSZZCU.js +0 -1
  182. package/dist/chunk-74J3L7KP.js +0 -1
  183. package/dist/chunk-76TIESKQ.cjs +0 -2
  184. package/dist/chunk-7AVDZZGD.cjs +0 -1
  185. package/dist/chunk-7COIRB4M.js +0 -1
  186. package/dist/chunk-ATQ4WGCW.js +0 -1
  187. package/dist/chunk-BJZQA5VC.js +0 -1
  188. package/dist/chunk-C3VZY7VJ.js +0 -1
  189. package/dist/chunk-CUTQYF3F.js +0 -1
  190. package/dist/chunk-D4NDUT36.js +0 -1
  191. package/dist/chunk-DHZVUAQA.js +0 -1
  192. package/dist/chunk-DIDKPOO2.cjs +0 -1
  193. package/dist/chunk-ERDSL6AZ.cjs +0 -1
  194. package/dist/chunk-ETVJGLNY.js +0 -1
  195. package/dist/chunk-FHNNZVNU.js +0 -1
  196. package/dist/chunk-GB35YMN4.cjs +0 -1
  197. package/dist/chunk-GVRCHWHG.js +0 -1
  198. package/dist/chunk-H4CMXNVK.js +0 -1
  199. package/dist/chunk-HN42GEK5.cjs +0 -3
  200. package/dist/chunk-ICKMQEHA.cjs +0 -1
  201. package/dist/chunk-IQTGPM2U.cjs +0 -1
  202. package/dist/chunk-KREX6Z32.js +0 -1
  203. package/dist/chunk-KYPTGHC6.cjs +0 -1
  204. package/dist/chunk-M4K3IZTT.cjs +0 -1
  205. package/dist/chunk-MECWQ5TQ.cjs +0 -1
  206. package/dist/chunk-MLZJIYAZ.js +0 -1
  207. package/dist/chunk-N64VSC3H.cjs +0 -1
  208. package/dist/chunk-NLGILHJS.js +0 -1
  209. package/dist/chunk-NQUKI27M.cjs +0 -1
  210. package/dist/chunk-O2ACORII.cjs +0 -1
  211. package/dist/chunk-OC3YNPRX.js +0 -3
  212. package/dist/chunk-OXRLBURF.js +0 -1
  213. package/dist/chunk-P5PDYDCW.js +0 -1
  214. package/dist/chunk-PZ6Q22YJ.js +0 -1
  215. package/dist/chunk-QBGECKSZ.cjs +0 -1
  216. package/dist/chunk-QQEJPZKN.cjs +0 -1
  217. package/dist/chunk-RLVETRLF.cjs +0 -1
  218. package/dist/chunk-S2XBSAGM.js +0 -1
  219. package/dist/chunk-SCXFZMLR.cjs +0 -1
  220. package/dist/chunk-STH2LE35.cjs +0 -1
  221. package/dist/chunk-SWWOVT47.cjs +0 -1
  222. package/dist/chunk-UG47CBKR.js +0 -1
  223. package/dist/chunk-UL4HKRLD.js +0 -1
  224. package/dist/chunk-UPURFW46.js +0 -1
  225. package/dist/chunk-WJ6XJMRD.cjs +0 -1
  226. package/dist/chunk-XI4CDQWT.cjs +0 -1
  227. package/dist/chunk-XJGFG3RT.cjs +0 -1
  228. package/dist/chunk-XQ2K2K23.cjs +0 -1
  229. package/dist/chunk-YYGR7VFT.js +0 -2
  230. package/dist/service-DqYCir8s.d.ts +0 -103
  231. package/dist/service-Ir-Qho-9.d.cts +0 -103
  232. package/dist/types/internal.cjs +0 -1
  233. package/dist/types/internal.d.cts +0 -14
  234. package/dist/types/internal.d.ts +0 -14
  235. package/dist/types/internal.js +0 -1
  236. package/dist/types/params.d.cts +0 -33
  237. package/dist/types/params.d.ts +0 -33
  238. package/dist/types/schema.cjs +0 -1
  239. package/dist/types/schema.d.cts +0 -241
  240. package/dist/types/schema.d.ts +0 -241
  241. package/dist/types/schema.js +0 -1
  242. package/dist/types/service.d.cts +0 -14
  243. package/dist/types/service.d.ts +0 -14
  244. package/dist/types/token.cjs +0 -1
  245. package/dist/types/token.d.cts +0 -35
  246. package/dist/types/token.d.ts +0 -35
  247. package/dist/types/token.js +0 -0
  248. package/dist/utils/api.cjs +0 -1
  249. package/dist/utils/api.d.cts +0 -4
  250. package/dist/utils/api.d.ts +0 -4
  251. package/dist/utils/api.js +0 -1
  252. package/dist/utils/blockchain.cjs +0 -1
  253. package/dist/utils/blockchain.d.cts +0 -7
  254. package/dist/utils/blockchain.d.ts +0 -7
  255. package/dist/utils/blockchain.js +0 -1
  256. package/dist/utils/environment.cjs +0 -1
  257. package/dist/utils/environment.d.cts +0 -3
  258. package/dist/utils/environment.d.ts +0 -3
  259. package/dist/utils/environment.js +0 -1
  260. package/dist/utils/helpers.cjs +0 -1
  261. package/dist/utils/helpers.d.cts +0 -4
  262. package/dist/utils/helpers.d.ts +0 -4
  263. package/dist/utils/helpers.js +0 -1
  264. package/dist/utils/signer.cjs +0 -1
  265. package/dist/utils/signer.d.cts +0 -15
  266. package/dist/utils/signer.d.ts +0 -15
  267. package/dist/utils/signer.js +0 -1
  268. package/dist/utils/test.cjs +0 -1
  269. package/dist/utils/test.d.cts +0 -18
  270. package/dist/utils/test.d.ts +0 -18
  271. package/dist/utils/test.js +0 -1
  272. /package/dist/{chunk-HQXF6VHP.cjs → chunk-5URY3C2T.cjs} +0 -0
  273. /package/dist/{chunk-DYVHPARQ.js → chunk-KVFFSUF4.js} +0 -0
  274. /package/dist/{chunk-GPZ7PHS6.cjs → chunk-MFUN74KH.cjs} +0 -0
  275. /package/dist/{chunk-NT7LBRZQ.js → chunk-XLACPZJJ.js} +0 -0
  276. /package/dist/{blockchain/wallets → evm/chains}/definitions/story-testnet.d.cts +0 -0
  277. /package/dist/{blockchain/wallets → evm/chains}/definitions/story-testnet.d.ts +0 -0
  278. /package/dist/{blockchain/wallets → evm/chains}/definitions/story.d.cts +0 -0
  279. /package/dist/{blockchain/wallets → evm/chains}/definitions/story.d.ts +0 -0
  280. /package/dist/{blockchain/wallets/account/strategy.cjs → evm/smartWalletClient.cjs} +0 -0
  281. /package/dist/{blockchain/wallets/account/strategy.js → evm/smartWalletClient.js} +0 -0
  282. /package/dist/types/{params.cjs → api.cjs} +0 -0
  283. /package/dist/types/{params.js → api.js} +0 -0
  284. /package/dist/types/{service.cjs → transfer.cjs} +0 -0
  285. /package/dist/types/{service.js → transfer.js} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQBGECKSZcjs = require('../chunk-QBGECKSZ.cjs');exports.API_VERSION = _chunkQBGECKSZcjs.e; exports.CURRENT_VERSION = _chunkQBGECKSZcjs.b; exports.SCW_SERVICE = _chunkQBGECKSZcjs.c; exports.SDK_VERSION = _chunkQBGECKSZcjs.d; exports.SUPPORTED_ENTRYPOINT_VERSIONS = _chunkQBGECKSZcjs.g; exports.SUPPORTED_KERNEL_VERSIONS = _chunkQBGECKSZcjs.f; exports.ZERO_DEV_TYPE = _chunkQBGECKSZcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEMZ5NAG2cjs = require('../chunk-EMZ5NAG2.cjs');exports.API_VERSION = _chunkEMZ5NAG2cjs.d; exports.ENTRY_POINT_ADDRESS = _chunkEMZ5NAG2cjs.e; exports.SCW_SERVICE = _chunkEMZ5NAG2cjs.a; exports.SDK_NAME = _chunkEMZ5NAG2cjs.c; exports.SDK_VERSION = _chunkEMZ5NAG2cjs.b; exports.STATUS_POLLING_INTERVAL_MS = _chunkEMZ5NAG2cjs.f;
@@ -1,9 +1,8 @@
1
- declare const ZERO_DEV_TYPE = "ZeroDev";
2
- declare const CURRENT_VERSION = 0;
3
1
  declare const SCW_SERVICE = "SCW_SDK";
4
2
  declare const SDK_VERSION: string;
5
- declare const API_VERSION = "2024-06-09";
6
- declare const SUPPORTED_KERNEL_VERSIONS: readonly ["0.3.1", "0.3.0", "0.2.4"];
7
- declare const SUPPORTED_ENTRYPOINT_VERSIONS: readonly ["v0.6", "v0.7"];
3
+ declare const SDK_NAME: string;
4
+ declare const API_VERSION = "2022-06-09";
5
+ declare const ENTRY_POINT_ADDRESS = "0x0000000071727de22e5e9d8baf0edac6f37da032";
6
+ declare const STATUS_POLLING_INTERVAL_MS = 1000;
8
7
 
9
- export { API_VERSION, CURRENT_VERSION, SCW_SERVICE, SDK_VERSION, SUPPORTED_ENTRYPOINT_VERSIONS, SUPPORTED_KERNEL_VERSIONS, ZERO_DEV_TYPE };
8
+ export { API_VERSION, ENTRY_POINT_ADDRESS, SCW_SERVICE, SDK_NAME, SDK_VERSION, STATUS_POLLING_INTERVAL_MS };
@@ -1,9 +1,8 @@
1
- declare const ZERO_DEV_TYPE = "ZeroDev";
2
- declare const CURRENT_VERSION = 0;
3
1
  declare const SCW_SERVICE = "SCW_SDK";
4
2
  declare const SDK_VERSION: string;
5
- declare const API_VERSION = "2024-06-09";
6
- declare const SUPPORTED_KERNEL_VERSIONS: readonly ["0.3.1", "0.3.0", "0.2.4"];
7
- declare const SUPPORTED_ENTRYPOINT_VERSIONS: readonly ["v0.6", "v0.7"];
3
+ declare const SDK_NAME: string;
4
+ declare const API_VERSION = "2022-06-09";
5
+ declare const ENTRY_POINT_ADDRESS = "0x0000000071727de22e5e9d8baf0edac6f37da032";
6
+ declare const STATUS_POLLING_INTERVAL_MS = 1000;
8
7
 
9
- export { API_VERSION, CURRENT_VERSION, SCW_SERVICE, SDK_VERSION, SUPPORTED_ENTRYPOINT_VERSIONS, SUPPORTED_KERNEL_VERSIONS, ZERO_DEV_TYPE };
8
+ export { API_VERSION, ENTRY_POINT_ADDRESS, SCW_SERVICE, SDK_NAME, SDK_VERSION, STATUS_POLLING_INTERVAL_MS };
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g}from"../chunk-5FGSZZCU.js";export{e as API_VERSION,b as CURRENT_VERSION,c as SCW_SERVICE,d as SDK_VERSION,g as SUPPORTED_ENTRYPOINT_VERSIONS,f as SUPPORTED_KERNEL_VERSIONS,a as ZERO_DEV_TYPE};
1
+ import{a,b,c,d,e,f}from"../chunk-T5PL4ATW.js";export{d as API_VERSION,e as ENTRY_POINT_ADDRESS,a as SCW_SERVICE,c as SDK_NAME,b as SDK_VERSION,f as STATUS_POLLING_INTERVAL_MS};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAS5VIM5Vcjs = require('../chunk-AS5VIM5V.cjs');exports.sleep = _chunkAS5VIM5Vcjs.a;
@@ -0,0 +1,3 @@
1
+ declare function sleep(ms: number): Promise<unknown>;
2
+
3
+ export { sleep };
@@ -0,0 +1,3 @@
1
+ declare function sleep(ms: number): Promise<unknown>;
2
+
3
+ export { sleep };
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-2MQHIAJE.js";export{a as sleep};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/client-sdk-smart-wallet",
3
- "version": "0.1.35",
3
+ "version": "0.2.0",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -18,14 +18,9 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@zerodev/ecdsa-validator": "5.3.1",
22
- "@zerodev/passkey-validator": "5.4.0",
23
- "@zerodev/sdk": "5.3.3",
24
- "@zerodev/webauthn-key": "5.3.1",
25
- "permissionless": "0.1.36",
21
+ "ox": "0.6.9",
26
22
  "viem": "2.17.5",
27
- "zod": "3.22.4",
28
- "@crossmint/client-sdk-base": "1.4.10",
23
+ "@crossmint/client-sdk-base": "1.4.11",
29
24
  "@crossmint/common-sdk-base": "0.3.2"
30
25
  },
31
26
  "devDependencies": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXI4CDQWTcjs = require('./chunk-XI4CDQWT.cjs');require('./chunk-SCXFZMLR.cjs');require('./chunk-ICKMQEHA.cjs');require('./chunk-ERDSL6AZ.cjs');require('./chunk-IQTGPM2U.cjs');require('./chunk-QQEJPZKN.cjs');require('./chunk-O2ACORII.cjs');require('./chunk-HN42GEK5.cjs');require('./chunk-2R6HK64N.cjs');require('./chunk-GB35YMN4.cjs');require('./chunk-WJ6XJMRD.cjs');require('./chunk-STH2LE35.cjs');require('./chunk-XJGFG3RT.cjs');require('./chunk-DIDKPOO2.cjs');require('./chunk-SWWOVT47.cjs');require('./chunk-7AVDZZGD.cjs');require('./chunk-MECWQ5TQ.cjs');require('./chunk-76TIESKQ.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-RLVETRLF.cjs');require('./chunk-N64VSC3H.cjs');require('./chunk-XQ2K2K23.cjs');require('./chunk-IUIBQFWY.cjs');require('./chunk-NQUKI27M.cjs');require('./chunk-HQXF6VHP.cjs');require('./chunk-GPZ7PHS6.cjs');require('./chunk-KYPTGHC6.cjs');require('./chunk-SODH64MG.cjs');require('./chunk-QBGECKSZ.cjs');require('./chunk-M4K3IZTT.cjs');exports.SmartWalletSDK = _chunkXI4CDQWTcjs.a;
@@ -1 +0,0 @@
1
- import{a}from"./chunk-DHZVUAQA.js";import"./chunk-H4CMXNVK.js";import"./chunk-7COIRB4M.js";import"./chunk-GVRCHWHG.js";import"./chunk-NLGILHJS.js";import"./chunk-P5PDYDCW.js";import"./chunk-ATQ4WGCW.js";import"./chunk-OC3YNPRX.js";import"./chunk-UG47CBKR.js";import"./chunk-BJZQA5VC.js";import"./chunk-C3VZY7VJ.js";import"./chunk-D4NDUT36.js";import"./chunk-CUTQYF3F.js";import"./chunk-FHNNZVNU.js";import"./chunk-ETVJGLNY.js";import"./chunk-S2XBSAGM.js";import"./chunk-74J3L7KP.js";import"./chunk-YYGR7VFT.js";import"./chunk-4SPA557P.js";import"./chunk-I22LKNPM.js";import"./chunk-MLZJIYAZ.js";import"./chunk-PZ6Q22YJ.js";import"./chunk-OXRLBURF.js";import"./chunk-KREX6Z32.js";import"./chunk-NT7LBRZQ.js";import"./chunk-DYVHPARQ.js";import"./chunk-3F6P4HUZ.js";import"./chunk-UL4HKRLD.js";import"./chunk-5FGSZZCU.js";import"./chunk-UPURFW46.js";export{a as SmartWalletSDK};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk76TIESKQcjs = require('../chunk-76TIESKQ.cjs');require('../chunk-ODAUWGUU.cjs');require('../chunk-RLVETRLF.cjs');require('../chunk-N64VSC3H.cjs');require('../chunk-XQ2K2K23.cjs');require('../chunk-QBGECKSZ.cjs');require('../chunk-M4K3IZTT.cjs');exports.CrossmintWalletService = _chunk76TIESKQcjs.a;
@@ -1,31 +0,0 @@
1
- import * as _crossmint_client_sdk_base from '@crossmint/client-sdk-base';
2
- import { BaseCrossmintService, APIErrorService } from '@crossmint/client-sdk-base';
3
- import { UserOperation } from 'permissionless';
4
- import { EntryPoint, GetEntryPointVersion } from 'permissionless/types/entrypoint';
5
- import { SmartWalletChain } from '../blockchain/chains.cjs';
6
- import { UserParams } from '../types/params.cjs';
7
- import { e as StoreSmartWalletParams, S as SmartWalletConfig } from '../service-Ir-Qho-9.cjs';
8
- import 'viem/chains';
9
- import '@crossmint/common-sdk-base';
10
- import 'viem';
11
- import 'zod';
12
- import '@zerodev/sdk';
13
- import 'permissionless/accounts';
14
- import '../types/schema.cjs';
15
- import '@zerodev/passkey-validator';
16
- import '../utils/constants.cjs';
17
-
18
- type WalletsAPIErrorCodes = "ERROR_USER_WALLET_ALREADY_CREATED" | "ERROR_ADMIN_SIGNER_ALREADY_USED" | "ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED";
19
- declare class CrossmintWalletService extends BaseCrossmintService {
20
- logger: _crossmint_client_sdk_base.SDKLogger;
21
- protected apiErrorService: APIErrorService<WalletsAPIErrorCodes>;
22
- idempotentCreateSmartWallet(user: UserParams, input: StoreSmartWalletParams): Promise<void>;
23
- sponsorUserOperation<E extends EntryPoint>(user: UserParams, userOp: UserOperation<GetEntryPointVersion<E>>, entryPoint: E, chain: SmartWalletChain): Promise<{
24
- sponsorUserOpParams: UserOperation<GetEntryPointVersion<E>>;
25
- }>;
26
- getSmartWalletConfig(user: UserParams, chain: SmartWalletChain): Promise<SmartWalletConfig>;
27
- fetchNFTs(address: string, chain: SmartWalletChain): Promise<any>;
28
- getPasskeyServerUrl(): string;
29
- }
30
-
31
- export { CrossmintWalletService };
@@ -1,31 +0,0 @@
1
- import * as _crossmint_client_sdk_base from '@crossmint/client-sdk-base';
2
- import { BaseCrossmintService, APIErrorService } from '@crossmint/client-sdk-base';
3
- import { UserOperation } from 'permissionless';
4
- import { EntryPoint, GetEntryPointVersion } from 'permissionless/types/entrypoint';
5
- import { SmartWalletChain } from '../blockchain/chains.js';
6
- import { UserParams } from '../types/params.js';
7
- import { e as StoreSmartWalletParams, S as SmartWalletConfig } from '../service-DqYCir8s.js';
8
- import 'viem/chains';
9
- import '@crossmint/common-sdk-base';
10
- import 'viem';
11
- import 'zod';
12
- import '@zerodev/sdk';
13
- import 'permissionless/accounts';
14
- import '../types/schema.js';
15
- import '@zerodev/passkey-validator';
16
- import '../utils/constants.js';
17
-
18
- type WalletsAPIErrorCodes = "ERROR_USER_WALLET_ALREADY_CREATED" | "ERROR_ADMIN_SIGNER_ALREADY_USED" | "ERROR_PROJECT_NONCUSTODIAL_WALLETS_NOT_ENABLED";
19
- declare class CrossmintWalletService extends BaseCrossmintService {
20
- logger: _crossmint_client_sdk_base.SDKLogger;
21
- protected apiErrorService: APIErrorService<WalletsAPIErrorCodes>;
22
- idempotentCreateSmartWallet(user: UserParams, input: StoreSmartWalletParams): Promise<void>;
23
- sponsorUserOperation<E extends EntryPoint>(user: UserParams, userOp: UserOperation<GetEntryPointVersion<E>>, entryPoint: E, chain: SmartWalletChain): Promise<{
24
- sponsorUserOpParams: UserOperation<GetEntryPointVersion<E>>;
25
- }>;
26
- getSmartWalletConfig(user: UserParams, chain: SmartWalletChain): Promise<SmartWalletConfig>;
27
- fetchNFTs(address: string, chain: SmartWalletChain): Promise<any>;
28
- getPasskeyServerUrl(): string;
29
- }
30
-
31
- export { CrossmintWalletService };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-YYGR7VFT.js";import"../chunk-4SPA557P.js";import"../chunk-I22LKNPM.js";import"../chunk-MLZJIYAZ.js";import"../chunk-PZ6Q22YJ.js";import"../chunk-5FGSZZCU.js";import"../chunk-UPURFW46.js";export{a as CrossmintWalletService};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNQUKI27Mcjs = require('../chunk-NQUKI27M.cjs');require('../chunk-HQXF6VHP.cjs');require('../chunk-GPZ7PHS6.cjs');exports.SMART_WALLET_CHAINS = _chunkNQUKI27Mcjs.f; exports.SMART_WALLET_MAINNETS = _chunkNQUKI27Mcjs.d; exports.SMART_WALLET_TESTNETS = _chunkNQUKI27Mcjs.b; exports.SmartWalletChain = _chunkNQUKI27Mcjs.e; exports.SmartWalletMainnet = _chunkNQUKI27Mcjs.c; exports.SmartWalletTestnet = _chunkNQUKI27Mcjs.a; exports.isMainnetChain = _chunkNQUKI27Mcjs.h; exports.isTestnetChain = _chunkNQUKI27Mcjs.g; exports.viemNetworks = _chunkNQUKI27Mcjs.i;
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i}from"../chunk-KREX6Z32.js";import"../chunk-NT7LBRZQ.js";import"../chunk-DYVHPARQ.js";export{f as SMART_WALLET_CHAINS,d as SMART_WALLET_MAINNETS,b as SMART_WALLET_TESTNETS,e as SmartWalletChain,c as SmartWalletMainnet,a as SmartWalletTestnet,h as isMainnetChain,g as isTestnetChain,i as viemNetworks};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIUIBQFWYcjs = require('../chunk-IUIBQFWY.cjs');require('../chunk-NQUKI27M.cjs');require('../chunk-HQXF6VHP.cjs');require('../chunk-GPZ7PHS6.cjs');exports.ALCHEMY_RPC_SUBDOMAIN = _chunkIUIBQFWYcjs.a; exports.getPimlicoBundlerRPC = _chunkIUIBQFWYcjs.c; exports.getRPC = _chunkIUIBQFWYcjs.b;
@@ -1 +0,0 @@
1
- import{a,b,c}from"../chunk-OXRLBURF.js";import"../chunk-KREX6Z32.js";import"../chunk-NT7LBRZQ.js";import"../chunk-DYVHPARQ.js";export{a as ALCHEMY_RPC_SUBDOMAIN,c as getPimlicoBundlerRPC,b as getRPC};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKYPTGHC6cjs = require('../chunk-KYPTGHC6.cjs');exports.transferParams = _chunkKYPTGHC6cjs.a;
@@ -1,23 +0,0 @@
1
- import { Account, Address, Abi } from 'viem';
2
- import { TransferType } from '../types/token.cjs';
3
- import './chains.cjs';
4
- import 'viem/chains';
5
- import '@crossmint/common-sdk-base';
6
-
7
- type TransferInputParams = {
8
- from: Account;
9
- contract: Address;
10
- to: Address;
11
- config: TransferType;
12
- };
13
- type TransferSimulationParams = {
14
- account: Account;
15
- address: Address;
16
- abi: Abi;
17
- functionName: string;
18
- args: any[];
19
- tokenId?: string;
20
- };
21
- declare function transferParams({ contract, config, from, to }: TransferInputParams): TransferSimulationParams;
22
-
23
- export { transferParams };
@@ -1,23 +0,0 @@
1
- import { Account, Address, Abi } from 'viem';
2
- import { TransferType } from '../types/token.js';
3
- import './chains.js';
4
- import 'viem/chains';
5
- import '@crossmint/common-sdk-base';
6
-
7
- type TransferInputParams = {
8
- from: Account;
9
- contract: Address;
10
- to: Address;
11
- config: TransferType;
12
- };
13
- type TransferSimulationParams = {
14
- account: Account;
15
- address: Address;
16
- abi: Abi;
17
- functionName: string;
18
- args: any[];
19
- tokenId?: string;
20
- };
21
- declare function transferParams({ contract, config, from, to }: TransferInputParams): TransferSimulationParams;
22
-
23
- export { transferParams };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-3F6P4HUZ.js";export{a as transferParams};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSWWOVT47cjs = require('../../chunk-SWWOVT47.cjs');require('../../chunk-7AVDZZGD.cjs');require('../../chunk-KYPTGHC6.cjs');require('../../chunk-M4K3IZTT.cjs');exports.EVMSmartWallet = _chunkSWWOVT47cjs.a;
@@ -1,102 +0,0 @@
1
- import { PublicClient, HttpTransport, Address, Abi, ContractFunctionName, ContractFunctionArgs, WriteContractParameters, Hex } from 'viem';
2
- import { CrossmintWalletService } from '../../api/CrossmintWalletService.cjs';
3
- import { g as SmartWalletClient } from '../../service-Ir-Qho-9.cjs';
4
- import { TransferType } from '../../types/token.cjs';
5
- import { SmartWalletChain } from '../chains.cjs';
6
- import { SendTransactionService, SendTransactionOptions } from './SendTransactionService.cjs';
7
- import '@crossmint/client-sdk-base';
8
- import 'permissionless';
9
- import 'permissionless/types/entrypoint';
10
- import '../../types/params.cjs';
11
- import 'viem/chains';
12
- import '@crossmint/common-sdk-base';
13
- import 'zod';
14
- import '@zerodev/sdk';
15
- import 'permissionless/accounts';
16
- import '../../types/schema.cjs';
17
- import '@zerodev/passkey-validator';
18
- import '../../utils/constants.cjs';
19
- import 'permissionless/_types/types';
20
-
21
- /**
22
- * Smart wallet interface for EVM chains enhanced with Crossmint capabilities.
23
- * Core functionality is exposed via [viem](https://viem.sh/) clients within the `client` property of the class.
24
- */
25
- declare class EVMSmartWallet {
26
- private readonly crossmintService;
27
- private readonly sendTransactionService;
28
- readonly chain: SmartWalletChain;
29
- /**
30
- * [viem](https://viem.sh/) clients that provide an interface for core wallet functionality.
31
- */
32
- readonly client: {
33
- /**
34
- * An interface to interact with the smart wallet, execute transactions, sign messages, etc.
35
- */
36
- wallet: SmartWalletClient;
37
- /**
38
- * An interface to read onchain data, fetch transactions, retrieve account balances, etc. Corresponds to public [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) methods.
39
- */
40
- public: PublicClient;
41
- };
42
- constructor(client: {
43
- public: PublicClient<HttpTransport>;
44
- wallet: SmartWalletClient;
45
- }, chain: SmartWalletChain, crossmintService: CrossmintWalletService, sendTransactionService?: SendTransactionService);
46
- /**
47
- * The address of the smart wallet.
48
- */
49
- get address(): `0x${string}`;
50
- /**
51
- * Transfers tokens from the smart wallet to a specified address.
52
- * @param toAddress The recipient's address.
53
- * @param config The transfer configuration, including token details and amount.
54
- * @returns The transaction hash.
55
- * @throws {SmartWalletError} If there's a chain mismatch between this wallet and the input configuration.
56
- * @throws {SendTransactionError} If the transaction fails to send. Contains the error thrown by the viem client.
57
- * @throws {SendTransactionExecutionRevertedError} A subclass of SendTransactionError if the transaction fails due to a contract execution error.
58
- */
59
- transferToken(toAddress: Address, config: TransferType): Promise<string>;
60
- /**
61
- * @returns A list of NFTs owned by the wallet.
62
- */
63
- nfts(): Promise<any>;
64
- /**
65
- * Sends a contract call transaction and returns the hash of a confirmed transaction.
66
- * @param address the address of the contract to be called
67
- * @param abi the ABI of the contract - ***should be defined as a typed variable*** to enable type checking of the contract arguments, see https://viem.sh/docs/typescript#type-inference for guidance
68
- * @param functionName the name of the smart contract function to be called
69
- * @param args the arguments to be passed to the function
70
- * @returns The transaction hash.
71
- * @throws `SendTransactionError` if the transaction fails to send. Contains the error thrown by the viem client.
72
- * @throws `SendTransactionExecutionRevertedError`, a subclass of `SendTransactionError` if the transaction fails due to a contract execution error.
73
- *
74
- * **Passing a typed ABI:**
75
- * @example
76
- * const abi = [{
77
- * "inputs": [
78
- * {
79
- * "internalType": "address",
80
- * "name": "recipient",
81
- * "type": "address"
82
- * },
83
- * ],
84
- * "name": "mintNFT",
85
- * "outputs": [],
86
- * "stateMutability": "nonpayable",
87
- * "type": "function"
88
- * }] as const;
89
- *
90
- * await wallet.executeContract({
91
- * address: contractAddress,
92
- * abi,
93
- * functionName: "mintNFT",
94
- * args: [recipientAddress],
95
- * });
96
- */
97
- executeContract<const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>>({ address, abi, functionName, args, value, config, }: Omit<WriteContractParameters<TAbi, TFunctionName, TArgs>, "chain" | "account"> & {
98
- config?: Partial<SendTransactionOptions>;
99
- }): Promise<Hex>;
100
- }
101
-
102
- export { EVMSmartWallet };
@@ -1,102 +0,0 @@
1
- import { PublicClient, HttpTransport, Address, Abi, ContractFunctionName, ContractFunctionArgs, WriteContractParameters, Hex } from 'viem';
2
- import { CrossmintWalletService } from '../../api/CrossmintWalletService.js';
3
- import { g as SmartWalletClient } from '../../service-DqYCir8s.js';
4
- import { TransferType } from '../../types/token.js';
5
- import { SmartWalletChain } from '../chains.js';
6
- import { SendTransactionService, SendTransactionOptions } from './SendTransactionService.js';
7
- import '@crossmint/client-sdk-base';
8
- import 'permissionless';
9
- import 'permissionless/types/entrypoint';
10
- import '../../types/params.js';
11
- import 'viem/chains';
12
- import '@crossmint/common-sdk-base';
13
- import 'zod';
14
- import '@zerodev/sdk';
15
- import 'permissionless/accounts';
16
- import '../../types/schema.js';
17
- import '@zerodev/passkey-validator';
18
- import '../../utils/constants.js';
19
- import 'permissionless/_types/types';
20
-
21
- /**
22
- * Smart wallet interface for EVM chains enhanced with Crossmint capabilities.
23
- * Core functionality is exposed via [viem](https://viem.sh/) clients within the `client` property of the class.
24
- */
25
- declare class EVMSmartWallet {
26
- private readonly crossmintService;
27
- private readonly sendTransactionService;
28
- readonly chain: SmartWalletChain;
29
- /**
30
- * [viem](https://viem.sh/) clients that provide an interface for core wallet functionality.
31
- */
32
- readonly client: {
33
- /**
34
- * An interface to interact with the smart wallet, execute transactions, sign messages, etc.
35
- */
36
- wallet: SmartWalletClient;
37
- /**
38
- * An interface to read onchain data, fetch transactions, retrieve account balances, etc. Corresponds to public [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) methods.
39
- */
40
- public: PublicClient;
41
- };
42
- constructor(client: {
43
- public: PublicClient<HttpTransport>;
44
- wallet: SmartWalletClient;
45
- }, chain: SmartWalletChain, crossmintService: CrossmintWalletService, sendTransactionService?: SendTransactionService);
46
- /**
47
- * The address of the smart wallet.
48
- */
49
- get address(): `0x${string}`;
50
- /**
51
- * Transfers tokens from the smart wallet to a specified address.
52
- * @param toAddress The recipient's address.
53
- * @param config The transfer configuration, including token details and amount.
54
- * @returns The transaction hash.
55
- * @throws {SmartWalletError} If there's a chain mismatch between this wallet and the input configuration.
56
- * @throws {SendTransactionError} If the transaction fails to send. Contains the error thrown by the viem client.
57
- * @throws {SendTransactionExecutionRevertedError} A subclass of SendTransactionError if the transaction fails due to a contract execution error.
58
- */
59
- transferToken(toAddress: Address, config: TransferType): Promise<string>;
60
- /**
61
- * @returns A list of NFTs owned by the wallet.
62
- */
63
- nfts(): Promise<any>;
64
- /**
65
- * Sends a contract call transaction and returns the hash of a confirmed transaction.
66
- * @param address the address of the contract to be called
67
- * @param abi the ABI of the contract - ***should be defined as a typed variable*** to enable type checking of the contract arguments, see https://viem.sh/docs/typescript#type-inference for guidance
68
- * @param functionName the name of the smart contract function to be called
69
- * @param args the arguments to be passed to the function
70
- * @returns The transaction hash.
71
- * @throws `SendTransactionError` if the transaction fails to send. Contains the error thrown by the viem client.
72
- * @throws `SendTransactionExecutionRevertedError`, a subclass of `SendTransactionError` if the transaction fails due to a contract execution error.
73
- *
74
- * **Passing a typed ABI:**
75
- * @example
76
- * const abi = [{
77
- * "inputs": [
78
- * {
79
- * "internalType": "address",
80
- * "name": "recipient",
81
- * "type": "address"
82
- * },
83
- * ],
84
- * "name": "mintNFT",
85
- * "outputs": [],
86
- * "stateMutability": "nonpayable",
87
- * "type": "function"
88
- * }] as const;
89
- *
90
- * await wallet.executeContract({
91
- * address: contractAddress,
92
- * abi,
93
- * functionName: "mintNFT",
94
- * args: [recipientAddress],
95
- * });
96
- */
97
- executeContract<const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>>({ address, abi, functionName, args, value, config, }: Omit<WriteContractParameters<TAbi, TFunctionName, TArgs>, "chain" | "account"> & {
98
- config?: Partial<SendTransactionOptions>;
99
- }): Promise<Hex>;
100
- }
101
-
102
- export { EVMSmartWallet };
@@ -1 +0,0 @@
1
- import{a}from"../../chunk-ETVJGLNY.js";import"../../chunk-S2XBSAGM.js";import"../../chunk-3F6P4HUZ.js";import"../../chunk-UPURFW46.js";export{a as EVMSmartWallet};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7AVDZZGDcjs = require('../../chunk-7AVDZZGD.cjs');exports.EVMSendTransactionError = _chunk7AVDZZGDcjs.a; exports.EVMSendTransactionExecutionRevertedError = _chunk7AVDZZGDcjs.b; exports.SendTransactionService = _chunk7AVDZZGDcjs.c;
@@ -1,84 +0,0 @@
1
- import * as viem from 'viem';
2
- import { Address, Abi, BaseError, ContractFunctionRevertedError, PublicClient, Transport, Chain, Hex } from 'viem';
3
- import { SmartAccountClient } from 'permissionless';
4
- import { EntryPoint } from 'permissionless/_types/types';
5
- import { SmartAccount } from 'permissionless/accounts';
6
- import { CrossmintSDKError } from '@crossmint/client-sdk-base';
7
-
8
- type TransactionServiceTransactionRequest = {
9
- address: Address;
10
- abi: Abi;
11
- functionName: string;
12
- args: any;
13
- value?: bigint;
14
- };
15
- type SendTransactionFailureStage = "simulation" | "send" | "confirmation" | "execution";
16
- /**
17
- * Error thrown when a transaction fails to send.
18
- * @param viemError The error thrown by the viem client. See https://viem.sh/docs/glossary/errors.html
19
- */
20
- declare class EVMSendTransactionError extends CrossmintSDKError {
21
- readonly viemError: BaseError;
22
- readonly stage: SendTransactionFailureStage;
23
- constructor(message: string, viemError: BaseError, stage: SendTransactionFailureStage, code?: string);
24
- }
25
- /**
26
- * Error thrown when a transaction fails due to a contract execution error.
27
- * @param viemError The error thrown by the viem client. See https://viem.sh/docs/glossary/errors.html
28
- * @param data The name and arguments of the revert error from the provided ABI
29
- * @param reason The revert error if it is a string and not an ABI error
30
- * @example
31
- * try {
32
- * await wallet.executeContract({
33
- * address: contractAddress,
34
- * abi,
35
- * functionName: "mintNFT",
36
- * args: [recipientAddress],
37
- * });
38
- * } catch (e) {
39
- * if (e instanceof SendTransactionExecutionRevertedError) {
40
- * alert(`Transaction reverted: ${e.message}`);
41
- * }
42
- * throw e;
43
- * }
44
- */
45
- declare class EVMSendTransactionExecutionRevertedError extends EVMSendTransactionError {
46
- readonly viemError: BaseError;
47
- readonly txId: string | undefined;
48
- readonly stage: SendTransactionFailureStage;
49
- readonly data: {
50
- abiItem: viem.AbiItem;
51
- args: readonly unknown[] | undefined;
52
- errorName: string;
53
- } | undefined;
54
- readonly reason: string | undefined;
55
- constructor(message: string, viemError: BaseError, revertError: ContractFunctionRevertedError, txId: string | undefined, stage: SendTransactionFailureStage, data?: {
56
- abiItem: viem.AbiItem;
57
- args: readonly unknown[] | undefined;
58
- errorName: string;
59
- } | undefined, reason?: string | undefined);
60
- }
61
- interface SendTransactionOptions {
62
- /**
63
- * The number of confirmations to wait for before yielding the transaction hash.
64
- */
65
- confirmations: number;
66
- /**
67
- * The timeout in milliseconds to wait for a transaction to confirm before throwing an error.
68
- */
69
- transactionConfirmationTimeout: number;
70
- }
71
- declare class SendTransactionService {
72
- private readonly client;
73
- private readonly defaultSendTransactionOptions;
74
- constructor(client: {
75
- public: PublicClient;
76
- wallet: SmartAccountClient<EntryPoint, Transport, Chain, SmartAccount<EntryPoint>>;
77
- }, defaultSendTransactionOptions?: SendTransactionOptions);
78
- sendTransaction(request: TransactionServiceTransactionRequest, config?: Partial<SendTransactionOptions>): Promise<Hex>;
79
- private getConfig;
80
- private handleReceipt;
81
- private simulateCall;
82
- }
83
-
84
- export { EVMSendTransactionError, EVMSendTransactionExecutionRevertedError, type SendTransactionFailureStage, type SendTransactionOptions, SendTransactionService, type TransactionServiceTransactionRequest };
@@ -1,84 +0,0 @@
1
- import * as viem from 'viem';
2
- import { Address, Abi, BaseError, ContractFunctionRevertedError, PublicClient, Transport, Chain, Hex } from 'viem';
3
- import { SmartAccountClient } from 'permissionless';
4
- import { EntryPoint } from 'permissionless/_types/types';
5
- import { SmartAccount } from 'permissionless/accounts';
6
- import { CrossmintSDKError } from '@crossmint/client-sdk-base';
7
-
8
- type TransactionServiceTransactionRequest = {
9
- address: Address;
10
- abi: Abi;
11
- functionName: string;
12
- args: any;
13
- value?: bigint;
14
- };
15
- type SendTransactionFailureStage = "simulation" | "send" | "confirmation" | "execution";
16
- /**
17
- * Error thrown when a transaction fails to send.
18
- * @param viemError The error thrown by the viem client. See https://viem.sh/docs/glossary/errors.html
19
- */
20
- declare class EVMSendTransactionError extends CrossmintSDKError {
21
- readonly viemError: BaseError;
22
- readonly stage: SendTransactionFailureStage;
23
- constructor(message: string, viemError: BaseError, stage: SendTransactionFailureStage, code?: string);
24
- }
25
- /**
26
- * Error thrown when a transaction fails due to a contract execution error.
27
- * @param viemError The error thrown by the viem client. See https://viem.sh/docs/glossary/errors.html
28
- * @param data The name and arguments of the revert error from the provided ABI
29
- * @param reason The revert error if it is a string and not an ABI error
30
- * @example
31
- * try {
32
- * await wallet.executeContract({
33
- * address: contractAddress,
34
- * abi,
35
- * functionName: "mintNFT",
36
- * args: [recipientAddress],
37
- * });
38
- * } catch (e) {
39
- * if (e instanceof SendTransactionExecutionRevertedError) {
40
- * alert(`Transaction reverted: ${e.message}`);
41
- * }
42
- * throw e;
43
- * }
44
- */
45
- declare class EVMSendTransactionExecutionRevertedError extends EVMSendTransactionError {
46
- readonly viemError: BaseError;
47
- readonly txId: string | undefined;
48
- readonly stage: SendTransactionFailureStage;
49
- readonly data: {
50
- abiItem: viem.AbiItem;
51
- args: readonly unknown[] | undefined;
52
- errorName: string;
53
- } | undefined;
54
- readonly reason: string | undefined;
55
- constructor(message: string, viemError: BaseError, revertError: ContractFunctionRevertedError, txId: string | undefined, stage: SendTransactionFailureStage, data?: {
56
- abiItem: viem.AbiItem;
57
- args: readonly unknown[] | undefined;
58
- errorName: string;
59
- } | undefined, reason?: string | undefined);
60
- }
61
- interface SendTransactionOptions {
62
- /**
63
- * The number of confirmations to wait for before yielding the transaction hash.
64
- */
65
- confirmations: number;
66
- /**
67
- * The timeout in milliseconds to wait for a transaction to confirm before throwing an error.
68
- */
69
- transactionConfirmationTimeout: number;
70
- }
71
- declare class SendTransactionService {
72
- private readonly client;
73
- private readonly defaultSendTransactionOptions;
74
- constructor(client: {
75
- public: PublicClient;
76
- wallet: SmartAccountClient<EntryPoint, Transport, Chain, SmartAccount<EntryPoint>>;
77
- }, defaultSendTransactionOptions?: SendTransactionOptions);
78
- sendTransaction(request: TransactionServiceTransactionRequest, config?: Partial<SendTransactionOptions>): Promise<Hex>;
79
- private getConfig;
80
- private handleReceipt;
81
- private simulateCall;
82
- }
83
-
84
- export { EVMSendTransactionError, EVMSendTransactionExecutionRevertedError, type SendTransactionFailureStage, type SendTransactionOptions, SendTransactionService, type TransactionServiceTransactionRequest };
@@ -1 +0,0 @@
1
- import{a,b,c}from"../../chunk-S2XBSAGM.js";export{a as EVMSendTransactionError,b as EVMSendTransactionExecutionRevertedError,c as SendTransactionService};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQQEJPZKNcjs = require('../../../chunk-QQEJPZKN.cjs');require('../../../chunk-N64VSC3H.cjs');require('../../../chunk-QBGECKSZ.cjs');exports.AccountConfigCache = _chunkQQEJPZKNcjs.a;