@sudobility/contracts 0.14.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 (322) hide show
  1. package/README.md +353 -0
  2. package/artifacts/contracts/Mailer.sol/Mailer.d.ts +1146 -0
  3. package/artifacts/contracts/Mailer.sol/Mailer.dbg.json +4 -0
  4. package/artifacts/contracts/Mailer.sol/Mailer.json +1096 -0
  5. package/artifacts/contracts/Mailer.sol/artifacts.d.ts +21 -0
  6. package/artifacts/contracts/MockUSDC.sol/MockUSDC.d.ts +284 -0
  7. package/artifacts/contracts/MockUSDC.sol/MockUSDC.dbg.json +4 -0
  8. package/artifacts/contracts/MockUSDC.sol/MockUSDC.json +234 -0
  9. package/artifacts/contracts/MockUSDC.sol/artifacts.d.ts +21 -0
  10. package/artifacts/contracts/interfaces/IERC20.sol/IERC20.d.ts +157 -0
  11. package/artifacts/contracts/interfaces/IERC20.sol/IERC20.dbg.json +4 -0
  12. package/artifacts/contracts/interfaces/IERC20.sol/IERC20.json +107 -0
  13. package/artifacts/contracts/interfaces/IERC20.sol/artifacts.d.ts +21 -0
  14. package/dist/evm/src/evm/index.d.ts +4 -0
  15. package/dist/evm/src/evm/index.d.ts.map +1 -0
  16. package/dist/evm/src/evm/index.js +10 -0
  17. package/dist/evm/src/evm/index.js.map +1 -0
  18. package/dist/evm/src/evm/mailer-client.d.ts +966 -0
  19. package/dist/evm/src/evm/mailer-client.d.ts.map +1 -0
  20. package/dist/evm/src/evm/mailer-client.js +619 -0
  21. package/dist/evm/src/evm/mailer-client.js.map +1 -0
  22. package/dist/evm/typechain-types/Mailer.d.ts +698 -0
  23. package/dist/evm/typechain-types/Mailer.d.ts.map +1 -0
  24. package/dist/evm/typechain-types/Mailer.js +3 -0
  25. package/dist/evm/typechain-types/Mailer.js.map +1 -0
  26. package/dist/evm/typechain-types/MockUSDC.d.ts +118 -0
  27. package/dist/evm/typechain-types/MockUSDC.d.ts.map +1 -0
  28. package/dist/evm/typechain-types/MockUSDC.js +3 -0
  29. package/dist/evm/typechain-types/MockUSDC.js.map +1 -0
  30. package/dist/evm/typechain-types/common.d.ts +51 -0
  31. package/dist/evm/typechain-types/common.d.ts.map +1 -0
  32. package/dist/evm/typechain-types/common.js +3 -0
  33. package/dist/evm/typechain-types/common.js.map +1 -0
  34. package/dist/evm/typechain-types/factories/Mailer__factory.d.ts +875 -0
  35. package/dist/evm/typechain-types/factories/Mailer__factory.d.ts.map +1 -0
  36. package/dist/evm/typechain-types/factories/Mailer__factory.js +1125 -0
  37. package/dist/evm/typechain-types/factories/Mailer__factory.js.map +1 -0
  38. package/dist/evm/typechain-types/factories/MockUSDC__factory.d.ts +193 -0
  39. package/dist/evm/typechain-types/factories/MockUSDC__factory.d.ts.map +1 -0
  40. package/dist/evm/typechain-types/factories/MockUSDC__factory.js +263 -0
  41. package/dist/evm/typechain-types/factories/MockUSDC__factory.js.map +1 -0
  42. package/dist/evm/typechain-types/factories/index.d.ts +4 -0
  43. package/dist/evm/typechain-types/factories/index.d.ts.map +1 -0
  44. package/dist/evm/typechain-types/factories/index.js +45 -0
  45. package/dist/evm/typechain-types/factories/index.js.map +1 -0
  46. package/dist/evm/typechain-types/factories/interfaces/IERC20__factory.d.ts +80 -0
  47. package/dist/evm/typechain-types/factories/interfaces/IERC20__factory.d.ts.map +1 -0
  48. package/dist/evm/typechain-types/factories/interfaces/IERC20__factory.js +116 -0
  49. package/dist/evm/typechain-types/factories/interfaces/IERC20__factory.js.map +1 -0
  50. package/dist/evm/typechain-types/factories/interfaces/index.d.ts +2 -0
  51. package/dist/evm/typechain-types/factories/interfaces/index.d.ts.map +1 -0
  52. package/dist/evm/typechain-types/factories/interfaces/index.js +9 -0
  53. package/dist/evm/typechain-types/factories/interfaces/index.js.map +1 -0
  54. package/dist/evm/typechain-types/index.d.ts +10 -0
  55. package/dist/evm/typechain-types/index.d.ts.map +1 -0
  56. package/dist/evm/typechain-types/index.js +44 -0
  57. package/dist/evm/typechain-types/index.js.map +1 -0
  58. package/dist/evm/typechain-types/interfaces/IERC20.d.ts +70 -0
  59. package/dist/evm/typechain-types/interfaces/IERC20.d.ts.map +1 -0
  60. package/dist/evm/typechain-types/interfaces/IERC20.js +3 -0
  61. package/dist/evm/typechain-types/interfaces/IERC20.js.map +1 -0
  62. package/dist/evm/typechain-types/interfaces/index.d.ts +2 -0
  63. package/dist/evm/typechain-types/interfaces/index.d.ts.map +1 -0
  64. package/dist/evm/typechain-types/interfaces/index.js +3 -0
  65. package/dist/evm/typechain-types/interfaces/index.js.map +1 -0
  66. package/dist/solana/solana/index.d.ts +3 -0
  67. package/dist/solana/solana/index.d.ts.map +1 -0
  68. package/dist/solana/solana/index.js +21 -0
  69. package/dist/solana/solana/index.js.map +1 -0
  70. package/dist/solana/solana/mailer-client.d.ts +282 -0
  71. package/dist/solana/solana/mailer-client.d.ts.map +1 -0
  72. package/dist/solana/solana/mailer-client.js +989 -0
  73. package/dist/solana/solana/mailer-client.js.map +1 -0
  74. package/dist/solana/solana/types.d.ts +28 -0
  75. package/dist/solana/solana/types.d.ts.map +1 -0
  76. package/dist/solana/solana/types.js +23 -0
  77. package/dist/solana/solana/types.js.map +1 -0
  78. package/dist/solana/utils/currency.d.ts +26 -0
  79. package/dist/solana/utils/currency.d.ts.map +1 -0
  80. package/dist/solana/utils/currency.js +36 -0
  81. package/dist/solana/utils/currency.js.map +1 -0
  82. package/dist/unified/package.json +3 -0
  83. package/dist/unified/src/evm/index.d.ts +4 -0
  84. package/dist/unified/src/evm/index.d.ts.map +1 -0
  85. package/dist/unified/src/evm/index.js +10 -0
  86. package/dist/unified/src/evm/index.js.map +1 -0
  87. package/dist/unified/src/evm/mailer-client.d.ts +966 -0
  88. package/dist/unified/src/evm/mailer-client.d.ts.map +1 -0
  89. package/dist/unified/src/evm/mailer-client.js +619 -0
  90. package/dist/unified/src/evm/mailer-client.js.map +1 -0
  91. package/dist/unified/src/react/context/MailerProvider.d.ts +102 -0
  92. package/dist/unified/src/react/context/MailerProvider.d.ts.map +1 -0
  93. package/dist/unified/src/react/context/MailerProvider.js +160 -0
  94. package/dist/unified/src/react/context/MailerProvider.js.map +1 -0
  95. package/dist/unified/src/react/hooks/useMailerMutations.d.ts +301 -0
  96. package/dist/unified/src/react/hooks/useMailerMutations.d.ts.map +1 -0
  97. package/dist/unified/src/react/hooks/useMailerMutations.js +417 -0
  98. package/dist/unified/src/react/hooks/useMailerMutations.js.map +1 -0
  99. package/dist/unified/src/react/hooks/useMailerQueries.d.ts +130 -0
  100. package/dist/unified/src/react/hooks/useMailerQueries.d.ts.map +1 -0
  101. package/dist/unified/src/react/hooks/useMailerQueries.js +197 -0
  102. package/dist/unified/src/react/hooks/useMailerQueries.js.map +1 -0
  103. package/dist/unified/src/react/index.d.ts +37 -0
  104. package/dist/unified/src/react/index.d.ts.map +1 -0
  105. package/dist/unified/src/react/index.js +70 -0
  106. package/dist/unified/src/react/index.js.map +1 -0
  107. package/dist/unified/src/solana/index.d.ts +3 -0
  108. package/dist/unified/src/solana/index.d.ts.map +1 -0
  109. package/dist/unified/src/solana/index.js +21 -0
  110. package/dist/unified/src/solana/index.js.map +1 -0
  111. package/dist/unified/src/solana/mailer-client.d.ts +282 -0
  112. package/dist/unified/src/solana/mailer-client.d.ts.map +1 -0
  113. package/dist/unified/src/solana/mailer-client.js +989 -0
  114. package/dist/unified/src/solana/mailer-client.js.map +1 -0
  115. package/dist/unified/src/solana/types.d.ts +28 -0
  116. package/dist/unified/src/solana/types.d.ts.map +1 -0
  117. package/dist/unified/src/solana/types.js +23 -0
  118. package/dist/unified/src/solana/types.js.map +1 -0
  119. package/dist/unified/src/unified/index.d.ts +4 -0
  120. package/dist/unified/src/unified/index.d.ts.map +1 -0
  121. package/dist/unified/src/unified/index.js +9 -0
  122. package/dist/unified/src/unified/index.js.map +1 -0
  123. package/dist/unified/src/unified/onchain-mailer-client.d.ts +173 -0
  124. package/dist/unified/src/unified/onchain-mailer-client.d.ts.map +1 -0
  125. package/dist/unified/src/unified/onchain-mailer-client.js +1048 -0
  126. package/dist/unified/src/unified/onchain-mailer-client.js.map +1 -0
  127. package/dist/unified/src/unified/types.d.ts +47 -0
  128. package/dist/unified/src/unified/types.d.ts.map +1 -0
  129. package/dist/unified/src/unified/types.js +3 -0
  130. package/dist/unified/src/unified/types.js.map +1 -0
  131. package/dist/unified/src/unified/wallet-detector.d.ts +28 -0
  132. package/dist/unified/src/unified/wallet-detector.d.ts.map +1 -0
  133. package/dist/unified/src/unified/wallet-detector.js +63 -0
  134. package/dist/unified/src/unified/wallet-detector.js.map +1 -0
  135. package/dist/unified/src/utils/chain-config.d.ts +75 -0
  136. package/dist/unified/src/utils/chain-config.d.ts.map +1 -0
  137. package/dist/unified/src/utils/chain-config.js +203 -0
  138. package/dist/unified/src/utils/chain-config.js.map +1 -0
  139. package/dist/unified/src/utils/currency.d.ts +26 -0
  140. package/dist/unified/src/utils/currency.d.ts.map +1 -0
  141. package/dist/unified/src/utils/currency.js +36 -0
  142. package/dist/unified/src/utils/currency.js.map +1 -0
  143. package/dist/unified/src/utils/index.d.ts +4 -0
  144. package/dist/unified/src/utils/index.d.ts.map +1 -0
  145. package/dist/unified/src/utils/index.js +20 -0
  146. package/dist/unified/src/utils/index.js.map +1 -0
  147. package/dist/unified/src/utils/validation.d.ts +10 -0
  148. package/dist/unified/src/utils/validation.d.ts.map +1 -0
  149. package/dist/unified/src/utils/validation.js +102 -0
  150. package/dist/unified/src/utils/validation.js.map +1 -0
  151. package/dist/unified/typechain-types/Mailer.d.ts +698 -0
  152. package/dist/unified/typechain-types/Mailer.d.ts.map +1 -0
  153. package/dist/unified/typechain-types/Mailer.js +3 -0
  154. package/dist/unified/typechain-types/Mailer.js.map +1 -0
  155. package/dist/unified/typechain-types/MockUSDC.d.ts +118 -0
  156. package/dist/unified/typechain-types/MockUSDC.d.ts.map +1 -0
  157. package/dist/unified/typechain-types/MockUSDC.js +3 -0
  158. package/dist/unified/typechain-types/MockUSDC.js.map +1 -0
  159. package/dist/unified/typechain-types/common.d.ts +51 -0
  160. package/dist/unified/typechain-types/common.d.ts.map +1 -0
  161. package/dist/unified/typechain-types/common.js +3 -0
  162. package/dist/unified/typechain-types/common.js.map +1 -0
  163. package/dist/unified/typechain-types/factories/Mailer__factory.d.ts +875 -0
  164. package/dist/unified/typechain-types/factories/Mailer__factory.d.ts.map +1 -0
  165. package/dist/unified/typechain-types/factories/Mailer__factory.js +1125 -0
  166. package/dist/unified/typechain-types/factories/Mailer__factory.js.map +1 -0
  167. package/dist/unified/typechain-types/factories/MockUSDC__factory.d.ts +193 -0
  168. package/dist/unified/typechain-types/factories/MockUSDC__factory.d.ts.map +1 -0
  169. package/dist/unified/typechain-types/factories/MockUSDC__factory.js +263 -0
  170. package/dist/unified/typechain-types/factories/MockUSDC__factory.js.map +1 -0
  171. package/dist/unified/typechain-types/factories/index.d.ts +4 -0
  172. package/dist/unified/typechain-types/factories/index.d.ts.map +1 -0
  173. package/dist/unified/typechain-types/factories/index.js +45 -0
  174. package/dist/unified/typechain-types/factories/index.js.map +1 -0
  175. package/dist/unified/typechain-types/factories/interfaces/IERC20__factory.d.ts +80 -0
  176. package/dist/unified/typechain-types/factories/interfaces/IERC20__factory.d.ts.map +1 -0
  177. package/dist/unified/typechain-types/factories/interfaces/IERC20__factory.js +116 -0
  178. package/dist/unified/typechain-types/factories/interfaces/IERC20__factory.js.map +1 -0
  179. package/dist/unified/typechain-types/factories/interfaces/index.d.ts +2 -0
  180. package/dist/unified/typechain-types/factories/interfaces/index.d.ts.map +1 -0
  181. package/dist/unified/typechain-types/factories/interfaces/index.js +9 -0
  182. package/dist/unified/typechain-types/factories/interfaces/index.js.map +1 -0
  183. package/dist/unified/typechain-types/index.d.ts +10 -0
  184. package/dist/unified/typechain-types/index.d.ts.map +1 -0
  185. package/dist/unified/typechain-types/index.js +44 -0
  186. package/dist/unified/typechain-types/index.js.map +1 -0
  187. package/dist/unified/typechain-types/interfaces/IERC20.d.ts +70 -0
  188. package/dist/unified/typechain-types/interfaces/IERC20.d.ts.map +1 -0
  189. package/dist/unified/typechain-types/interfaces/IERC20.js +3 -0
  190. package/dist/unified/typechain-types/interfaces/IERC20.js.map +1 -0
  191. package/dist/unified/typechain-types/interfaces/index.d.ts +2 -0
  192. package/dist/unified/typechain-types/interfaces/index.d.ts.map +1 -0
  193. package/dist/unified/typechain-types/interfaces/index.js +3 -0
  194. package/dist/unified/typechain-types/interfaces/index.js.map +1 -0
  195. package/dist/unified-esm/src/evm/index.d.ts +4 -0
  196. package/dist/unified-esm/src/evm/index.d.ts.map +1 -0
  197. package/dist/unified-esm/src/evm/index.js +5 -0
  198. package/dist/unified-esm/src/evm/index.js.map +1 -0
  199. package/dist/unified-esm/src/evm/mailer-client.d.ts +966 -0
  200. package/dist/unified-esm/src/evm/mailer-client.d.ts.map +1 -0
  201. package/dist/unified-esm/src/evm/mailer-client.js +615 -0
  202. package/dist/unified-esm/src/evm/mailer-client.js.map +1 -0
  203. package/dist/unified-esm/src/react/context/MailerProvider.d.ts +102 -0
  204. package/dist/unified-esm/src/react/context/MailerProvider.d.ts.map +1 -0
  205. package/dist/unified-esm/src/react/context/MailerProvider.js +120 -0
  206. package/dist/unified-esm/src/react/context/MailerProvider.js.map +1 -0
  207. package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts +301 -0
  208. package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts.map +1 -0
  209. package/dist/unified-esm/src/react/hooks/useMailerMutations.js +400 -0
  210. package/dist/unified-esm/src/react/hooks/useMailerMutations.js.map +1 -0
  211. package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts +130 -0
  212. package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts.map +1 -0
  213. package/dist/unified-esm/src/react/hooks/useMailerQueries.js +186 -0
  214. package/dist/unified-esm/src/react/hooks/useMailerQueries.js.map +1 -0
  215. package/dist/unified-esm/src/react/index.d.ts +37 -0
  216. package/dist/unified-esm/src/react/index.d.ts.map +1 -0
  217. package/dist/unified-esm/src/react/index.js +39 -0
  218. package/dist/unified-esm/src/react/index.js.map +1 -0
  219. package/dist/unified-esm/src/solana/index.d.ts +3 -0
  220. package/dist/unified-esm/src/solana/index.d.ts.map +1 -0
  221. package/dist/unified-esm/src/solana/index.js +3 -0
  222. package/dist/unified-esm/src/solana/index.js.map +1 -0
  223. package/dist/unified-esm/src/solana/mailer-client.d.ts +282 -0
  224. package/dist/unified-esm/src/solana/mailer-client.d.ts.map +1 -0
  225. package/dist/unified-esm/src/solana/mailer-client.js +985 -0
  226. package/dist/unified-esm/src/solana/mailer-client.js.map +1 -0
  227. package/dist/unified-esm/src/solana/types.d.ts +28 -0
  228. package/dist/unified-esm/src/solana/types.d.ts.map +1 -0
  229. package/dist/unified-esm/src/solana/types.js +16 -0
  230. package/dist/unified-esm/src/solana/types.js.map +1 -0
  231. package/dist/unified-esm/src/unified/index.d.ts +4 -0
  232. package/dist/unified-esm/src/unified/index.d.ts.map +1 -0
  233. package/dist/unified-esm/src/unified/index.js +4 -0
  234. package/dist/unified-esm/src/unified/index.js.map +1 -0
  235. package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts +173 -0
  236. package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts.map +1 -0
  237. package/dist/unified-esm/src/unified/onchain-mailer-client.js +1011 -0
  238. package/dist/unified-esm/src/unified/onchain-mailer-client.js.map +1 -0
  239. package/dist/unified-esm/src/unified/types.d.ts +47 -0
  240. package/dist/unified-esm/src/unified/types.d.ts.map +1 -0
  241. package/dist/unified-esm/src/unified/types.js +2 -0
  242. package/dist/unified-esm/src/unified/types.js.map +1 -0
  243. package/dist/unified-esm/src/unified/wallet-detector.d.ts +28 -0
  244. package/dist/unified-esm/src/unified/wallet-detector.d.ts.map +1 -0
  245. package/dist/unified-esm/src/unified/wallet-detector.js +59 -0
  246. package/dist/unified-esm/src/unified/wallet-detector.js.map +1 -0
  247. package/dist/unified-esm/src/utils/chain-config.d.ts +75 -0
  248. package/dist/unified-esm/src/utils/chain-config.d.ts.map +1 -0
  249. package/dist/unified-esm/src/utils/chain-config.js +199 -0
  250. package/dist/unified-esm/src/utils/chain-config.js.map +1 -0
  251. package/dist/unified-esm/src/utils/currency.d.ts +26 -0
  252. package/dist/unified-esm/src/utils/currency.d.ts.map +1 -0
  253. package/dist/unified-esm/src/utils/currency.js +31 -0
  254. package/dist/unified-esm/src/utils/currency.js.map +1 -0
  255. package/dist/unified-esm/src/utils/index.d.ts +4 -0
  256. package/dist/unified-esm/src/utils/index.d.ts.map +1 -0
  257. package/dist/unified-esm/src/utils/index.js +4 -0
  258. package/dist/unified-esm/src/utils/index.js.map +1 -0
  259. package/dist/unified-esm/src/utils/validation.d.ts +10 -0
  260. package/dist/unified-esm/src/utils/validation.d.ts.map +1 -0
  261. package/dist/unified-esm/src/utils/validation.js +96 -0
  262. package/dist/unified-esm/src/utils/validation.js.map +1 -0
  263. package/dist/unified-esm/typechain-types/Mailer.d.ts +698 -0
  264. package/dist/unified-esm/typechain-types/Mailer.d.ts.map +1 -0
  265. package/dist/unified-esm/typechain-types/Mailer.js +2 -0
  266. package/dist/unified-esm/typechain-types/Mailer.js.map +1 -0
  267. package/dist/unified-esm/typechain-types/MockUSDC.d.ts +118 -0
  268. package/dist/unified-esm/typechain-types/MockUSDC.d.ts.map +1 -0
  269. package/dist/unified-esm/typechain-types/MockUSDC.js +2 -0
  270. package/dist/unified-esm/typechain-types/MockUSDC.js.map +1 -0
  271. package/dist/unified-esm/typechain-types/common.d.ts +51 -0
  272. package/dist/unified-esm/typechain-types/common.d.ts.map +1 -0
  273. package/dist/unified-esm/typechain-types/common.js +2 -0
  274. package/dist/unified-esm/typechain-types/common.js.map +1 -0
  275. package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts +875 -0
  276. package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts.map +1 -0
  277. package/dist/unified-esm/typechain-types/factories/Mailer__factory.js +1121 -0
  278. package/dist/unified-esm/typechain-types/factories/Mailer__factory.js.map +1 -0
  279. package/dist/unified-esm/typechain-types/factories/MockUSDC__factory.d.ts +193 -0
  280. package/dist/unified-esm/typechain-types/factories/MockUSDC__factory.d.ts.map +1 -0
  281. package/dist/unified-esm/typechain-types/factories/MockUSDC__factory.js +259 -0
  282. package/dist/unified-esm/typechain-types/factories/MockUSDC__factory.js.map +1 -0
  283. package/dist/unified-esm/typechain-types/factories/index.d.ts +4 -0
  284. package/dist/unified-esm/typechain-types/factories/index.d.ts.map +1 -0
  285. package/dist/unified-esm/typechain-types/factories/index.js +7 -0
  286. package/dist/unified-esm/typechain-types/factories/index.js.map +1 -0
  287. package/dist/unified-esm/typechain-types/factories/interfaces/IERC20__factory.d.ts +80 -0
  288. package/dist/unified-esm/typechain-types/factories/interfaces/IERC20__factory.d.ts.map +1 -0
  289. package/dist/unified-esm/typechain-types/factories/interfaces/IERC20__factory.js +112 -0
  290. package/dist/unified-esm/typechain-types/factories/interfaces/IERC20__factory.js.map +1 -0
  291. package/dist/unified-esm/typechain-types/factories/interfaces/index.d.ts +2 -0
  292. package/dist/unified-esm/typechain-types/factories/interfaces/index.d.ts.map +1 -0
  293. package/dist/unified-esm/typechain-types/factories/interfaces/index.js +5 -0
  294. package/dist/unified-esm/typechain-types/factories/interfaces/index.js.map +1 -0
  295. package/dist/unified-esm/typechain-types/index.d.ts +10 -0
  296. package/dist/unified-esm/typechain-types/index.d.ts.map +1 -0
  297. package/dist/unified-esm/typechain-types/index.js +5 -0
  298. package/dist/unified-esm/typechain-types/index.js.map +1 -0
  299. package/dist/unified-esm/typechain-types/interfaces/IERC20.d.ts +70 -0
  300. package/dist/unified-esm/typechain-types/interfaces/IERC20.d.ts.map +1 -0
  301. package/dist/unified-esm/typechain-types/interfaces/IERC20.js +2 -0
  302. package/dist/unified-esm/typechain-types/interfaces/IERC20.js.map +1 -0
  303. package/dist/unified-esm/typechain-types/interfaces/index.d.ts +2 -0
  304. package/dist/unified-esm/typechain-types/interfaces/index.d.ts.map +1 -0
  305. package/dist/unified-esm/typechain-types/interfaces/index.js +2 -0
  306. package/dist/unified-esm/typechain-types/interfaces/index.js.map +1 -0
  307. package/package.json +250 -0
  308. package/programs/mailer/Cargo.toml +29 -0
  309. package/programs/mailer/src/lib.rs +2034 -0
  310. package/programs/mailer/tests/integration_tests.rs +1236 -0
  311. package/typechain-types/Mailer.ts +1393 -0
  312. package/typechain-types/MockUSDC.ts +236 -0
  313. package/typechain-types/common.ts +131 -0
  314. package/typechain-types/factories/Mailer__factory.ts +1157 -0
  315. package/typechain-types/factories/MockUSDC__factory.ts +284 -0
  316. package/typechain-types/factories/index.ts +6 -0
  317. package/typechain-types/factories/interfaces/IERC20__factory.ts +115 -0
  318. package/typechain-types/factories/interfaces/index.ts +4 -0
  319. package/typechain-types/hardhat.d.ts +99 -0
  320. package/typechain-types/index.ts +12 -0
  321. package/typechain-types/interfaces/IERC20.ts +148 -0
  322. package/typechain-types/interfaces/index.ts +4 -0
@@ -0,0 +1,1048 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.OnchainMailerClient = void 0;
37
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
38
+ // @ts-nocheck - Suppress false TypeScript errors with ESNext modules accessing class properties
39
+ const types_1 = require("@sudobility/types");
40
+ /**
41
+ * OnchainMailerClient v2 - Refactored to use standard wallet libraries
42
+ *
43
+ * This version removes the UnifiedWallet abstraction and instead accepts
44
+ * standard wallet clients from wagmi (EVM) or wallet-adapter (Solana).
45
+ *
46
+ * @example EVM Usage with wagmi
47
+ * ```typescript
48
+ * import { createWalletClient, createPublicClient, http } from 'viem';
49
+ * import { mainnet } from 'viem/chains';
50
+ *
51
+ * const walletClient = createWalletClient({
52
+ * chain: mainnet,
53
+ * transport: http()
54
+ * });
55
+ * const publicClient = createPublicClient({
56
+ * chain: mainnet,
57
+ * transport: http()
58
+ * });
59
+ *
60
+ * const client = OnchainMailerClient.forEVM(
61
+ * walletClient,
62
+ * publicClient,
63
+ * '0xMailerContractAddress',
64
+ * '0xUSDCAddress'
65
+ * );
66
+ * ```
67
+ *
68
+ * @example Solana Usage with wallet-adapter
69
+ * ```typescript
70
+ * import { useWallet } from '@solana/wallet-adapter-react';
71
+ * import { Connection } from '@solana/web3.js';
72
+ *
73
+ * const wallet = useWallet();
74
+ * const connection = new Connection('https://api.mainnet-beta.solana.com');
75
+ *
76
+ * const client = OnchainMailerClient.forSolana(
77
+ * wallet,
78
+ * connection,
79
+ * 'MailerProgramId',
80
+ * 'USDCMintAddress'
81
+ * );
82
+ * ```
83
+ */
84
+ class OnchainMailerClient {
85
+ /**
86
+ * Create an OnchainMailerClient for EVM chains using wagmi clients
87
+ *
88
+ * @param walletClient - wagmi WalletClient for signing transactions
89
+ * @param publicClient - wagmi PublicClient for reading chain data
90
+ * @param mailerAddress - Deployed Mailer contract address
91
+ * @param usdcAddress - USDC token contract address
92
+ * @returns Configured OnchainMailerClient for EVM
93
+ */
94
+ static forEVM(walletClient, publicClient, mailerAddress, usdcAddress) {
95
+ const client = new OnchainMailerClient({}, { evm: undefined, solana: undefined });
96
+ client.chainType = types_1.ChainType.EVM;
97
+ client.evmWalletClient = walletClient;
98
+ client.evmPublicClient = publicClient;
99
+ client.evmContractAddress = mailerAddress;
100
+ client.evmUsdcAddress = usdcAddress;
101
+ return client;
102
+ }
103
+ /**
104
+ * Create an OnchainMailerClient for Solana using wallet-adapter
105
+ *
106
+ * @param wallet - Solana wallet adapter
107
+ * @param connection - Solana connection
108
+ * @param programId - Deployed Mailer program ID
109
+ * @param usdcMint - USDC mint address
110
+ * @returns Configured OnchainMailerClient for Solana
111
+ */
112
+ static forSolana(
113
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
+ wallet, // Wallet adapter interface
115
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
+ connection, // Connection
117
+ programId, usdcMint) {
118
+ const client = new OnchainMailerClient({}, { evm: undefined, solana: undefined });
119
+ client.chainType = types_1.ChainType.SOLANA;
120
+ client.solanaWallet = wallet;
121
+ client.solanaConnection = connection;
122
+ client.solanaProgramId = programId;
123
+ client.solanaUsdcMint = usdcMint;
124
+ return client;
125
+ }
126
+ /**
127
+ * Create an OnchainMailerClient from a generic config (backward compatibility)
128
+ * This constructor is provided for backward compatibility with React provider
129
+ */
130
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
+ constructor(wallet, config) {
132
+ // Simple chain detection based on wallet properties
133
+ const hasEthereumProperties = wallet && (wallet.address || wallet.request || wallet.selectedAddress);
134
+ const hasSolanaProperties = wallet && wallet.publicKey && typeof wallet.signTransaction === 'function';
135
+ if (hasEthereumProperties) {
136
+ this.chainType = types_1.ChainType.EVM;
137
+ if (config.evm) {
138
+ // Store config for lazy initialization
139
+ this.evmContractAddress = config.evm.contracts.mailer;
140
+ this.evmUsdcAddress = config.evm.contracts.usdc;
141
+ // Wallet and public clients will be created on first use
142
+ // Store raw wallet for backward compatibility
143
+ // @ts-ignore
144
+ this._rawEvmWallet = wallet;
145
+ }
146
+ else {
147
+ throw new Error('EVM configuration required for EVM wallet');
148
+ }
149
+ }
150
+ else if (hasSolanaProperties) {
151
+ this.chainType = types_1.ChainType.SOLANA;
152
+ if (config.solana) {
153
+ this.solanaWallet = wallet;
154
+ // Connection will be created on first use
155
+ this.solanaProgramId = config.solana.programs.mailer;
156
+ this.solanaUsdcMint = config.solana.usdcMint;
157
+ }
158
+ else {
159
+ throw new Error('Solana configuration required for Solana wallet');
160
+ }
161
+ }
162
+ else {
163
+ throw new Error('Unable to detect wallet type from provided wallet object');
164
+ }
165
+ }
166
+ /**
167
+ * Send a message using the appropriate chain implementation
168
+ * Note: For backward compatibility, 'to' defaults to sender's own address
169
+ */
170
+ async sendMessage(subject, body, priority = false, resolveSenderToName = false, to) {
171
+ // For backward compatibility, default to sending to self
172
+ const recipient = to || await this.getWalletAddressAsync();
173
+ if (this.chainType === types_1.ChainType.EVM) {
174
+ return this.sendEVMMessage(recipient, subject, body, priority, resolveSenderToName);
175
+ }
176
+ else {
177
+ return this.sendSolanaMessage(recipient, subject, body, priority, resolveSenderToName);
178
+ }
179
+ }
180
+ /**
181
+ * Register a domain (not implemented - for backward compatibility)
182
+ */
183
+ async registerDomain(_domain) {
184
+ throw new Error('Domain registration not yet implemented');
185
+ }
186
+ /**
187
+ * Delegate to another address
188
+ */
189
+ async delegateTo(delegate) {
190
+ if (this.chainType === types_1.ChainType.EVM) {
191
+ return this.delegateEVM(delegate);
192
+ }
193
+ else {
194
+ return this.delegateSolana(delegate);
195
+ }
196
+ }
197
+ /**
198
+ * Claim revenue share
199
+ */
200
+ async claimRevenue() {
201
+ if (this.chainType === types_1.ChainType.EVM) {
202
+ return this.claimEVMRevenue();
203
+ }
204
+ else {
205
+ return this.claimSolanaRevenue();
206
+ }
207
+ }
208
+ // Performance optimization: cache module imports
209
+ async getEVMModules() {
210
+ if (!OnchainMailerClient.evmModules) {
211
+ const evmModule = await Promise.resolve().then(() => __importStar(require('../evm/index.js')));
212
+ OnchainMailerClient.evmModules = {
213
+ MailerClient: evmModule.MailerClient
214
+ };
215
+ }
216
+ return OnchainMailerClient.evmModules;
217
+ }
218
+ async getSolanaModules() {
219
+ if (!OnchainMailerClient.solanaModules) {
220
+ const [solanaModule, web3Module] = await Promise.all([
221
+ Promise.resolve().then(() => __importStar(require('../solana/index.js'))),
222
+ Promise.resolve().then(() => __importStar(require('@solana/web3.js')))
223
+ ]);
224
+ OnchainMailerClient.solanaModules = {
225
+ MailerClient: solanaModule.MailerClient,
226
+ PublicKey: web3Module.PublicKey,
227
+ Connection: web3Module.Connection
228
+ };
229
+ }
230
+ return OnchainMailerClient.solanaModules;
231
+ }
232
+ // EVM implementation methods
233
+ async sendEVMMessage(to, subject, body, priority, resolveSenderToName) {
234
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
235
+ throw new Error('EVM client not properly initialized');
236
+ }
237
+ const { MailerClient } = await this.getEVMModules();
238
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
239
+ // Validate message
240
+ if (!subject || subject.length > 200) {
241
+ throw new Error('Subject must be 1-200 characters');
242
+ }
243
+ if (!body || body.length > 10000) {
244
+ throw new Error('Body must be 1-10000 characters');
245
+ }
246
+ const [account] = await this.evmWalletClient.getAddresses();
247
+ const payer = account;
248
+ const result = await client.send(to, subject, body, payer, priority, resolveSenderToName, this.evmWalletClient, account);
249
+ // Convert to MessageResult format
250
+ return {
251
+ transactionHash: result.hash,
252
+ chainType: types_1.ChainType.EVM,
253
+ fee: BigInt(priority ? '100000' : '10000'),
254
+ gasUsed: result.gasUsed,
255
+ isPriority: priority,
256
+ success: true
257
+ };
258
+ }
259
+ async delegateEVM(delegate) {
260
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
261
+ throw new Error('EVM client not properly initialized');
262
+ }
263
+ const { MailerClient } = await this.getEVMModules();
264
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
265
+ const [account] = await this.evmWalletClient.getAddresses();
266
+ const result = await client.delegateTo(delegate, this.evmWalletClient, account);
267
+ return {
268
+ transactionHash: result.hash,
269
+ chainType: types_1.ChainType.EVM,
270
+ delegate,
271
+ success: true
272
+ };
273
+ }
274
+ async claimEVMRevenue() {
275
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
276
+ throw new Error('EVM client not properly initialized');
277
+ }
278
+ const { MailerClient } = await this.getEVMModules();
279
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
280
+ const [account] = await this.evmWalletClient.getAddresses();
281
+ const result = await client.claimRecipientShare(this.evmWalletClient, account);
282
+ return {
283
+ hash: result.hash,
284
+ chainType: types_1.ChainType.EVM,
285
+ blockNumber: result.blockNumber,
286
+ timestamp: Date.now()
287
+ };
288
+ }
289
+ // Solana implementation methods
290
+ async sendSolanaMessage(to, subject, body, priority, resolveSenderToName) {
291
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
292
+ throw new Error('Solana client not properly initialized');
293
+ }
294
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
295
+ const programId = new PublicKey(this.solanaProgramId);
296
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
297
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
298
+ const result = await client.send(to, subject, body, priority, resolveSenderToName);
299
+ // Get current fees
300
+ const fees = await client.getFees();
301
+ return {
302
+ transactionHash: result.signature,
303
+ chainType: types_1.ChainType.SOLANA,
304
+ fee: priority ? fees.sendFee : fees.sendFee / 10,
305
+ isPriority: priority,
306
+ success: true
307
+ };
308
+ }
309
+ async delegateSolana(delegate) {
310
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
311
+ throw new Error('Solana client not properly initialized');
312
+ }
313
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
314
+ const programId = new PublicKey(this.solanaProgramId);
315
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
316
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
317
+ const result = await client.delegateTo(delegate);
318
+ return {
319
+ transactionHash: result.signature,
320
+ chainType: types_1.ChainType.SOLANA,
321
+ delegate,
322
+ success: true
323
+ };
324
+ }
325
+ async claimSolanaRevenue() {
326
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
327
+ throw new Error('Solana client not properly initialized');
328
+ }
329
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
330
+ const programId = new PublicKey(this.solanaProgramId);
331
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
332
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
333
+ const result = await client.claimRecipientShare();
334
+ const slot = await this.solanaConnection.getSlot();
335
+ return {
336
+ hash: result.signature,
337
+ chainType: types_1.ChainType.SOLANA,
338
+ slot,
339
+ timestamp: Date.now()
340
+ };
341
+ }
342
+ // Read methods
343
+ async getSendFee() {
344
+ if (this.chainType === types_1.ChainType.EVM) {
345
+ return this.getEVMSendFee();
346
+ }
347
+ else {
348
+ return this.getSolanaSendFee();
349
+ }
350
+ }
351
+ async getEVMSendFee() {
352
+ if (!this.evmPublicClient || !this.evmContractAddress) {
353
+ throw new Error('EVM client not properly initialized');
354
+ }
355
+ const { MailerClient } = await this.getEVMModules();
356
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
357
+ return client.getSendFee();
358
+ }
359
+ async getSolanaSendFee() {
360
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
361
+ throw new Error('Solana client not properly initialized');
362
+ }
363
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
364
+ const programId = new PublicKey(this.solanaProgramId);
365
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
366
+ // Create a minimal wallet object for reading
367
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
368
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
369
+ const fees = await client.getFees();
370
+ return BigInt(fees.sendFee);
371
+ }
372
+ // Additional read methods
373
+ async getClaimableAmount(address) {
374
+ const targetAddress = address || await this.getWalletAddressAsync();
375
+ if (this.chainType === types_1.ChainType.EVM) {
376
+ return this.getEVMClaimableAmount(targetAddress);
377
+ }
378
+ else {
379
+ return this.getSolanaClaimableAmount(targetAddress);
380
+ }
381
+ }
382
+ async getEVMClaimableAmount(address) {
383
+ if (!this.evmPublicClient || !this.evmContractAddress) {
384
+ throw new Error('EVM client not properly initialized');
385
+ }
386
+ const { MailerClient } = await this.getEVMModules();
387
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
388
+ const result = await client.getRecipientClaimable(address);
389
+ return result.amount;
390
+ }
391
+ async getSolanaClaimableAmount(address) {
392
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
393
+ throw new Error('Solana client not properly initialized');
394
+ }
395
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
396
+ const programId = new PublicKey(this.solanaProgramId);
397
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
398
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
399
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
400
+ const recipientKey = new PublicKey(address);
401
+ const claimInfo = await client.getRecipientClaimable(recipientKey);
402
+ return claimInfo ? BigInt(claimInfo.amount) : 0n;
403
+ }
404
+ async getOwnerClaimable() {
405
+ if (this.chainType === types_1.ChainType.EVM) {
406
+ return this.getEVMOwnerClaimable();
407
+ }
408
+ else {
409
+ return this.getSolanaOwnerClaimable();
410
+ }
411
+ }
412
+ async getEVMOwnerClaimable() {
413
+ if (!this.evmPublicClient || !this.evmContractAddress) {
414
+ throw new Error('EVM client not properly initialized');
415
+ }
416
+ const { MailerClient } = await this.getEVMModules();
417
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
418
+ return client.getOwnerClaimable();
419
+ }
420
+ async getSolanaOwnerClaimable() {
421
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
422
+ throw new Error('Solana client not properly initialized');
423
+ }
424
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
425
+ const programId = new PublicKey(this.solanaProgramId);
426
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
427
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
428
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
429
+ const amount = await client.getOwnerClaimable();
430
+ return BigInt(amount);
431
+ }
432
+ async getDelegation(address) {
433
+ const targetAddress = address || await this.getWalletAddressAsync();
434
+ if (this.chainType === types_1.ChainType.EVM) {
435
+ return this.getEVMDelegation(targetAddress);
436
+ }
437
+ else {
438
+ return this.getSolanaDelegation(targetAddress);
439
+ }
440
+ }
441
+ async getEVMDelegation(_address) {
442
+ // Delegation read not implemented in EVM client yet
443
+ throw new Error('getDelegation not yet implemented for EVM');
444
+ }
445
+ async getSolanaDelegation(address) {
446
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
447
+ throw new Error('Solana client not properly initialized');
448
+ }
449
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
450
+ const programId = new PublicKey(this.solanaProgramId);
451
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
452
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
453
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
454
+ const delegatorKey = new PublicKey(address);
455
+ const delegationInfo = await client.getDelegation(delegatorKey);
456
+ return delegationInfo?.delegate || null;
457
+ }
458
+ async getDelegationFee() {
459
+ if (this.chainType === types_1.ChainType.EVM) {
460
+ return this.getEVMDelegationFee();
461
+ }
462
+ else {
463
+ return this.getSolanaDelegationFee();
464
+ }
465
+ }
466
+ async getEVMDelegationFee() {
467
+ if (!this.evmPublicClient || !this.evmContractAddress) {
468
+ throw new Error('EVM client not properly initialized');
469
+ }
470
+ const { MailerClient } = await this.getEVMModules();
471
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
472
+ return client.getDelegationFee();
473
+ }
474
+ async getSolanaDelegationFee() {
475
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
476
+ throw new Error('Solana client not properly initialized');
477
+ }
478
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
479
+ const programId = new PublicKey(this.solanaProgramId);
480
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
481
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
482
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
483
+ const fees = await client.getFees();
484
+ return BigInt(fees.delegationFee);
485
+ }
486
+ async isPaused() {
487
+ if (this.chainType === types_1.ChainType.EVM) {
488
+ return this.isPausedEVM();
489
+ }
490
+ else {
491
+ return this.isPausedSolana();
492
+ }
493
+ }
494
+ async isPausedEVM() {
495
+ if (!this.evmPublicClient || !this.evmContractAddress) {
496
+ throw new Error('EVM client not properly initialized');
497
+ }
498
+ const { MailerClient } = await this.getEVMModules();
499
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
500
+ return client.isPaused();
501
+ }
502
+ async isPausedSolana() {
503
+ if (!this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
504
+ throw new Error('Solana client not properly initialized');
505
+ }
506
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
507
+ const programId = new PublicKey(this.solanaProgramId);
508
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
509
+ const wallet = { publicKey: PublicKey.default, signTransaction: async (tx) => tx };
510
+ const client = new MailerClient(this.solanaConnection, wallet, programId, usdcMint);
511
+ return client.isPaused();
512
+ }
513
+ // Write methods for contract management
514
+ async unpause() {
515
+ if (this.chainType === types_1.ChainType.EVM) {
516
+ return this.unpauseEVM();
517
+ }
518
+ else {
519
+ return this.unpauseSolana();
520
+ }
521
+ }
522
+ async unpauseEVM() {
523
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
524
+ throw new Error('EVM client not properly initialized');
525
+ }
526
+ const { MailerClient } = await this.getEVMModules();
527
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
528
+ const [account] = await this.evmWalletClient.getAddresses();
529
+ const result = await client.unpause(this.evmWalletClient, account);
530
+ return {
531
+ hash: result.hash,
532
+ chainType: types_1.ChainType.EVM,
533
+ blockNumber: result.blockNumber,
534
+ timestamp: Date.now()
535
+ };
536
+ }
537
+ async unpauseSolana() {
538
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
539
+ throw new Error('Solana client not properly initialized');
540
+ }
541
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
542
+ const programId = new PublicKey(this.solanaProgramId);
543
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
544
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
545
+ const result = await client.unpause();
546
+ const slot = await this.solanaConnection.getSlot();
547
+ return {
548
+ hash: result.signature,
549
+ chainType: types_1.ChainType.SOLANA,
550
+ slot,
551
+ timestamp: Date.now()
552
+ };
553
+ }
554
+ async emergencyUnpause() {
555
+ if (this.chainType === types_1.ChainType.EVM) {
556
+ return this.emergencyUnpauseEVM();
557
+ }
558
+ else {
559
+ return this.emergencyUnpauseSolana();
560
+ }
561
+ }
562
+ async emergencyUnpauseEVM() {
563
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
564
+ throw new Error('EVM client not properly initialized');
565
+ }
566
+ const { MailerClient } = await this.getEVMModules();
567
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
568
+ const [account] = await this.evmWalletClient.getAddresses();
569
+ const result = await client.emergencyUnpause(this.evmWalletClient, account);
570
+ return {
571
+ hash: result.hash,
572
+ chainType: types_1.ChainType.EVM,
573
+ blockNumber: result.blockNumber,
574
+ timestamp: Date.now()
575
+ };
576
+ }
577
+ async emergencyUnpauseSolana() {
578
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
579
+ throw new Error('Solana client not properly initialized');
580
+ }
581
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
582
+ const programId = new PublicKey(this.solanaProgramId);
583
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
584
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
585
+ const result = await client.emergencyUnpause();
586
+ const slot = await this.solanaConnection.getSlot();
587
+ return {
588
+ hash: result.signature,
589
+ chainType: types_1.ChainType.SOLANA,
590
+ slot,
591
+ timestamp: Date.now()
592
+ };
593
+ }
594
+ async distributeClaimableFunds(recipient) {
595
+ if (this.chainType === types_1.ChainType.EVM) {
596
+ return this.distributeClaimableFundsEVM(recipient);
597
+ }
598
+ else {
599
+ return this.distributeClaimableFundsSolana(recipient);
600
+ }
601
+ }
602
+ async distributeClaimableFundsEVM(recipient) {
603
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
604
+ throw new Error('EVM client not properly initialized');
605
+ }
606
+ const { MailerClient } = await this.getEVMModules();
607
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
608
+ const [account] = await this.evmWalletClient.getAddresses();
609
+ const result = await client.distributeClaimableFunds(recipient, this.evmWalletClient, account);
610
+ return {
611
+ hash: result.hash,
612
+ chainType: types_1.ChainType.EVM,
613
+ blockNumber: result.blockNumber,
614
+ timestamp: Date.now()
615
+ };
616
+ }
617
+ async distributeClaimableFundsSolana(recipient) {
618
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
619
+ throw new Error('Solana client not properly initialized');
620
+ }
621
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
622
+ const programId = new PublicKey(this.solanaProgramId);
623
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
624
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
625
+ const result = await client.distributeClaimableFunds(recipient);
626
+ const slot = await this.solanaConnection.getSlot();
627
+ return {
628
+ hash: result.signature,
629
+ chainType: types_1.ChainType.SOLANA,
630
+ slot,
631
+ timestamp: Date.now()
632
+ };
633
+ }
634
+ // Additional methods for complete API compatibility
635
+ async sendPrepared(to, mailId, priority = false, resolveSenderToName = false) {
636
+ if (this.chainType === types_1.ChainType.EVM) {
637
+ return this.sendPreparedEVM(to, mailId, priority, resolveSenderToName);
638
+ }
639
+ else {
640
+ return this.sendPreparedSolana(to, mailId, priority, resolveSenderToName);
641
+ }
642
+ }
643
+ async sendPreparedEVM(to, mailId, priority, resolveSenderToName) {
644
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
645
+ throw new Error('EVM client not properly initialized');
646
+ }
647
+ const { MailerClient } = await this.getEVMModules();
648
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
649
+ const [account] = await this.evmWalletClient.getAddresses();
650
+ const payer = account;
651
+ const result = await client.sendPrepared(to, mailId, payer, priority, resolveSenderToName, this.evmWalletClient, account);
652
+ return {
653
+ transactionHash: result.hash,
654
+ chainType: types_1.ChainType.EVM,
655
+ fee: BigInt(priority ? '100000' : '10000'),
656
+ gasUsed: result.gasUsed,
657
+ isPriority: priority,
658
+ success: true
659
+ };
660
+ }
661
+ async sendPreparedSolana(to, mailId, priority, resolveSenderToName) {
662
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
663
+ throw new Error('Solana client not properly initialized');
664
+ }
665
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
666
+ const programId = new PublicKey(this.solanaProgramId);
667
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
668
+ const recipientKey = new PublicKey(to);
669
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
670
+ const result = await client.sendPrepared(recipientKey, mailId, priority, resolveSenderToName);
671
+ const fees = await client.getFees();
672
+ return {
673
+ transactionHash: result.signature,
674
+ chainType: types_1.ChainType.SOLANA,
675
+ fee: priority ? fees.sendFee : fees.sendFee / 10,
676
+ isPriority: priority,
677
+ success: true
678
+ };
679
+ }
680
+ async sendToEmail(toEmail, subject, body) {
681
+ if (this.chainType === types_1.ChainType.EVM) {
682
+ return this.sendToEmailEVM(toEmail, subject, body);
683
+ }
684
+ else {
685
+ return this.sendToEmailSolana(toEmail, subject, body);
686
+ }
687
+ }
688
+ async sendToEmailEVM(toEmail, subject, body) {
689
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
690
+ throw new Error('EVM client not properly initialized');
691
+ }
692
+ const { MailerClient } = await this.getEVMModules();
693
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
694
+ const [account] = await this.evmWalletClient.getAddresses();
695
+ const payer = account;
696
+ const result = await client.sendToEmailAddress(toEmail, subject, body, payer, this.evmWalletClient, account);
697
+ return {
698
+ transactionHash: result.hash,
699
+ chainType: types_1.ChainType.EVM,
700
+ fee: BigInt('10000'), // 10% fee only
701
+ gasUsed: result.gasUsed,
702
+ isPriority: false,
703
+ success: true
704
+ };
705
+ }
706
+ async sendToEmailSolana(toEmail, subject, body) {
707
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
708
+ throw new Error('Solana client not properly initialized');
709
+ }
710
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
711
+ const programId = new PublicKey(this.solanaProgramId);
712
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
713
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
714
+ const result = await client.sendToEmail(toEmail, subject, body);
715
+ const fees = await client.getFees();
716
+ return {
717
+ transactionHash: result.signature,
718
+ chainType: types_1.ChainType.SOLANA,
719
+ fee: fees.sendFee / 10, // 10% fee only
720
+ isPriority: false,
721
+ success: true
722
+ };
723
+ }
724
+ async sendPreparedToEmail(toEmail, mailId) {
725
+ if (this.chainType === types_1.ChainType.EVM) {
726
+ return this.sendPreparedToEmailEVM(toEmail, mailId);
727
+ }
728
+ else {
729
+ return this.sendPreparedToEmailSolana(toEmail, mailId);
730
+ }
731
+ }
732
+ async sendPreparedToEmailEVM(toEmail, mailId) {
733
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
734
+ throw new Error('EVM client not properly initialized');
735
+ }
736
+ const { MailerClient } = await this.getEVMModules();
737
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
738
+ const [account] = await this.evmWalletClient.getAddresses();
739
+ const payer = account;
740
+ const result = await client.sendPreparedToEmailAddress(toEmail, mailId, payer, this.evmWalletClient, account);
741
+ return {
742
+ transactionHash: result.hash,
743
+ chainType: types_1.ChainType.EVM,
744
+ fee: BigInt('10000'), // 10% fee only
745
+ gasUsed: result.gasUsed,
746
+ isPriority: false,
747
+ success: true
748
+ };
749
+ }
750
+ async sendPreparedToEmailSolana(toEmail, mailId) {
751
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
752
+ throw new Error('Solana client not properly initialized');
753
+ }
754
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
755
+ const programId = new PublicKey(this.solanaProgramId);
756
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
757
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
758
+ const result = await client.sendPreparedToEmail(toEmail, mailId);
759
+ const fees = await client.getFees();
760
+ return {
761
+ transactionHash: result.signature,
762
+ chainType: types_1.ChainType.SOLANA,
763
+ fee: fees.sendFee / 10, // 10% fee only
764
+ isPriority: false,
765
+ success: true
766
+ };
767
+ }
768
+ async claimOwnerShare() {
769
+ if (this.chainType === types_1.ChainType.EVM) {
770
+ return this.claimOwnerShareEVM();
771
+ }
772
+ else {
773
+ return this.claimOwnerShareSolana();
774
+ }
775
+ }
776
+ async claimOwnerShareEVM() {
777
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
778
+ throw new Error('EVM client not properly initialized');
779
+ }
780
+ const { MailerClient } = await this.getEVMModules();
781
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
782
+ const [account] = await this.evmWalletClient.getAddresses();
783
+ const result = await client.claimOwnerShare(this.evmWalletClient, account);
784
+ return {
785
+ hash: result.hash,
786
+ chainType: types_1.ChainType.EVM,
787
+ blockNumber: result.blockNumber,
788
+ timestamp: Date.now()
789
+ };
790
+ }
791
+ async claimOwnerShareSolana() {
792
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
793
+ throw new Error('Solana client not properly initialized');
794
+ }
795
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
796
+ const programId = new PublicKey(this.solanaProgramId);
797
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
798
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
799
+ const result = await client.claimOwnerShare();
800
+ const slot = await this.solanaConnection.getSlot();
801
+ return {
802
+ hash: result.signature,
803
+ chainType: types_1.ChainType.SOLANA,
804
+ slot,
805
+ timestamp: Date.now()
806
+ };
807
+ }
808
+ async claimExpiredShares(recipient) {
809
+ if (this.chainType === types_1.ChainType.EVM) {
810
+ return this.claimExpiredSharesEVM(recipient);
811
+ }
812
+ else {
813
+ return this.claimExpiredSharesSolana(recipient);
814
+ }
815
+ }
816
+ async claimExpiredSharesEVM(recipient) {
817
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
818
+ throw new Error('EVM client not properly initialized');
819
+ }
820
+ const { MailerClient } = await this.getEVMModules();
821
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
822
+ const [account] = await this.evmWalletClient.getAddresses();
823
+ const result = await client.claimExpiredShares(recipient, this.evmWalletClient, account);
824
+ return {
825
+ hash: result.hash,
826
+ chainType: types_1.ChainType.EVM,
827
+ blockNumber: result.blockNumber,
828
+ timestamp: Date.now()
829
+ };
830
+ }
831
+ async claimExpiredSharesSolana(recipient) {
832
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
833
+ throw new Error('Solana client not properly initialized');
834
+ }
835
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
836
+ const programId = new PublicKey(this.solanaProgramId);
837
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
838
+ const recipientKey = new PublicKey(recipient);
839
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
840
+ const result = await client.claimExpiredShares(recipientKey);
841
+ const slot = await this.solanaConnection.getSlot();
842
+ return {
843
+ hash: result.signature,
844
+ chainType: types_1.ChainType.SOLANA,
845
+ slot,
846
+ timestamp: Date.now()
847
+ };
848
+ }
849
+ async rejectDelegation(delegatorAddress) {
850
+ if (this.chainType === types_1.ChainType.EVM) {
851
+ return this.rejectDelegationEVM(delegatorAddress);
852
+ }
853
+ else {
854
+ return this.rejectDelegationSolana(delegatorAddress);
855
+ }
856
+ }
857
+ async rejectDelegationEVM(delegatorAddress) {
858
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
859
+ throw new Error('EVM client not properly initialized');
860
+ }
861
+ const { MailerClient } = await this.getEVMModules();
862
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
863
+ const [account] = await this.evmWalletClient.getAddresses();
864
+ const result = await client.rejectDelegation(delegatorAddress, this.evmWalletClient, account);
865
+ return {
866
+ hash: result.hash,
867
+ chainType: types_1.ChainType.EVM,
868
+ blockNumber: result.blockNumber,
869
+ timestamp: Date.now()
870
+ };
871
+ }
872
+ async rejectDelegationSolana(delegatorAddress) {
873
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
874
+ throw new Error('Solana client not properly initialized');
875
+ }
876
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
877
+ const programId = new PublicKey(this.solanaProgramId);
878
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
879
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
880
+ const result = await client.rejectDelegation(delegatorAddress);
881
+ const slot = await this.solanaConnection.getSlot();
882
+ return {
883
+ hash: result.signature,
884
+ chainType: types_1.ChainType.SOLANA,
885
+ slot,
886
+ timestamp: Date.now()
887
+ };
888
+ }
889
+ async setFee(newFee) {
890
+ if (this.chainType === types_1.ChainType.EVM) {
891
+ return this.setFeeEVM(newFee);
892
+ }
893
+ else {
894
+ return this.setFeeSolana(newFee);
895
+ }
896
+ }
897
+ async setFeeEVM(newFee) {
898
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
899
+ throw new Error('EVM client not properly initialized');
900
+ }
901
+ const { MailerClient } = await this.getEVMModules();
902
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
903
+ const [account] = await this.evmWalletClient.getAddresses();
904
+ const result = await client.setFee(newFee, this.evmWalletClient, account);
905
+ return {
906
+ hash: result.hash,
907
+ chainType: types_1.ChainType.EVM,
908
+ blockNumber: result.blockNumber,
909
+ timestamp: Date.now()
910
+ };
911
+ }
912
+ async setFeeSolana(newFee) {
913
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
914
+ throw new Error('Solana client not properly initialized');
915
+ }
916
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
917
+ const programId = new PublicKey(this.solanaProgramId);
918
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
919
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
920
+ const result = await client.setFee(newFee);
921
+ const slot = await this.solanaConnection.getSlot();
922
+ return {
923
+ hash: result.signature,
924
+ chainType: types_1.ChainType.SOLANA,
925
+ slot,
926
+ timestamp: Date.now()
927
+ };
928
+ }
929
+ async setDelegationFee(newFee) {
930
+ if (this.chainType === types_1.ChainType.EVM) {
931
+ return this.setDelegationFeeEVM(newFee);
932
+ }
933
+ else {
934
+ return this.setDelegationFeeSolana(newFee);
935
+ }
936
+ }
937
+ async setDelegationFeeEVM(newFee) {
938
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
939
+ throw new Error('EVM client not properly initialized');
940
+ }
941
+ const { MailerClient } = await this.getEVMModules();
942
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
943
+ const [account] = await this.evmWalletClient.getAddresses();
944
+ const result = await client.setDelegationFee(newFee, this.evmWalletClient, account);
945
+ return {
946
+ hash: result.hash,
947
+ chainType: types_1.ChainType.EVM,
948
+ blockNumber: result.blockNumber,
949
+ timestamp: Date.now()
950
+ };
951
+ }
952
+ async setDelegationFeeSolana(newFee) {
953
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
954
+ throw new Error('Solana client not properly initialized');
955
+ }
956
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
957
+ const programId = new PublicKey(this.solanaProgramId);
958
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
959
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
960
+ const result = await client.setDelegationFee(newFee);
961
+ const slot = await this.solanaConnection.getSlot();
962
+ return {
963
+ hash: result.signature,
964
+ chainType: types_1.ChainType.SOLANA,
965
+ slot,
966
+ timestamp: Date.now()
967
+ };
968
+ }
969
+ async pause() {
970
+ if (this.chainType === types_1.ChainType.EVM) {
971
+ return this.pauseEVM();
972
+ }
973
+ else {
974
+ return this.pauseSolana();
975
+ }
976
+ }
977
+ async pauseEVM() {
978
+ if (!this.evmWalletClient || !this.evmPublicClient || !this.evmContractAddress) {
979
+ throw new Error('EVM client not properly initialized');
980
+ }
981
+ const { MailerClient } = await this.getEVMModules();
982
+ const client = new MailerClient(this.evmContractAddress, this.evmPublicClient);
983
+ const [account] = await this.evmWalletClient.getAddresses();
984
+ const result = await client.pause(this.evmWalletClient, account);
985
+ return {
986
+ hash: result.hash,
987
+ chainType: types_1.ChainType.EVM,
988
+ blockNumber: result.blockNumber,
989
+ timestamp: Date.now()
990
+ };
991
+ }
992
+ async pauseSolana() {
993
+ if (!this.solanaWallet || !this.solanaConnection || !this.solanaProgramId || !this.solanaUsdcMint) {
994
+ throw new Error('Solana client not properly initialized');
995
+ }
996
+ const { MailerClient, PublicKey } = await this.getSolanaModules();
997
+ const programId = new PublicKey(this.solanaProgramId);
998
+ const usdcMint = new PublicKey(this.solanaUsdcMint);
999
+ const client = new MailerClient(this.solanaConnection, this.solanaWallet, programId, usdcMint);
1000
+ const result = await client.pause();
1001
+ const slot = await this.solanaConnection.getSlot();
1002
+ return {
1003
+ hash: result.signature,
1004
+ chainType: types_1.ChainType.SOLANA,
1005
+ slot,
1006
+ timestamp: Date.now()
1007
+ };
1008
+ }
1009
+ // Utility methods
1010
+ getChainType() {
1011
+ return this.chainType;
1012
+ }
1013
+ getWalletAddress() {
1014
+ if (this.chainType === types_1.ChainType.EVM) {
1015
+ // Try to get address from raw wallet for backward compatibility
1016
+ // @ts-ignore
1017
+ if (this._rawEvmWallet) {
1018
+ // @ts-ignore
1019
+ return this._rawEvmWallet.address || this._rawEvmWallet.selectedAddress || '';
1020
+ }
1021
+ return ''; // Caller should use getWalletAddressAsync() for accurate address
1022
+ }
1023
+ else if (this.chainType === types_1.ChainType.SOLANA && this.solanaWallet) {
1024
+ return this.solanaWallet.publicKey?.toString() || '';
1025
+ }
1026
+ return '';
1027
+ }
1028
+ /**
1029
+ * Get wallet address asynchronously
1030
+ */
1031
+ async getWalletAddressAsync() {
1032
+ if (this.chainType === types_1.ChainType.EVM && this.evmWalletClient) {
1033
+ const [address] = await this.evmWalletClient.getAddresses();
1034
+ return address;
1035
+ }
1036
+ else if (this.chainType === types_1.ChainType.SOLANA && this.solanaWallet) {
1037
+ return this.solanaWallet.publicKey?.toString() || '';
1038
+ }
1039
+ throw new Error('Wallet not initialized');
1040
+ }
1041
+ }
1042
+ exports.OnchainMailerClient = OnchainMailerClient;
1043
+ // Cache for dynamic imports
1044
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1045
+ OnchainMailerClient.evmModules = null;
1046
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1047
+ OnchainMailerClient.solanaModules = null;
1048
+ //# sourceMappingURL=onchain-mailer-client.js.map