@crossmint/client-sdk-smart-wallet 0.1.36 → 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-2TPNP5FL.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-2RB6U5DY.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 +2 -7
  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-2ZFSHKM6.js +0 -1
  181. package/dist/chunk-3F6P4HUZ.js +0 -1
  182. package/dist/chunk-4YV6KMFQ.js +0 -1
  183. package/dist/chunk-6ODPWORJ.cjs +0 -1
  184. package/dist/chunk-7AVDZZGD.cjs +0 -1
  185. package/dist/chunk-7G7GOR7X.cjs +0 -1
  186. package/dist/chunk-ATQ4WGCW.js +0 -1
  187. package/dist/chunk-BII7Y2A3.cjs +0 -1
  188. package/dist/chunk-BJZQA5VC.js +0 -1
  189. package/dist/chunk-C3VZY7VJ.js +0 -1
  190. package/dist/chunk-CJBR5TGN.js +0 -3
  191. package/dist/chunk-CUTQYF3F.js +0 -1
  192. package/dist/chunk-D4NDUT36.js +0 -1
  193. package/dist/chunk-DIDKPOO2.cjs +0 -1
  194. package/dist/chunk-EBIEPPSD.js +0 -1
  195. package/dist/chunk-ETVJGLNY.js +0 -1
  196. package/dist/chunk-EVNFELF3.cjs +0 -3
  197. package/dist/chunk-FHNNZVNU.js +0 -1
  198. package/dist/chunk-FWARYLZ3.js +0 -1
  199. package/dist/chunk-GB35YMN4.cjs +0 -1
  200. package/dist/chunk-GGIAHBMC.js +0 -2
  201. package/dist/chunk-H4CMXNVK.js +0 -1
  202. package/dist/chunk-IQTGPM2U.cjs +0 -1
  203. package/dist/chunk-JYW5DCVU.js +0 -1
  204. package/dist/chunk-KCVR32TQ.cjs +0 -1
  205. package/dist/chunk-KREX6Z32.js +0 -1
  206. package/dist/chunk-KROX2DDP.cjs +0 -1
  207. package/dist/chunk-KYPTGHC6.cjs +0 -1
  208. package/dist/chunk-M4K3IZTT.cjs +0 -1
  209. package/dist/chunk-NLGILHJS.js +0 -1
  210. package/dist/chunk-NOTF3PP3.cjs +0 -1
  211. package/dist/chunk-NQUKI27M.cjs +0 -1
  212. package/dist/chunk-O2ACORII.cjs +0 -1
  213. package/dist/chunk-OXRLBURF.js +0 -1
  214. package/dist/chunk-PZ6Q22YJ.js +0 -1
  215. package/dist/chunk-S2XBSAGM.js +0 -1
  216. package/dist/chunk-S4V7TF5V.cjs +0 -2
  217. package/dist/chunk-SCXFZMLR.cjs +0 -1
  218. package/dist/chunk-STH2LE35.cjs +0 -1
  219. package/dist/chunk-SWWOVT47.cjs +0 -1
  220. package/dist/chunk-UG47CBKR.js +0 -1
  221. package/dist/chunk-UPURFW46.js +0 -1
  222. package/dist/chunk-WDKJ6P7K.js +0 -1
  223. package/dist/chunk-WJ6XJMRD.cjs +0 -1
  224. package/dist/chunk-XJGFG3RT.cjs +0 -1
  225. package/dist/chunk-XQ2K2K23.cjs +0 -1
  226. package/dist/chunk-XRZ2XPQM.js +0 -1
  227. package/dist/chunk-YVFO5W3R.cjs +0 -1
  228. package/dist/chunk-Z7AZOEVX.cjs +0 -1
  229. package/dist/chunk-ZQM4FEXV.js +0 -1
  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
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as T}from"./chunk-FWARYLZ3.js";import"./chunk-H4CMXNVK.js";import"./chunk-XRZ2XPQM.js";import"./chunk-JYW5DCVU.js";import"./chunk-NLGILHJS.js";import"./chunk-2ZFSHKM6.js";import"./chunk-ATQ4WGCW.js";import"./chunk-CJBR5TGN.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{a as c}from"./chunk-ETVJGLNY.js";import{a as E,b as p}from"./chunk-S2XBSAGM.js";import"./chunk-WDKJ6P7K.js";import"./chunk-GGIAHBMC.js";import"./chunk-4SPA557P.js";import"./chunk-2RB6U5DY.js";import"./chunk-EBIEPPSD.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-ZQM4FEXV.js";import"./chunk-4YV6KMFQ.js";import{a as r,b as e,c as a,d as o,e as t,f as n,g as s,h as i,i as l,j as m}from"./chunk-UPURFW46.js";import{blockchainToChainId as h,EVMBlockchainIncludingTestnet as x}from"@crossmint/common-sdk-base";import{SmartWalletErrorCode as M,CrossmintSDKError as I,CrossmintServiceError as V,JWTDecryptionError as g,JWTExpiredError as u,JWTIdentifierError as b,JWTInvalidError as D,NotAuthorizedError as J}from"@crossmint/client-sdk-base";export{l as AdminAlreadyUsedError,e as AdminMismatchError,x as Chain,i as ConfigError,I as CrossmintSDKError,V as CrossmintServiceError,E as EVMSendTransactionError,p as EVMSendTransactionExecutionRevertedError,c as EVMSmartWallet,g as JWTDecryptionError,u as JWTExpiredError,b as JWTIdentifierError,D as JWTInvalidError,J as NotAuthorizedError,s as PasskeyIncompatibleAuthenticatorError,a as PasskeyMismatchError,t as PasskeyPromptError,n as PasskeyRegistrationError,r as SmartWalletError,M as SmartWalletErrorCode,T as SmartWalletSDK,m as SmartWalletsNotEnabledError,o as UserWalletAlreadyCreatedError,h as blockchainToChainId};
1
+ import{a as f}from"./chunk-OWZ3LXVG.js";import"./chunk-5T3HB4Y6.js";import"./chunk-4SPA557P.js";import"./chunk-LJ43A5BN.js";import"./chunk-BCWZIVSQ.js";import"./chunk-Z3KARJF5.js";import"./chunk-2MQHIAJE.js";import"./chunk-75JNTS3U.js";import"./chunk-VEZ3PQGX.js";import"./chunk-XLACPZJJ.js";import"./chunk-KVFFSUF4.js";import{a as E}from"./chunk-DB2QM3HB.js";import{a as r,b as a,c as e,d as t,e as n,f as o,g as i,h as l,i as s,j as p,k as m,l as T}from"./chunk-UBRUUSMF.js";import"./chunk-NXTHA2ZL.js";import"./chunk-T5PL4ATW.js";import"./chunk-GGKMZPIA.js";import"./chunk-I5RZI2HB.js";import{blockchainToChainId as h,EVMBlockchainIncludingTestnet as x}from"@crossmint/common-sdk-base";export{x as Chain,E as EVMSmartWallet,a as InvalidApiKeyError,t as InvalidChainError,o as InvalidMessageFormatError,n as InvalidTransferChainError,l as InvalidTypedDataError,i as MessageSigningError,r as SmartWalletError,f as SmartWalletSDK,p as TransactionApprovalError,m as TransactionFailedError,T as TransactionNotFoundError,s as TypedDataSigningError,e as WalletCreationError,h as blockchainToChainId};
package/dist/sdk.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQ6YGAHDRcjs = require('./chunk-Q6YGAHDR.cjs');require('./chunk-D33JIUOQ.cjs');require('./chunk-ODAUWGUU.cjs');require('./chunk-Q23CHZRT.cjs');require('./chunk-SVGKSKZD.cjs');require('./chunk-U2JMKBCC.cjs');require('./chunk-AS5VIM5V.cjs');require('./chunk-23IWY6XV.cjs');require('./chunk-MLTT5BGD.cjs');require('./chunk-5URY3C2T.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-LPLLPZFU.cjs');require('./chunk-73LUJQGU.cjs');require('./chunk-4PMBBA3O.cjs');require('./chunk-EMZ5NAG2.cjs');require('./chunk-KXYDJTZS.cjs');require('./chunk-J5SRLI35.cjs');exports.SmartWalletSDK = _chunkQ6YGAHDRcjs.a;
@@ -1,24 +1,16 @@
1
- import { SmartWalletChain } from './blockchain/chains.js';
2
- import { EVMSmartWallet } from './blockchain/wallets/EVMSmartWallet.js';
3
- import { SmartWalletSDKInitParams, UserParams, WalletParams } from './types/params.js';
4
- import 'viem/chains';
1
+ import { SmartWalletChain } from './evm/chains/index.cjs';
2
+ import { U as UserParams, W as WalletParams, a as EVMSmartWallet, P as PasskeySigner } from './apiService-Dum8A8_6.cjs';
5
3
  import '@crossmint/common-sdk-base';
6
4
  import 'viem';
7
- import './api/CrossmintWalletService.js';
8
5
  import '@crossmint/client-sdk-base';
9
- import 'permissionless';
10
- import 'permissionless/types/entrypoint';
11
- import './service-DqYCir8s.js';
12
- import 'zod';
13
- import '@zerodev/sdk';
14
- import 'permissionless/accounts';
15
- import './types/schema.js';
16
- import '@zerodev/passkey-validator';
17
- import './utils/constants.js';
18
- import './types/token.js';
19
- import './blockchain/wallets/SendTransactionService.js';
20
- import 'permissionless/_types/types';
6
+ import 'ox';
7
+ import './types/api.cjs';
8
+ import './types/transfer.cjs';
9
+ import './evm/smartWalletClient.cjs';
21
10
 
11
+ interface SmartWalletSDKInitParams {
12
+ clientApiKey: string;
13
+ }
22
14
  declare class SmartWalletSDK {
23
15
  private readonly crossmintEnv;
24
16
  private readonly smartWalletService;
@@ -27,9 +19,9 @@ declare class SmartWalletSDK {
27
19
  private constructor();
28
20
  /**
29
21
  * Initializes the SDK with the **client side** API key obtained from the Crossmint console.
30
- * @throws error if the api key is not formatted correctly.
22
+ * @throws {InvalidApiKeyError} if the api key is not formatted correctly.
31
23
  */
32
- static init({ clientApiKey }: SmartWalletSDKInitParams): SmartWalletSDK;
24
+ static init(params: SmartWalletSDKInitParams): SmartWalletSDK;
33
25
  /**
34
26
  * Retrieves or creates a wallet for the specified user.
35
27
  * The default configuration is a `PasskeySigner` with the name, which is displayed to the user during creation or signing prompts, derived from the provided jwt.
@@ -38,10 +30,15 @@ declare class SmartWalletSDK {
38
30
  * ```ts
39
31
  * const wallet = await smartWalletSDK.getOrCreateWallet({ jwt: "xxx" }, "base");
40
32
  * ```
33
+ *
34
+ * @throws {SmartWalletError} if the SDK is used server side.
35
+ * @throws {InvalidChainError} if the chain is not valid.
36
+ * @throws {WalletCreationError} if the wallet creation fails.
41
37
  */
42
- getOrCreateWallet(user: UserParams, chain: SmartWalletChain, walletParams?: WalletParams): Promise<EVMSmartWallet>;
38
+ getOrCreateWallet(user: UserParams, chain: SmartWalletChain, walletParams: WalletParams): Promise<EVMSmartWallet>;
39
+ createPasskeySigner(name: string): Promise<PasskeySigner>;
43
40
  private assertValidChain;
44
41
  private validChain;
45
42
  }
46
43
 
47
- export { SmartWalletSDK };
44
+ export { SmartWalletSDK, type SmartWalletSDKInitParams };
@@ -1,24 +1,16 @@
1
- import { SmartWalletChain } from './blockchain/chains.cjs';
2
- import { EVMSmartWallet } from './blockchain/wallets/EVMSmartWallet.cjs';
3
- import { SmartWalletSDKInitParams, UserParams, WalletParams } from './types/params.cjs';
4
- import 'viem/chains';
1
+ import { SmartWalletChain } from './evm/chains/index.js';
2
+ import { U as UserParams, W as WalletParams, a as EVMSmartWallet, P as PasskeySigner } from './apiService-D4DIxjMr.js';
5
3
  import '@crossmint/common-sdk-base';
6
4
  import 'viem';
7
- import './api/CrossmintWalletService.cjs';
8
5
  import '@crossmint/client-sdk-base';
9
- import 'permissionless';
10
- import 'permissionless/types/entrypoint';
11
- import './service-Ir-Qho-9.cjs';
12
- import 'zod';
13
- import '@zerodev/sdk';
14
- import 'permissionless/accounts';
15
- import './types/schema.cjs';
16
- import '@zerodev/passkey-validator';
17
- import './utils/constants.cjs';
18
- import './types/token.cjs';
19
- import './blockchain/wallets/SendTransactionService.cjs';
20
- import 'permissionless/_types/types';
6
+ import 'ox';
7
+ import './types/api.js';
8
+ import './types/transfer.js';
9
+ import './evm/smartWalletClient.js';
21
10
 
11
+ interface SmartWalletSDKInitParams {
12
+ clientApiKey: string;
13
+ }
22
14
  declare class SmartWalletSDK {
23
15
  private readonly crossmintEnv;
24
16
  private readonly smartWalletService;
@@ -27,9 +19,9 @@ declare class SmartWalletSDK {
27
19
  private constructor();
28
20
  /**
29
21
  * Initializes the SDK with the **client side** API key obtained from the Crossmint console.
30
- * @throws error if the api key is not formatted correctly.
22
+ * @throws {InvalidApiKeyError} if the api key is not formatted correctly.
31
23
  */
32
- static init({ clientApiKey }: SmartWalletSDKInitParams): SmartWalletSDK;
24
+ static init(params: SmartWalletSDKInitParams): SmartWalletSDK;
33
25
  /**
34
26
  * Retrieves or creates a wallet for the specified user.
35
27
  * The default configuration is a `PasskeySigner` with the name, which is displayed to the user during creation or signing prompts, derived from the provided jwt.
@@ -38,10 +30,15 @@ declare class SmartWalletSDK {
38
30
  * ```ts
39
31
  * const wallet = await smartWalletSDK.getOrCreateWallet({ jwt: "xxx" }, "base");
40
32
  * ```
33
+ *
34
+ * @throws {SmartWalletError} if the SDK is used server side.
35
+ * @throws {InvalidChainError} if the chain is not valid.
36
+ * @throws {WalletCreationError} if the wallet creation fails.
41
37
  */
42
- getOrCreateWallet(user: UserParams, chain: SmartWalletChain, walletParams?: WalletParams): Promise<EVMSmartWallet>;
38
+ getOrCreateWallet(user: UserParams, chain: SmartWalletChain, walletParams: WalletParams): Promise<EVMSmartWallet>;
39
+ createPasskeySigner(name: string): Promise<PasskeySigner>;
43
40
  private assertValidChain;
44
41
  private validChain;
45
42
  }
46
43
 
47
- export { SmartWalletSDK };
44
+ export { SmartWalletSDK, type SmartWalletSDKInitParams };
package/dist/sdk.js ADDED
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-OWZ3LXVG.js";import"./chunk-5T3HB4Y6.js";import"./chunk-4SPA557P.js";import"./chunk-LJ43A5BN.js";import"./chunk-BCWZIVSQ.js";import"./chunk-Z3KARJF5.js";import"./chunk-2MQHIAJE.js";import"./chunk-75JNTS3U.js";import"./chunk-VEZ3PQGX.js";import"./chunk-XLACPZJJ.js";import"./chunk-KVFFSUF4.js";import"./chunk-DB2QM3HB.js";import"./chunk-UBRUUSMF.js";import"./chunk-NXTHA2ZL.js";import"./chunk-T5PL4ATW.js";import"./chunk-GGKMZPIA.js";import"./chunk-I5RZI2HB.js";export{a as SmartWalletSDK};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ODAUWGUU.cjs');var _chunk7G7GOR7Xcjs = require('../chunk-7G7GOR7X.cjs');require('../chunk-BII7Y2A3.cjs');exports.scwDatadogLogger = _chunk7G7GOR7Xcjs.b; exports.scwLogger = _chunk7G7GOR7Xcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ODAUWGUU.cjs');var _chunkQ23CHZRTcjs = require('../chunk-Q23CHZRT.cjs');require('../chunk-EMZ5NAG2.cjs');exports.scwDatadogLogger = _chunkQ23CHZRTcjs.b; exports.scwLogger = _chunkQ23CHZRTcjs.a;
@@ -1 +1 @@
1
- import"../chunk-4SPA557P.js";import{a,b}from"../chunk-2RB6U5DY.js";import"../chunk-4YV6KMFQ.js";export{b as scwDatadogLogger,a as scwLogger};
1
+ import"../chunk-4SPA557P.js";import{a,b}from"../chunk-LJ43A5BN.js";import"../chunk-T5PL4ATW.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7G7GOR7Xcjs = require('../chunk-7G7GOR7X.cjs');require('../chunk-BII7Y2A3.cjs');exports.scwDatadogLogger = _chunk7G7GOR7Xcjs.b; exports.scwLogger = _chunk7G7GOR7Xcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQ23CHZRTcjs = require('../chunk-Q23CHZRT.cjs');require('../chunk-EMZ5NAG2.cjs');exports.scwDatadogLogger = _chunkQ23CHZRTcjs.b; exports.scwLogger = _chunkQ23CHZRTcjs.a;
@@ -1 +1 @@
1
- import{a,b}from"../chunk-2RB6U5DY.js";import"../chunk-4YV6KMFQ.js";export{b as scwDatadogLogger,a as scwLogger};
1
+ import{a,b}from"../chunk-LJ43A5BN.js";import"../chunk-T5PL4ATW.js";export{b as scwDatadogLogger,a as scwLogger};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkU2JMKBCCcjs = require('./chunk-U2JMKBCC.cjs');require('./chunk-AS5VIM5V.cjs');require('./chunk-23IWY6XV.cjs');require('./chunk-MLTT5BGD.cjs');require('./chunk-5URY3C2T.cjs');require('./chunk-MFUN74KH.cjs');require('./chunk-LPLLPZFU.cjs');require('./chunk-73LUJQGU.cjs');require('./chunk-4PMBBA3O.cjs');require('./chunk-EMZ5NAG2.cjs');require('./chunk-KXYDJTZS.cjs');require('./chunk-J5SRLI35.cjs');exports.SmartWalletService = _chunkU2JMKBCCcjs.a;
@@ -0,0 +1,9 @@
1
+ import 'viem';
2
+ import 'ox';
3
+ export { E as ExternalSigner, P as PasskeySigner, S as SmartWalletService, U as UserParams, V as ViemAccount, W as WalletParams } from './apiService-Dum8A8_6.cjs';
4
+ import './evm/chains/index.cjs';
5
+ import '@crossmint/common-sdk-base';
6
+ import '@crossmint/client-sdk-base';
7
+ import './types/api.cjs';
8
+ import './types/transfer.cjs';
9
+ import './evm/smartWalletClient.cjs';
@@ -0,0 +1,9 @@
1
+ import 'viem';
2
+ import 'ox';
3
+ export { E as ExternalSigner, P as PasskeySigner, S as SmartWalletService, U as UserParams, V as ViemAccount, W as WalletParams } from './apiService-D4DIxjMr.js';
4
+ import './evm/chains/index.js';
5
+ import '@crossmint/common-sdk-base';
6
+ import '@crossmint/client-sdk-base';
7
+ import './types/api.js';
8
+ import './types/transfer.js';
9
+ import './evm/smartWalletClient.js';
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-Z3KARJF5.js";import"./chunk-2MQHIAJE.js";import"./chunk-75JNTS3U.js";import"./chunk-VEZ3PQGX.js";import"./chunk-XLACPZJJ.js";import"./chunk-KVFFSUF4.js";import"./chunk-DB2QM3HB.js";import"./chunk-UBRUUSMF.js";import"./chunk-NXTHA2ZL.js";import"./chunk-T5PL4ATW.js";import"./chunk-GGKMZPIA.js";import"./chunk-I5RZI2HB.js";export{a as SmartWalletService};
@@ -0,0 +1,195 @@
1
+ import { BlockchainIncludingTestnet } from '@crossmint/common-sdk-base';
2
+ import { Address, Hex, TypedDataDomain, TypedData } from 'viem';
3
+ import { SmartWalletChain } from '../evm/chains/index.cjs';
4
+
5
+ type Signer = `evm-keypair:${Address}` | `evm-passkey:${string}`;
6
+ interface CreateWalletParams {
7
+ type: "evm-smart-wallet";
8
+ config: {
9
+ adminSigner: {
10
+ type: "evm-keypair";
11
+ address: Address;
12
+ } | {
13
+ type: "evm-passkey";
14
+ id: string;
15
+ name: string;
16
+ publicKey: {
17
+ x: Hex;
18
+ y: Hex;
19
+ };
20
+ };
21
+ };
22
+ }
23
+ interface CreateWalletResponse {
24
+ type: "evm-smart-wallet";
25
+ linkedUser: string;
26
+ address: Address;
27
+ config: {
28
+ adminSigner: {
29
+ type: "evm-keypair";
30
+ locator: `evm-keypair:${Address}`;
31
+ address: Address;
32
+ } | {
33
+ type: "evm-passkey";
34
+ locator: `evm-passkey:${string}`;
35
+ id: string;
36
+ name: string;
37
+ publicKey: {
38
+ x: Hex;
39
+ y: Hex;
40
+ };
41
+ validatorContractVersion: string;
42
+ };
43
+ };
44
+ }
45
+ interface TransactionCall {
46
+ to: Address;
47
+ value: string;
48
+ data: Hex;
49
+ }
50
+ interface CreateTransactionParams {
51
+ params: {
52
+ signer: Signer;
53
+ chain: SmartWalletChain;
54
+ calls: TransactionCall[];
55
+ };
56
+ }
57
+ interface TransactionResponse {
58
+ id: string;
59
+ walletType: "evm-smart-wallet";
60
+ status: "awaiting-approval" | "pending" | "failed" | "success";
61
+ approvals: {
62
+ pending: {
63
+ message: Hex;
64
+ signer: Signer;
65
+ }[];
66
+ submitted: {
67
+ message: Hex;
68
+ signature: Hex;
69
+ signer: Signer;
70
+ }[];
71
+ };
72
+ onChain: {
73
+ userOperationHash: Hex;
74
+ txId?: Hex;
75
+ };
76
+ error?: {
77
+ message: string;
78
+ reason: "execution_reverted";
79
+ revert: {
80
+ type: "contract_call" | "wallet_authorization" | "wallet_deployment";
81
+ reason: string;
82
+ reasonData?: string;
83
+ explorerLink?: string;
84
+ simulationLink?: string;
85
+ };
86
+ };
87
+ }
88
+ type Approval = {
89
+ signer: `evm-keypair:${Address}`;
90
+ signature: Hex;
91
+ } | {
92
+ signer: `evm-passkey:${string}`;
93
+ signature: {
94
+ r: Hex;
95
+ s: Hex;
96
+ };
97
+ metadata: {
98
+ authenticatorData: Hex;
99
+ challengeIndex: number;
100
+ clientDataJSON: string;
101
+ typeIndex: number;
102
+ userVerificationRequired: boolean;
103
+ };
104
+ };
105
+ interface ApproveTransactionParams {
106
+ approvals: Approval[];
107
+ }
108
+ type CreateSignatureParams = {
109
+ type: "evm-message";
110
+ params: {
111
+ message: string;
112
+ signer: Signer;
113
+ chain: SmartWalletChain;
114
+ };
115
+ } | {
116
+ type: "evm-typed-data";
117
+ params: {
118
+ chain: SmartWalletChain;
119
+ signer: Signer;
120
+ isSmartWalletSignature: boolean;
121
+ typedData: {
122
+ domain: TypedDataDomain;
123
+ message: Record<string, unknown>;
124
+ primaryType: string;
125
+ types: TypedData;
126
+ };
127
+ };
128
+ };
129
+ interface SignatureResponseBase {
130
+ id: string;
131
+ walletType: "evm-smart-wallet";
132
+ status: "awaiting-approval" | "pending" | "failed" | "success";
133
+ approvals: {
134
+ pending: {
135
+ signer: Signer;
136
+ message: Hex;
137
+ }[];
138
+ submitted: {
139
+ signer: Signer;
140
+ signature: Hex;
141
+ message: Hex;
142
+ }[];
143
+ };
144
+ createdAt: string;
145
+ }
146
+ interface ApproveSignatureParams {
147
+ approvals: Approval[];
148
+ }
149
+ interface SignatureResponseMessage extends SignatureResponseBase {
150
+ type: "evm-message";
151
+ params: {
152
+ message: string;
153
+ signer: Signer;
154
+ chain: SmartWalletChain;
155
+ };
156
+ }
157
+ interface SignatureResponseTypedData extends SignatureResponseBase {
158
+ type: "evm-typed-data";
159
+ params: {
160
+ chain: SmartWalletChain;
161
+ signer: Signer;
162
+ isSmartWalletSignature: boolean;
163
+ typedData: {
164
+ domain: TypedDataDomain;
165
+ message: Record<string, unknown>;
166
+ primaryType: string;
167
+ types: Record<string, unknown>;
168
+ };
169
+ };
170
+ }
171
+ type SignatureResponse = SignatureResponseMessage | SignatureResponseTypedData;
172
+ type NftResponse = {
173
+ chain: BlockchainIncludingTestnet;
174
+ contractAddress: Address;
175
+ tokenId: string;
176
+ metadata: {
177
+ attributes: {
178
+ display_type: string | null;
179
+ trait_type: string;
180
+ value: string;
181
+ }[];
182
+ collection: unknown;
183
+ description: string;
184
+ image: string;
185
+ animation_url: string | null;
186
+ name: string;
187
+ };
188
+ subscription?: {
189
+ expiresAt: string;
190
+ };
191
+ locator: string;
192
+ tokenStandard: string;
193
+ }[];
194
+
195
+ export type { ApproveSignatureParams, ApproveTransactionParams, CreateSignatureParams, CreateTransactionParams, CreateWalletParams, CreateWalletResponse, NftResponse, SignatureResponse, SignatureResponseMessage, SignatureResponseTypedData, Signer, TransactionResponse };
@@ -0,0 +1,195 @@
1
+ import { BlockchainIncludingTestnet } from '@crossmint/common-sdk-base';
2
+ import { Address, Hex, TypedDataDomain, TypedData } from 'viem';
3
+ import { SmartWalletChain } from '../evm/chains/index.js';
4
+
5
+ type Signer = `evm-keypair:${Address}` | `evm-passkey:${string}`;
6
+ interface CreateWalletParams {
7
+ type: "evm-smart-wallet";
8
+ config: {
9
+ adminSigner: {
10
+ type: "evm-keypair";
11
+ address: Address;
12
+ } | {
13
+ type: "evm-passkey";
14
+ id: string;
15
+ name: string;
16
+ publicKey: {
17
+ x: Hex;
18
+ y: Hex;
19
+ };
20
+ };
21
+ };
22
+ }
23
+ interface CreateWalletResponse {
24
+ type: "evm-smart-wallet";
25
+ linkedUser: string;
26
+ address: Address;
27
+ config: {
28
+ adminSigner: {
29
+ type: "evm-keypair";
30
+ locator: `evm-keypair:${Address}`;
31
+ address: Address;
32
+ } | {
33
+ type: "evm-passkey";
34
+ locator: `evm-passkey:${string}`;
35
+ id: string;
36
+ name: string;
37
+ publicKey: {
38
+ x: Hex;
39
+ y: Hex;
40
+ };
41
+ validatorContractVersion: string;
42
+ };
43
+ };
44
+ }
45
+ interface TransactionCall {
46
+ to: Address;
47
+ value: string;
48
+ data: Hex;
49
+ }
50
+ interface CreateTransactionParams {
51
+ params: {
52
+ signer: Signer;
53
+ chain: SmartWalletChain;
54
+ calls: TransactionCall[];
55
+ };
56
+ }
57
+ interface TransactionResponse {
58
+ id: string;
59
+ walletType: "evm-smart-wallet";
60
+ status: "awaiting-approval" | "pending" | "failed" | "success";
61
+ approvals: {
62
+ pending: {
63
+ message: Hex;
64
+ signer: Signer;
65
+ }[];
66
+ submitted: {
67
+ message: Hex;
68
+ signature: Hex;
69
+ signer: Signer;
70
+ }[];
71
+ };
72
+ onChain: {
73
+ userOperationHash: Hex;
74
+ txId?: Hex;
75
+ };
76
+ error?: {
77
+ message: string;
78
+ reason: "execution_reverted";
79
+ revert: {
80
+ type: "contract_call" | "wallet_authorization" | "wallet_deployment";
81
+ reason: string;
82
+ reasonData?: string;
83
+ explorerLink?: string;
84
+ simulationLink?: string;
85
+ };
86
+ };
87
+ }
88
+ type Approval = {
89
+ signer: `evm-keypair:${Address}`;
90
+ signature: Hex;
91
+ } | {
92
+ signer: `evm-passkey:${string}`;
93
+ signature: {
94
+ r: Hex;
95
+ s: Hex;
96
+ };
97
+ metadata: {
98
+ authenticatorData: Hex;
99
+ challengeIndex: number;
100
+ clientDataJSON: string;
101
+ typeIndex: number;
102
+ userVerificationRequired: boolean;
103
+ };
104
+ };
105
+ interface ApproveTransactionParams {
106
+ approvals: Approval[];
107
+ }
108
+ type CreateSignatureParams = {
109
+ type: "evm-message";
110
+ params: {
111
+ message: string;
112
+ signer: Signer;
113
+ chain: SmartWalletChain;
114
+ };
115
+ } | {
116
+ type: "evm-typed-data";
117
+ params: {
118
+ chain: SmartWalletChain;
119
+ signer: Signer;
120
+ isSmartWalletSignature: boolean;
121
+ typedData: {
122
+ domain: TypedDataDomain;
123
+ message: Record<string, unknown>;
124
+ primaryType: string;
125
+ types: TypedData;
126
+ };
127
+ };
128
+ };
129
+ interface SignatureResponseBase {
130
+ id: string;
131
+ walletType: "evm-smart-wallet";
132
+ status: "awaiting-approval" | "pending" | "failed" | "success";
133
+ approvals: {
134
+ pending: {
135
+ signer: Signer;
136
+ message: Hex;
137
+ }[];
138
+ submitted: {
139
+ signer: Signer;
140
+ signature: Hex;
141
+ message: Hex;
142
+ }[];
143
+ };
144
+ createdAt: string;
145
+ }
146
+ interface ApproveSignatureParams {
147
+ approvals: Approval[];
148
+ }
149
+ interface SignatureResponseMessage extends SignatureResponseBase {
150
+ type: "evm-message";
151
+ params: {
152
+ message: string;
153
+ signer: Signer;
154
+ chain: SmartWalletChain;
155
+ };
156
+ }
157
+ interface SignatureResponseTypedData extends SignatureResponseBase {
158
+ type: "evm-typed-data";
159
+ params: {
160
+ chain: SmartWalletChain;
161
+ signer: Signer;
162
+ isSmartWalletSignature: boolean;
163
+ typedData: {
164
+ domain: TypedDataDomain;
165
+ message: Record<string, unknown>;
166
+ primaryType: string;
167
+ types: Record<string, unknown>;
168
+ };
169
+ };
170
+ }
171
+ type SignatureResponse = SignatureResponseMessage | SignatureResponseTypedData;
172
+ type NftResponse = {
173
+ chain: BlockchainIncludingTestnet;
174
+ contractAddress: Address;
175
+ tokenId: string;
176
+ metadata: {
177
+ attributes: {
178
+ display_type: string | null;
179
+ trait_type: string;
180
+ value: string;
181
+ }[];
182
+ collection: unknown;
183
+ description: string;
184
+ image: string;
185
+ animation_url: string | null;
186
+ name: string;
187
+ };
188
+ subscription?: {
189
+ expiresAt: string;
190
+ };
191
+ locator: string;
192
+ tokenStandard: string;
193
+ }[];
194
+
195
+ export type { ApproveSignatureParams, ApproveTransactionParams, CreateSignatureParams, CreateTransactionParams, CreateWalletParams, CreateWalletResponse, NftResponse, SignatureResponse, SignatureResponseMessage, SignatureResponseTypedData, Signer, TransactionResponse };
@@ -0,0 +1,46 @@
1
+ import { Address, Abi } from 'viem';
2
+ import { SmartWalletChain } from '../evm/chains/index.cjs';
3
+ import '@crossmint/common-sdk-base';
4
+
5
+ interface EVMToken {
6
+ chain: SmartWalletChain;
7
+ contractAddress: Address;
8
+ }
9
+ interface NFTEVMToken extends EVMToken {
10
+ tokenId: string;
11
+ type: "nft";
12
+ }
13
+ interface SFTEVMToken extends EVMToken {
14
+ tokenId: string;
15
+ type: "sft";
16
+ }
17
+ interface ERC2OEVMToken extends EVMToken {
18
+ type: "ft";
19
+ }
20
+ interface ERC20TransferType {
21
+ token: ERC2OEVMToken;
22
+ amount: bigint;
23
+ }
24
+ interface SFTTransferType {
25
+ token: SFTEVMToken;
26
+ quantity: number;
27
+ }
28
+ interface NFTTransferType {
29
+ token: NFTEVMToken;
30
+ }
31
+ type TransferType = ERC20TransferType | SFTTransferType | NFTTransferType;
32
+ interface TransferInputParams {
33
+ from: Address;
34
+ contract: Address;
35
+ to: Address;
36
+ config: TransferType;
37
+ }
38
+ interface TransferSimulationParams {
39
+ address: Address;
40
+ abi: Abi;
41
+ functionName: string;
42
+ args: unknown[];
43
+ tokenId?: string;
44
+ }
45
+
46
+ export type { ERC20TransferType, NFTTransferType, SFTTransferType, TransferInputParams, TransferSimulationParams, TransferType };
@@ -0,0 +1,46 @@
1
+ import { Address, Abi } from 'viem';
2
+ import { SmartWalletChain } from '../evm/chains/index.js';
3
+ import '@crossmint/common-sdk-base';
4
+
5
+ interface EVMToken {
6
+ chain: SmartWalletChain;
7
+ contractAddress: Address;
8
+ }
9
+ interface NFTEVMToken extends EVMToken {
10
+ tokenId: string;
11
+ type: "nft";
12
+ }
13
+ interface SFTEVMToken extends EVMToken {
14
+ tokenId: string;
15
+ type: "sft";
16
+ }
17
+ interface ERC2OEVMToken extends EVMToken {
18
+ type: "ft";
19
+ }
20
+ interface ERC20TransferType {
21
+ token: ERC2OEVMToken;
22
+ amount: bigint;
23
+ }
24
+ interface SFTTransferType {
25
+ token: SFTEVMToken;
26
+ quantity: number;
27
+ }
28
+ interface NFTTransferType {
29
+ token: NFTEVMToken;
30
+ }
31
+ type TransferType = ERC20TransferType | SFTTransferType | NFTTransferType;
32
+ interface TransferInputParams {
33
+ from: Address;
34
+ contract: Address;
35
+ to: Address;
36
+ config: TransferType;
37
+ }
38
+ interface TransferSimulationParams {
39
+ address: Address;
40
+ abi: Abi;
41
+ functionName: string;
42
+ args: unknown[];
43
+ tokenId?: string;
44
+ }
45
+
46
+ export type { ERC20TransferType, NFTTransferType, SFTTransferType, TransferInputParams, TransferSimulationParams, TransferType };