@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,102 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { QueryClient } from '@tanstack/react-query';
3
+ import { OnchainMailerClient } from '../../unified/onchain-mailer-client';
4
+ import type { ChainConfig } from '../../unified/types';
5
+ /**
6
+ * Props for MailerProvider
7
+ */
8
+ export interface MailerProviderProps {
9
+ /** Child components */
10
+ children: ReactNode;
11
+ /** Wallet instance (EVM or Solana) */
12
+ wallet: any;
13
+ /** Chain configuration */
14
+ config: ChainConfig;
15
+ /** Optional React Query client (creates default if not provided) */
16
+ queryClient?: QueryClient;
17
+ }
18
+ /**
19
+ * Provider component for Mailer client and React Query
20
+ *
21
+ * Wraps your app with OnchainMailerClient and React Query context.
22
+ * All Mailer hooks must be used within this provider.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * import { MailerProvider } from '@johnqh/mail_box_contracts/react';
27
+ *
28
+ * function App() {
29
+ * const wallet = useWallet(); // Your wallet hook
30
+ * const config = {
31
+ * evm: {
32
+ * rpc: 'https://eth-mainnet.g.alchemy.com/v2/YOUR-KEY',
33
+ * chainId: 1,
34
+ * contracts: {
35
+ * mailer: '0x123...',
36
+ * usdc: '0x456...'
37
+ * }
38
+ * }
39
+ * };
40
+ *
41
+ * return (
42
+ * <MailerProvider wallet={wallet} config={config}>
43
+ * <YourApp />
44
+ * </MailerProvider>
45
+ * );
46
+ * }
47
+ * ```
48
+ *
49
+ * @example With custom QueryClient
50
+ * ```tsx
51
+ * import { QueryClient } from '@tanstack/react-query';
52
+ *
53
+ * const customQueryClient = new QueryClient({
54
+ * defaultOptions: {
55
+ * queries: {
56
+ * staleTime: 60 * 1000, // 1 minute
57
+ * },
58
+ * },
59
+ * });
60
+ *
61
+ * function App() {
62
+ * return (
63
+ * <MailerProvider
64
+ * wallet={wallet}
65
+ * config={config}
66
+ * queryClient={customQueryClient}
67
+ * >
68
+ * <YourApp />
69
+ * </MailerProvider>
70
+ * );
71
+ * }
72
+ * ```
73
+ */
74
+ export declare function MailerProvider({ children, wallet, config, queryClient }: MailerProviderProps): React.JSX.Element;
75
+ /**
76
+ * Hook to access the OnchainMailerClient instance
77
+ *
78
+ * Must be used within a MailerProvider component.
79
+ *
80
+ * @throws {Error} When used outside of MailerProvider
81
+ *
82
+ * @example
83
+ * ```tsx
84
+ * function MyComponent() {
85
+ * const client = useMailerClient();
86
+ *
87
+ * const handleDirectCall = async () => {
88
+ * // Direct API call (not recommended, use hooks instead)
89
+ * const fee = await client.getSendFee();
90
+ * console.log('Fee:', fee);
91
+ * };
92
+ *
93
+ * return <button onClick={handleDirectCall}>Get Fee</button>;
94
+ * }
95
+ * ```
96
+ */
97
+ export declare function useMailerClient(): OnchainMailerClient;
98
+ /**
99
+ * Re-export QueryClientProvider for convenience
100
+ */
101
+ export { QueryClientProvider, QueryClient } from '@tanstack/react-query';
102
+ //# sourceMappingURL=MailerProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MailerProvider.d.ts","sourceRoot":"","sources":["../../../../../src/react/context/MailerProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,sCAAsC;IAEtC,MAAM,EAAE,GAAG,CAAC;IACZ,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,oEAAoE;IACpE,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,mBAAmB,qBAgB5F;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,IAAI,mBAAmB,CAQrD;AAED;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,160 @@
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.QueryClient = exports.QueryClientProvider = void 0;
37
+ exports.MailerProvider = MailerProvider;
38
+ exports.useMailerClient = useMailerClient;
39
+ const react_1 = __importStar(require("react"));
40
+ const react_query_1 = require("@tanstack/react-query");
41
+ const onchain_mailer_client_1 = require("../../unified/onchain-mailer-client");
42
+ /**
43
+ * Context for OnchainMailerClient
44
+ */
45
+ const MailerClientContext = (0, react_1.createContext)(null);
46
+ /**
47
+ * Default React Query client with sensible defaults for blockchain queries
48
+ */
49
+ const defaultQueryClient = new react_query_1.QueryClient({
50
+ defaultOptions: {
51
+ queries: {
52
+ retry: 3,
53
+ retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30000),
54
+ refetchOnWindowFocus: false,
55
+ staleTime: 30 * 1000, // 30 seconds default
56
+ },
57
+ mutations: {
58
+ retry: 1,
59
+ },
60
+ },
61
+ });
62
+ /**
63
+ * Provider component for Mailer client and React Query
64
+ *
65
+ * Wraps your app with OnchainMailerClient and React Query context.
66
+ * All Mailer hooks must be used within this provider.
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * import { MailerProvider } from '@johnqh/mail_box_contracts/react';
71
+ *
72
+ * function App() {
73
+ * const wallet = useWallet(); // Your wallet hook
74
+ * const config = {
75
+ * evm: {
76
+ * rpc: 'https://eth-mainnet.g.alchemy.com/v2/YOUR-KEY',
77
+ * chainId: 1,
78
+ * contracts: {
79
+ * mailer: '0x123...',
80
+ * usdc: '0x456...'
81
+ * }
82
+ * }
83
+ * };
84
+ *
85
+ * return (
86
+ * <MailerProvider wallet={wallet} config={config}>
87
+ * <YourApp />
88
+ * </MailerProvider>
89
+ * );
90
+ * }
91
+ * ```
92
+ *
93
+ * @example With custom QueryClient
94
+ * ```tsx
95
+ * import { QueryClient } from '@tanstack/react-query';
96
+ *
97
+ * const customQueryClient = new QueryClient({
98
+ * defaultOptions: {
99
+ * queries: {
100
+ * staleTime: 60 * 1000, // 1 minute
101
+ * },
102
+ * },
103
+ * });
104
+ *
105
+ * function App() {
106
+ * return (
107
+ * <MailerProvider
108
+ * wallet={wallet}
109
+ * config={config}
110
+ * queryClient={customQueryClient}
111
+ * >
112
+ * <YourApp />
113
+ * </MailerProvider>
114
+ * );
115
+ * }
116
+ * ```
117
+ */
118
+ function MailerProvider({ children, wallet, config, queryClient }) {
119
+ // Create OnchainMailerClient instance
120
+ const client = react_1.default.useMemo(() => new onchain_mailer_client_1.OnchainMailerClient(wallet, config), [wallet, config]);
121
+ const qc = queryClient || defaultQueryClient;
122
+ return (react_1.default.createElement(react_query_1.QueryClientProvider, { client: qc },
123
+ react_1.default.createElement(MailerClientContext.Provider, { value: client }, children)));
124
+ }
125
+ /**
126
+ * Hook to access the OnchainMailerClient instance
127
+ *
128
+ * Must be used within a MailerProvider component.
129
+ *
130
+ * @throws {Error} When used outside of MailerProvider
131
+ *
132
+ * @example
133
+ * ```tsx
134
+ * function MyComponent() {
135
+ * const client = useMailerClient();
136
+ *
137
+ * const handleDirectCall = async () => {
138
+ * // Direct API call (not recommended, use hooks instead)
139
+ * const fee = await client.getSendFee();
140
+ * console.log('Fee:', fee);
141
+ * };
142
+ *
143
+ * return <button onClick={handleDirectCall}>Get Fee</button>;
144
+ * }
145
+ * ```
146
+ */
147
+ function useMailerClient() {
148
+ const client = (0, react_1.useContext)(MailerClientContext);
149
+ if (!client) {
150
+ throw new Error('useMailerClient must be used within a MailerProvider');
151
+ }
152
+ return client;
153
+ }
154
+ /**
155
+ * Re-export QueryClientProvider for convenience
156
+ */
157
+ var react_query_2 = require("@tanstack/react-query");
158
+ Object.defineProperty(exports, "QueryClientProvider", { enumerable: true, get: function () { return react_query_2.QueryClientProvider; } });
159
+ Object.defineProperty(exports, "QueryClient", { enumerable: true, get: function () { return react_query_2.QueryClient; } });
160
+ //# sourceMappingURL=MailerProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MailerProvider.js","sourceRoot":"","sources":["../../../../../src/react/context/MailerProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGA,wCAgBC;AAwBD,0CAQC;AAlJD,+CAAoE;AACpE,uDAAyE;AACzE,+EAA0E;AAG1E;;GAEG;AACH,MAAM,mBAAmB,GAAG,IAAA,qBAAa,EAA6B,IAAI,CAAC,CAAC;AAiB5E;;GAEG;AACH,MAAM,kBAAkB,GAAG,IAAI,yBAAW,CAAC;IACzC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,YAAY,EAAE,KAAK,CAAC;YACvE,oBAAoB,EAAE,KAAK;YAC3B,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,qBAAqB;SAC5C;QACD,SAAS,EAAE;YACT,KAAK,EAAE,CAAC;SACT;KACF;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,SAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAuB;IAC3F,sCAAsC;IACtC,MAAM,MAAM,GAAG,eAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,IAAI,2CAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7C,CAAC,MAAM,EAAE,MAAM,CAAC,CACjB,CAAC;IAEF,MAAM,EAAE,GAAG,WAAW,IAAI,kBAAkB,CAAC;IAE7C,OAAO,CACL,8BAAC,iCAAmB,IAAC,MAAM,EAAE,EAAE;QAC7B,8BAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IACxC,QAAQ,CACoB,CACX,CACvB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,eAAe;IAC7B,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,mBAAmB,CAAC,CAAC;IAE/C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,qDAAyE;AAAhE,kHAAA,mBAAmB,OAAA;AAAE,0GAAA,WAAW,OAAA"}
@@ -0,0 +1,301 @@
1
+ import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
2
+ import type { MessageResult, UnifiedTransaction, DelegationResult } from '../../unified/types';
3
+ /**
4
+ * Hook to send a message
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * function SendMessageForm() {
9
+ * const sendMessage = useSendMessage();
10
+ *
11
+ * const handleSend = () => {
12
+ * sendMessage.mutate({
13
+ * subject: 'Hello',
14
+ * body: 'World!',
15
+ * priority: true,
16
+ * resolveSenderToName: false
17
+ * });
18
+ * };
19
+ *
20
+ * return (
21
+ * <button onClick={handleSend} disabled={sendMessage.isPending}>
22
+ * {sendMessage.isPending ? 'Sending...' : 'Send Message'}
23
+ * </button>
24
+ * );
25
+ * }
26
+ * ```
27
+ */
28
+ export declare function useSendMessage(options?: UseMutationOptions<MessageResult, Error, {
29
+ subject: string;
30
+ body: string;
31
+ priority?: boolean;
32
+ resolveSenderToName?: boolean;
33
+ }>): UseMutationResult<MessageResult, Error, {
34
+ subject: string;
35
+ body: string;
36
+ priority?: boolean;
37
+ resolveSenderToName?: boolean;
38
+ }>;
39
+ /**
40
+ * Hook to send a prepared message
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * function SendPreparedButton() {
45
+ * const sendPrepared = useSendPrepared();
46
+ *
47
+ * return (
48
+ * <button
49
+ * onClick={() => sendPrepared.mutate({
50
+ * to: '0x123...',
51
+ * mailId: 'template-001',
52
+ * priority: true
53
+ * })}
54
+ * disabled={sendPrepared.isPending}
55
+ * >
56
+ * Send Prepared
57
+ * </button>
58
+ * );
59
+ * }
60
+ * ```
61
+ */
62
+ export declare function useSendPrepared(options?: UseMutationOptions<MessageResult, Error, {
63
+ to: string;
64
+ mailId: string;
65
+ priority?: boolean;
66
+ resolveSenderToName?: boolean;
67
+ }>): UseMutationResult<MessageResult, Error, {
68
+ to: string;
69
+ mailId: string;
70
+ priority?: boolean;
71
+ resolveSenderToName?: boolean;
72
+ }>;
73
+ /**
74
+ * Hook to send message to email address
75
+ *
76
+ * @example
77
+ * ```tsx
78
+ * function SendToEmailForm() {
79
+ * const sendToEmail = useSendToEmail();
80
+ *
81
+ * return (
82
+ * <button
83
+ * onClick={() => sendToEmail.mutate({
84
+ * toEmail: 'user@example.com',
85
+ * subject: 'Hello',
86
+ * body: 'Welcome!'
87
+ * })}
88
+ * >
89
+ * Send to Email
90
+ * </button>
91
+ * );
92
+ * }
93
+ * ```
94
+ */
95
+ export declare function useSendToEmail(options?: UseMutationOptions<MessageResult, Error, {
96
+ toEmail: string;
97
+ subject: string;
98
+ body: string;
99
+ }>): UseMutationResult<MessageResult, Error, {
100
+ toEmail: string;
101
+ subject: string;
102
+ body: string;
103
+ }>;
104
+ /**
105
+ * Hook to send prepared message to email address
106
+ */
107
+ export declare function useSendPreparedToEmail(options?: UseMutationOptions<MessageResult, Error, {
108
+ toEmail: string;
109
+ mailId: string;
110
+ }>): UseMutationResult<MessageResult, Error, {
111
+ toEmail: string;
112
+ mailId: string;
113
+ }>;
114
+ /**
115
+ * Hook to claim revenue share
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * function ClaimButton() {
120
+ * const { data: claimable } = useGetClaimableAmount();
121
+ * const claimRevenue = useClaimRevenue();
122
+ *
123
+ * if (!claimable || claimable === 0n) return null;
124
+ *
125
+ * return (
126
+ * <button
127
+ * onClick={() => claimRevenue.mutate()}
128
+ * disabled={claimRevenue.isPending}
129
+ * >
130
+ * Claim {Number(claimable) / 1_000_000} USDC
131
+ * </button>
132
+ * );
133
+ * }
134
+ * ```
135
+ */
136
+ export declare function useClaimRevenue(options?: UseMutationOptions<UnifiedTransaction, Error, void>): UseMutationResult<UnifiedTransaction, Error, void>;
137
+ /**
138
+ * Hook to claim owner share (owner only)
139
+ *
140
+ * @example
141
+ * ```tsx
142
+ * function OwnerClaimButton() {
143
+ * const { data: ownerClaimable } = useGetOwnerClaimable();
144
+ * const claimOwner = useClaimOwnerShare();
145
+ *
146
+ * return (
147
+ * <button onClick={() => claimOwner.mutate()}>
148
+ * Claim Owner Fees: {Number(ownerClaimable) / 1_000_000} USDC
149
+ * </button>
150
+ * );
151
+ * }
152
+ * ```
153
+ */
154
+ export declare function useClaimOwnerShare(options?: UseMutationOptions<UnifiedTransaction, Error, void>): UseMutationResult<UnifiedTransaction, Error, void>;
155
+ /**
156
+ * Hook to reclaim expired recipient shares (owner only)
157
+ */
158
+ export declare function useClaimExpiredShares(options?: UseMutationOptions<UnifiedTransaction, Error, {
159
+ recipient: string;
160
+ }>): UseMutationResult<UnifiedTransaction, Error, {
161
+ recipient: string;
162
+ }>;
163
+ /**
164
+ * Hook to delegate to another address
165
+ *
166
+ * @example
167
+ * ```tsx
168
+ * function DelegateButton() {
169
+ * const delegate = useDelegateTo();
170
+ *
171
+ * return (
172
+ * <button
173
+ * onClick={() => delegate.mutate({ delegate: '0xABC...' })}
174
+ * disabled={delegate.isPending}
175
+ * >
176
+ * Delegate
177
+ * </button>
178
+ * );
179
+ * }
180
+ * ```
181
+ */
182
+ export declare function useDelegateTo(options?: UseMutationOptions<DelegationResult, Error, {
183
+ delegate: string;
184
+ }>): UseMutationResult<DelegationResult, Error, {
185
+ delegate: string;
186
+ }>;
187
+ /**
188
+ * Hook to reject a delegation made to you
189
+ *
190
+ * @example
191
+ * ```tsx
192
+ * function RejectDelegationButton({ delegatorAddress }: { delegatorAddress: string }) {
193
+ * const rejectDelegation = useRejectDelegation();
194
+ *
195
+ * return (
196
+ * <button
197
+ * onClick={() => rejectDelegation.mutate({ delegatorAddress })}
198
+ * >
199
+ * Reject Delegation
200
+ * </button>
201
+ * );
202
+ * }
203
+ * ```
204
+ */
205
+ export declare function useRejectDelegation(options?: UseMutationOptions<UnifiedTransaction, Error, {
206
+ delegatorAddress: string;
207
+ }>): UseMutationResult<UnifiedTransaction, Error, {
208
+ delegatorAddress: string;
209
+ }>;
210
+ /**
211
+ * Hook to set send fee (owner only)
212
+ *
213
+ * @example
214
+ * ```tsx
215
+ * function SetFeeForm() {
216
+ * const setFee = useSetFee();
217
+ *
218
+ * return (
219
+ * <button onClick={() => setFee.mutate({ newFee: 200000n })}>
220
+ * Update Fee to 0.2 USDC
221
+ * </button>
222
+ * );
223
+ * }
224
+ * ```
225
+ */
226
+ export declare function useSetFee(options?: UseMutationOptions<UnifiedTransaction, Error, {
227
+ newFee: bigint;
228
+ }>): UseMutationResult<UnifiedTransaction, Error, {
229
+ newFee: bigint;
230
+ }>;
231
+ /**
232
+ * Hook to set delegation fee (owner only)
233
+ */
234
+ export declare function useSetDelegationFee(options?: UseMutationOptions<UnifiedTransaction, Error, {
235
+ newFee: bigint;
236
+ }>): UseMutationResult<UnifiedTransaction, Error, {
237
+ newFee: bigint;
238
+ }>;
239
+ /**
240
+ * Hook to pause the contract (owner only)
241
+ *
242
+ * @example
243
+ * ```tsx
244
+ * function PauseButton() {
245
+ * const pause = usePause();
246
+ *
247
+ * return (
248
+ * <button
249
+ * onClick={() => pause.mutate()}
250
+ * disabled={pause.isPending}
251
+ * >
252
+ * Pause Contract
253
+ * </button>
254
+ * );
255
+ * }
256
+ * ```
257
+ */
258
+ export declare function usePause(options?: UseMutationOptions<UnifiedTransaction, Error, void>): UseMutationResult<UnifiedTransaction, Error, void>;
259
+ /**
260
+ * Hook to unpause the contract (owner only)
261
+ *
262
+ * @example
263
+ * ```tsx
264
+ * function UnpauseButton() {
265
+ * const unpause = useUnpause();
266
+ *
267
+ * return (
268
+ * <button onClick={() => unpause.mutate()}>
269
+ * Unpause Contract
270
+ * </button>
271
+ * );
272
+ * }
273
+ * ```
274
+ */
275
+ export declare function useUnpause(options?: UseMutationOptions<UnifiedTransaction, Error, void>): UseMutationResult<UnifiedTransaction, Error, void>;
276
+ /**
277
+ * Hook to emergency unpause (owner only)
278
+ */
279
+ export declare function useEmergencyUnpause(options?: UseMutationOptions<UnifiedTransaction, Error, void>): UseMutationResult<UnifiedTransaction, Error, void>;
280
+ /**
281
+ * Hook to distribute claimable funds (anyone can call when paused)
282
+ *
283
+ * @example
284
+ * ```tsx
285
+ * function DistributeFundsButton({ recipient }: { recipient: string }) {
286
+ * const distribute = useDistributeClaimableFunds();
287
+ *
288
+ * return (
289
+ * <button onClick={() => distribute.mutate({ recipient })}>
290
+ * Distribute Funds to {recipient}
291
+ * </button>
292
+ * );
293
+ * }
294
+ * ```
295
+ */
296
+ export declare function useDistributeClaimableFunds(options?: UseMutationOptions<UnifiedTransaction, Error, {
297
+ recipient: string;
298
+ }>): UseMutationResult<UnifiedTransaction, Error, {
299
+ recipient: string;
300
+ }>;
301
+ //# sourceMappingURL=useMailerMutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMailerMutations.d.ts","sourceRoot":"","sources":["../../../../../src/react/hooks/useMailerMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,kBAAkB,EAAE,iBAAiB,EAAkB,MAAM,uBAAuB,CAAC;AAG3G,OAAO,KAAK,EAAE,aAAa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