@evergonlabs/tmi-protocol-api 0.4.1 → 0.7.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 (886) hide show
  1. package/README.md +169 -0
  2. package/dist/app.d.ts +3252 -2556
  3. package/dist/app.d.ts.map +1 -1
  4. package/dist/app.js +36 -19
  5. package/dist/apps.d.ts +30 -0
  6. package/dist/apps.d.ts.map +1 -0
  7. package/dist/apps.js +16 -0
  8. package/dist/client.d.ts +2152 -1687
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +23 -2
  11. package/dist/common/abis/erc20Whitelisted.d.ts +27 -12
  12. package/dist/common/abis/erc20Whitelisted.d.ts.map +1 -1
  13. package/dist/common/abis/erc20Whitelisted.js +192 -1
  14. package/dist/common/blockchain.d.ts +45 -52
  15. package/dist/common/blockchain.d.ts.map +1 -1
  16. package/dist/common/blockchain.js +23 -20
  17. package/dist/common/config.d.ts +19 -1
  18. package/dist/common/config.d.ts.map +1 -1
  19. package/dist/common/config.js +48 -26
  20. package/dist/common/context.d.ts +11 -0
  21. package/dist/common/context.d.ts.map +1 -0
  22. package/dist/common/context.js +0 -0
  23. package/dist/common/controller.d.ts +12 -0
  24. package/dist/common/controller.d.ts.map +1 -0
  25. package/dist/common/controller.js +6 -0
  26. package/dist/common/exports.d.ts +3 -0
  27. package/dist/common/exports.d.ts.map +1 -0
  28. package/dist/common/exports.js +2 -0
  29. package/dist/common/http-error.d.ts +1 -1
  30. package/dist/common/http-error.d.ts.map +1 -1
  31. package/dist/common/indexer/client.d.ts +141 -4
  32. package/dist/common/indexer/client.d.ts.map +1 -1
  33. package/dist/common/indexer/schemas.d.ts +70 -2
  34. package/dist/common/indexer/schemas.d.ts.map +1 -1
  35. package/dist/common/indexer/schemas.js +1 -1
  36. package/dist/common/int256.d.ts +3 -0
  37. package/dist/common/int256.d.ts.map +1 -0
  38. package/dist/common/int256.js +12 -0
  39. package/dist/common/middleware/indexer.d.ts +3 -0
  40. package/dist/common/middleware/indexer.d.ts.map +1 -0
  41. package/dist/common/middleware/indexer.js +7 -0
  42. package/dist/common/models/asset.d.ts +5 -23
  43. package/dist/common/models/asset.d.ts.map +1 -1
  44. package/dist/common/models/asset.js +4 -6
  45. package/dist/common/models/base/chainId.d.ts +8 -0
  46. package/dist/common/models/base/chainId.d.ts.map +1 -0
  47. package/dist/common/models/base/chainId.js +11 -0
  48. package/dist/common/models/base/deployTransaction.d.ts +8 -0
  49. package/dist/common/models/base/deployTransaction.d.ts.map +1 -0
  50. package/dist/common/models/base/deployTransaction.js +7 -0
  51. package/dist/common/models/base/page.d.ts +7 -0
  52. package/dist/common/models/base/page.d.ts.map +1 -0
  53. package/dist/common/models/base/page.js +5 -0
  54. package/dist/common/models/base/transaction.d.ts +13 -0
  55. package/dist/common/models/base/transaction.d.ts.map +1 -0
  56. package/dist/common/models/base/transaction.js +12 -0
  57. package/dist/common/models/base/viem.d.ts +6 -0
  58. package/dist/common/models/base/viem.d.ts.map +1 -0
  59. package/dist/common/models/base/viem.js +5 -0
  60. package/dist/common/models/chainId.d.ts +7 -4
  61. package/dist/common/models/chainId.d.ts.map +1 -1
  62. package/dist/common/models/chainId.js +25 -18
  63. package/dist/common/models/compilot.d.ts +3 -0
  64. package/dist/common/models/compilot.d.ts.map +1 -0
  65. package/dist/common/models/compilot.js +1 -0
  66. package/dist/common/models/date.d.ts +5 -2
  67. package/dist/common/models/date.d.ts.map +1 -1
  68. package/dist/common/models/date.js +13 -5
  69. package/dist/common/models/deployTransaction.d.ts +8 -0
  70. package/dist/common/models/deployTransaction.d.ts.map +1 -0
  71. package/dist/common/models/deployTransaction.js +12 -0
  72. package/dist/common/models/erc721.d.ts +3 -11
  73. package/dist/common/models/erc721.d.ts.map +1 -1
  74. package/dist/common/models/erc721.js +2 -4
  75. package/dist/common/models/exports.d.ts +5 -0
  76. package/dist/common/models/exports.d.ts.map +1 -0
  77. package/dist/common/models/exports.js +4 -0
  78. package/dist/common/models/index.d.ts +7 -4
  79. package/dist/common/models/index.d.ts.map +1 -1
  80. package/dist/common/models/index.js +7 -4
  81. package/dist/common/models/numOrStr.d.ts +7 -0
  82. package/dist/common/models/numOrStr.d.ts.map +1 -0
  83. package/dist/common/models/numOrStr.js +11 -0
  84. package/dist/common/models/page.d.ts +3 -8
  85. package/dist/common/models/page.d.ts.map +1 -1
  86. package/dist/common/models/page.js +2 -5
  87. package/dist/common/models/platform.d.ts +19 -6
  88. package/dist/common/models/platform.d.ts.map +1 -1
  89. package/dist/common/models/platform.js +6 -6
  90. package/dist/common/models/routes.d.ts +2 -10
  91. package/dist/common/models/routes.d.ts.map +1 -1
  92. package/dist/common/models/routes.js +1 -1
  93. package/dist/common/models/saleId.d.ts +3 -9
  94. package/dist/common/models/saleId.d.ts.map +1 -1
  95. package/dist/common/models/saleId.js +2 -1
  96. package/dist/common/models/transaction.d.ts +20 -81
  97. package/dist/common/models/transaction.d.ts.map +1 -1
  98. package/dist/common/models/transaction.js +12 -20
  99. package/dist/common/models/viem.d.ts +5 -3
  100. package/dist/common/models/viem.d.ts.map +1 -1
  101. package/dist/common/models/viem.js +6 -1
  102. package/dist/common/roles/erc20-gated-roles.d.ts +4 -2
  103. package/dist/common/roles/erc20-gated-roles.d.ts.map +1 -1
  104. package/dist/common/roles/erc20-gated-roles.js +3 -1
  105. package/dist/common/roles/erc721-factory-roles.d.ts +8 -0
  106. package/dist/common/roles/erc721-factory-roles.d.ts.map +1 -0
  107. package/dist/common/roles/erc721-factory-roles.js +13 -0
  108. package/dist/common/roles/exports.d.ts +3 -0
  109. package/dist/common/roles/exports.d.ts.map +1 -0
  110. package/dist/common/roles/exports.js +2 -0
  111. package/dist/factory.d.ts +11 -0
  112. package/dist/factory.d.ts.map +1 -0
  113. package/dist/factory.js +19 -0
  114. package/dist/fractions/activity/searchActivity.route.d.ts +24 -24
  115. package/dist/fractions/activity/searchActivity.route.d.ts.map +1 -1
  116. package/dist/fractions/activity/searchActivity.route.js +3 -4
  117. package/dist/fractions/activity/utils.d.ts +11 -11
  118. package/dist/fractions/activity/utils.js +2 -2
  119. package/dist/fractions/approveSale/v0/approveSale.route.d.ts +3 -3
  120. package/dist/fractions/approveWrapper/v0/approveWrapper.route.d.ts +9 -9
  121. package/dist/fractions/completeSale/v0/completeSale.route.d.ts +3 -3
  122. package/dist/fractions/createFractions/v0/createFractions.route.d.ts +23 -23
  123. package/dist/fractions/createFractions/v0/createFractions.route.d.ts.map +1 -1
  124. package/dist/fractions/createFractions/v0/createFractions.route.js +3 -16
  125. package/dist/fractions/createFractions/v0/createFractions.schema.d.ts +34 -23
  126. package/dist/fractions/createFractions/v0/createFractions.schema.d.ts.map +1 -1
  127. package/dist/fractions/createFractions/v0/createFractions.schema.js +13 -2
  128. package/dist/fractions/createFractions/v0/parseFractionsCreatedEvent.d.ts +2 -2
  129. package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts +55 -28
  130. package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts.map +1 -1
  131. package/dist/fractions/deployMarket/v0/deployMarket.routes.js +32 -33
  132. package/dist/fractions/deployMarket/v0/deployMarket.schema.d.ts +6 -3
  133. package/dist/fractions/deployMarket/v0/deployMarket.schema.d.ts.map +1 -1
  134. package/dist/fractions/deployMarket/v0/deployMarket.schema.js +5 -2
  135. package/dist/fractions/deployMarket/v0/index.d.ts +3 -0
  136. package/dist/fractions/deployMarket/v0/index.d.ts.map +1 -0
  137. package/dist/fractions/deployMarket/v0/index.js +2 -0
  138. package/dist/fractions/deployMarket/v0/initNid.route.d.ts +3 -3
  139. package/dist/fractions/fractions/approveWrapper.route.d.ts +88 -0
  140. package/dist/fractions/fractions/approveWrapper.route.d.ts.map +1 -0
  141. package/dist/fractions/fractions/approveWrapper.route.js +92 -0
  142. package/dist/fractions/fractions/index.d.ts +72 -0
  143. package/dist/fractions/fractions/index.d.ts.map +1 -0
  144. package/dist/fractions/fractions/index.js +9 -0
  145. package/dist/fractions/gating/v0/getAuthData.d.ts +7 -7
  146. package/dist/fractions/gating/v0/getAuthData.js +2 -2
  147. package/dist/fractions/gating/v0/getNonce.route.d.ts +7 -7
  148. package/dist/fractions/gating/v0/getNonce.route.js +2 -2
  149. package/dist/fractions/grantRole/v0/grantRole.route.d.ts +7 -7
  150. package/dist/fractions/grantRole/v0/grantRole.schema.d.ts +3 -3
  151. package/dist/fractions/grantRole/v0/grantRole.schema.js +2 -2
  152. package/dist/fractions/index.d.ts +1115 -1093
  153. package/dist/fractions/index.d.ts.map +1 -1
  154. package/dist/fractions/index.js +20 -103
  155. package/dist/fractions/markets/common/platform.d.ts +23 -75
  156. package/dist/fractions/markets/common/platform.d.ts.map +1 -1
  157. package/dist/fractions/markets/common/platform.js +11 -13
  158. package/dist/fractions/markets/getDeployEvent.d.ts +17 -39
  159. package/dist/fractions/markets/getDeployEvent.d.ts.map +1 -1
  160. package/dist/fractions/markets/getDeployEvent.js +9 -8
  161. package/dist/fractions/markets/getMarket/getMarket.d.ts +30 -0
  162. package/dist/fractions/markets/getMarket/getMarket.d.ts.map +1 -0
  163. package/dist/fractions/markets/getMarket/getMarket.js +65 -0
  164. package/dist/fractions/markets/getMarket/index.d.ts +10 -33
  165. package/dist/fractions/markets/getMarket/index.d.ts.map +1 -1
  166. package/dist/fractions/markets/getMarket/index.js +5 -4
  167. package/dist/fractions/markets/getMarket/v0/getMarket.d.ts +23 -23
  168. package/dist/fractions/markets/getMarket/v0/getMarket.d.ts.map +1 -1
  169. package/dist/fractions/markets/getMarket/v0/getMarket.js +3 -4
  170. package/dist/fractions/markets/index.d.ts +18 -60
  171. package/dist/fractions/markets/index.d.ts.map +1 -1
  172. package/dist/fractions/markets/index.js +10 -11
  173. package/dist/fractions/markets/searchMarkets/index.d.ts +7 -30
  174. package/dist/fractions/markets/searchMarkets/index.d.ts.map +1 -1
  175. package/dist/fractions/markets/searchMarkets/index.js +5 -4
  176. package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts +22 -0
  177. package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts.map +1 -0
  178. package/dist/fractions/markets/searchMarkets/searchMarkets.js +45 -0
  179. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts +20 -20
  180. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts.map +1 -1
  181. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.js +3 -4
  182. package/dist/fractions/nftfractions/index.d.ts +6 -0
  183. package/dist/fractions/nftfractions/index.d.ts.map +1 -0
  184. package/dist/fractions/nftfractions/index.js +5 -0
  185. package/dist/fractions/nftfractions/v0/createNftFractions.routes.d.ts +192 -0
  186. package/dist/fractions/nftfractions/v0/createNftFractions.routes.d.ts.map +1 -0
  187. package/dist/fractions/nftfractions/v0/createNftFractions.routes.js +58 -0
  188. package/dist/fractions/nftfractions/v0/createNftFractions.schema.d.ts +245 -0
  189. package/dist/fractions/nftfractions/v0/createNftFractions.schema.d.ts.map +1 -0
  190. package/dist/fractions/nftfractions/v0/createNftFractions.schema.js +65 -0
  191. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.d.ts +96 -0
  192. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.d.ts.map +1 -0
  193. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.js +52 -0
  194. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.d.ts +70 -0
  195. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.d.ts.map +1 -0
  196. package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.js +28 -0
  197. package/dist/fractions/nftfractions/v0/initCompilot.routes.d.ts +74 -0
  198. package/dist/fractions/nftfractions/v0/initCompilot.routes.d.ts.map +1 -0
  199. package/dist/fractions/nftfractions/v0/initCompilot.routes.js +41 -0
  200. package/dist/fractions/platforms/deployMarket.routes.d.ts +158 -0
  201. package/dist/fractions/platforms/deployMarket.routes.d.ts.map +1 -0
  202. package/dist/fractions/platforms/deployMarket.routes.js +131 -0
  203. package/dist/fractions/platforms/deployMarket.schema.d.ts +33 -0
  204. package/dist/fractions/platforms/deployMarket.schema.d.ts.map +1 -0
  205. package/dist/fractions/platforms/deployMarket.schema.js +28 -0
  206. package/dist/fractions/platforms/deployNftFractionsMarket.routes.d.ts +96 -0
  207. package/dist/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +1 -0
  208. package/dist/fractions/platforms/deployNftFractionsMarket.routes.js +52 -0
  209. package/dist/fractions/platforms/deployNftFractionsMarket.schema.d.ts +30 -0
  210. package/dist/fractions/platforms/deployNftFractionsMarket.schema.d.ts.map +1 -0
  211. package/dist/fractions/platforms/deployNftFractionsMarket.schema.js +29 -0
  212. package/dist/fractions/platforms/index.d.ts +196 -0
  213. package/dist/fractions/platforms/index.d.ts.map +1 -0
  214. package/dist/fractions/platforms/index.js +15 -0
  215. package/dist/fractions/platforms/initCompilot.routes.d.ts +36 -0
  216. package/dist/fractions/platforms/initCompilot.routes.d.ts.map +1 -0
  217. package/dist/fractions/platforms/initCompilot.routes.js +40 -0
  218. package/dist/fractions/platforms/initNid.route.d.ts +28 -0
  219. package/dist/fractions/platforms/initNid.route.d.ts.map +1 -0
  220. package/dist/fractions/platforms/initNid.route.js +32 -0
  221. package/dist/fractions/purchase/v0/purchase.route.d.ts +10 -10
  222. package/dist/fractions/purchase/v0/purchase.route.js +2 -2
  223. package/dist/fractions/purchase/v0/statistics.route.d.ts +22 -22
  224. package/dist/fractions/purchase/v0/statistics.route.d.ts.map +1 -1
  225. package/dist/fractions/purchase/v0/statistics.route.js +5 -5
  226. package/dist/fractions/roles/getRoles.d.ts +23 -0
  227. package/dist/fractions/roles/getRoles.d.ts.map +1 -0
  228. package/dist/fractions/roles/getRoles.js +42 -0
  229. package/dist/fractions/roles/grantRole.route.d.ts +27 -0
  230. package/dist/fractions/roles/grantRole.route.d.ts.map +1 -0
  231. package/dist/fractions/roles/grantRole.route.js +34 -0
  232. package/dist/fractions/roles/grantRole.schema.d.ts +16 -0
  233. package/dist/fractions/roles/grantRole.schema.d.ts.map +1 -0
  234. package/dist/fractions/roles/grantRole.schema.js +14 -0
  235. package/dist/fractions/roles/index.d.ts +48 -0
  236. package/dist/fractions/roles/index.d.ts.map +1 -0
  237. package/dist/fractions/roles/index.js +9 -0
  238. package/dist/fractions/sales/activityUtils.d.ts +49 -0
  239. package/dist/fractions/sales/activityUtils.d.ts.map +1 -0
  240. package/dist/fractions/sales/activityUtils.js +68 -0
  241. package/dist/fractions/sales/approveSale.route.d.ts +30 -0
  242. package/dist/fractions/sales/approveSale.route.d.ts.map +1 -0
  243. package/dist/fractions/sales/approveSale.route.js +35 -0
  244. package/dist/fractions/sales/common/fractionsSale.d.ts +50 -326
  245. package/dist/fractions/sales/common/fractionsSale.d.ts.map +1 -1
  246. package/dist/fractions/sales/common/fractionsSale.js +64 -79
  247. package/dist/fractions/sales/completeSale.route.d.ts +30 -0
  248. package/dist/fractions/sales/completeSale.route.d.ts.map +1 -0
  249. package/dist/fractions/sales/completeSale.route.js +35 -0
  250. package/dist/fractions/sales/createFractions.route.d.ts +71 -0
  251. package/dist/fractions/sales/createFractions.route.d.ts.map +1 -0
  252. package/dist/fractions/sales/createFractions.route.js +51 -0
  253. package/dist/fractions/sales/createFractions.schema.d.ts +123 -0
  254. package/dist/fractions/sales/createFractions.schema.d.ts.map +1 -0
  255. package/dist/fractions/sales/createFractions.schema.js +80 -0
  256. package/dist/fractions/sales/createNftFractions.routes.d.ts +180 -0
  257. package/dist/fractions/sales/createNftFractions.routes.d.ts.map +1 -0
  258. package/dist/fractions/sales/createNftFractions.routes.js +58 -0
  259. package/dist/fractions/sales/createNftFractions.schema.d.ts +85 -0
  260. package/dist/fractions/sales/createNftFractions.schema.d.ts.map +1 -0
  261. package/dist/fractions/sales/createNftFractions.schema.js +67 -0
  262. package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +31 -92
  263. package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +1 -1
  264. package/dist/fractions/sales/getFractionSaleStatistics.route.js +15 -16
  265. package/dist/fractions/sales/getVaultAddress.d.ts +31 -49
  266. package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
  267. package/dist/fractions/sales/getVaultAddress.js +13 -12
  268. package/dist/fractions/sales/getWithdrawEvent.d.ts +17 -39
  269. package/dist/fractions/sales/getWithdrawEvent.d.ts.map +1 -1
  270. package/dist/fractions/sales/getWithdrawEvent.js +12 -10
  271. package/dist/fractions/sales/index.d.ts +760 -0
  272. package/dist/fractions/sales/index.d.ts.map +1 -0
  273. package/dist/fractions/sales/index.js +52 -0
  274. package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts +23 -0
  275. package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts.map +1 -0
  276. package/dist/fractions/sales/parseFractionsCreatedEvent.js +59 -0
  277. package/dist/fractions/sales/purchase.route.d.ts +36 -0
  278. package/dist/fractions/sales/purchase.route.d.ts.map +1 -0
  279. package/dist/fractions/sales/purchase.route.js +42 -0
  280. package/dist/fractions/sales/purchaseStatistics.route.d.ts +27 -0
  281. package/dist/fractions/sales/purchaseStatistics.route.d.ts.map +1 -0
  282. package/dist/fractions/sales/purchaseStatistics.route.js +53 -0
  283. package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +56 -140
  284. package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts.map +1 -1
  285. package/dist/fractions/sales/receiveFundsAfterNonFunded.route.js +19 -15
  286. package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +22 -54
  287. package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts.map +1 -1
  288. package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.js +6 -5
  289. package/dist/fractions/sales/recoverFractions.d.ts +65 -103
  290. package/dist/fractions/sales/recoverFractions.d.ts.map +1 -1
  291. package/dist/fractions/sales/recoverFractions.js +13 -11
  292. package/dist/fractions/sales/rejectFractions.d.ts +49 -75
  293. package/dist/fractions/sales/rejectFractions.d.ts.map +1 -1
  294. package/dist/fractions/sales/rejectFractions.js +12 -8
  295. package/dist/fractions/sales/searchActivity.route.d.ts +67 -86
  296. package/dist/fractions/sales/searchActivity.route.d.ts.map +1 -1
  297. package/dist/fractions/sales/searchActivity.route.js +27 -37
  298. package/dist/fractions/sales/searchSales/searchSales.d.ts +24 -0
  299. package/dist/fractions/sales/searchSales/searchSales.d.ts.map +1 -0
  300. package/dist/fractions/sales/searchSales/searchSales.js +50 -0
  301. package/dist/fractions/sales/searchSales/v0/searchSales.d.ts +39 -39
  302. package/dist/fractions/sales/searchSales/v0/searchSales.d.ts.map +1 -1
  303. package/dist/fractions/sales/searchSales/v0/searchSales.js +3 -4
  304. package/dist/fractions/sales/searchWithdrawal.route.d.ts +20 -55
  305. package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +1 -1
  306. package/dist/fractions/sales/searchWithdrawal.route.js +11 -11
  307. package/dist/fractions/sales/setFeeCapLimit.d.ts +27 -70
  308. package/dist/fractions/sales/setFeeCapLimit.d.ts.map +1 -1
  309. package/dist/fractions/sales/setFeeCapLimit.js +12 -8
  310. package/dist/fractions/sales/unlockWrappedAssets.route.d.ts +26 -65
  311. package/dist/fractions/sales/unlockWrappedAssets.route.d.ts.map +1 -1
  312. package/dist/fractions/sales/unlockWrappedAssets.route.js +10 -11
  313. package/dist/fractions/sales/vesting/claimStatistics.route.d.ts +36 -0
  314. package/dist/fractions/sales/vesting/claimStatistics.route.d.ts.map +1 -0
  315. package/dist/fractions/sales/vesting/claimStatistics.route.js +87 -0
  316. package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts +62 -0
  317. package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts.map +1 -0
  318. package/dist/fractions/sales/vesting/claimVestedTokens.route.js +45 -0
  319. package/dist/fractions/sales/vesting/editCliff.route.d.ts +58 -0
  320. package/dist/fractions/sales/vesting/editCliff.route.d.ts.map +1 -0
  321. package/dist/fractions/sales/vesting/editCliff.route.js +45 -0
  322. package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts +22 -0
  323. package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts.map +1 -0
  324. package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.js +58 -0
  325. package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts +27 -27
  326. package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts.map +1 -1
  327. package/dist/fractions/sales/vesting/v0/claimStatistics.route.js +9 -8
  328. package/dist/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts +9 -9
  329. package/dist/fractions/sales/vesting/v0/editCliff.route.d.ts +3 -3
  330. package/dist/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.d.ts +2 -2
  331. package/dist/fractions/sales/withdraw.route.d.ts +29 -0
  332. package/dist/fractions/sales/withdraw.route.d.ts.map +1 -0
  333. package/dist/fractions/sales/withdraw.route.js +30 -0
  334. package/dist/fractions/sig/getAuthData.d.ts +40 -0
  335. package/dist/fractions/sig/getAuthData.d.ts.map +1 -0
  336. package/dist/fractions/sig/getAuthData.js +52 -0
  337. package/dist/fractions/sig/getNonce.route.d.ts +25 -0
  338. package/dist/fractions/sig/getNonce.route.d.ts.map +1 -0
  339. package/dist/fractions/sig/getNonce.route.js +43 -0
  340. package/dist/fractions/sig/index.d.ts +40 -0
  341. package/dist/fractions/sig/index.d.ts.map +1 -0
  342. package/dist/fractions/sig/index.js +6 -0
  343. package/dist/fractions/statistics/index.d.ts +107 -0
  344. package/dist/fractions/statistics/index.d.ts.map +1 -0
  345. package/dist/fractions/statistics/index.js +10 -0
  346. package/dist/fractions/statistics/networkStatistics.route.d.ts +121 -0
  347. package/dist/fractions/statistics/networkStatistics.route.d.ts.map +1 -0
  348. package/dist/fractions/statistics/networkStatistics.route.js +222 -0
  349. package/dist/fractions/withdraw/v0/withdraw.route.d.ts +3 -3
  350. package/dist/general/balanceClient.d.ts +19 -59
  351. package/dist/general/balanceClient.d.ts.map +1 -1
  352. package/dist/general/balanceClient.js +1 -1
  353. package/dist/general/common.d.ts +10 -74
  354. package/dist/general/common.d.ts.map +1 -1
  355. package/dist/general/common.js +5 -9
  356. package/dist/general/estimateGas.d.ts +18 -45
  357. package/dist/general/estimateGas.d.ts.map +1 -1
  358. package/dist/general/estimateGas.js +31 -29
  359. package/dist/general/getBalance.d.ts +16 -37
  360. package/dist/general/getBalance.d.ts.map +1 -1
  361. package/dist/general/getBalance.js +29 -25
  362. package/dist/general/getBalancesBatch.d.ts +22 -56
  363. package/dist/general/getBalancesBatch.d.ts.map +1 -1
  364. package/dist/general/getBalancesBatch.js +23 -19
  365. package/dist/general/index.d.ts +74 -83
  366. package/dist/general/index.d.ts.map +1 -1
  367. package/dist/general/index.js +14 -19
  368. package/dist/general/searchBalances.d.ts +27 -67
  369. package/dist/general/searchBalances.d.ts.map +1 -1
  370. package/dist/general/searchBalances.js +24 -20
  371. package/dist/general/utils/tokenBalance/tokenBalance.d.ts +18 -34
  372. package/dist/general/utils/tokenBalance/tokenBalance.d.ts.map +1 -1
  373. package/dist/general/utils/tokenBalance/tokenBalance.js +5 -5
  374. package/dist/issuance/approve.d.ts +3 -3
  375. package/dist/issuance/approve.js +1 -1
  376. package/dist/issuance/burn.d.ts +3 -3
  377. package/dist/issuance/burn.js +1 -1
  378. package/dist/issuance/common/exports.d.ts +2 -0
  379. package/dist/issuance/common/exports.d.ts.map +1 -0
  380. package/dist/issuance/common/exports.js +1 -0
  381. package/dist/issuance/common/factories.d.ts +167 -0
  382. package/dist/issuance/common/factories.d.ts.map +1 -0
  383. package/dist/issuance/common/factories.js +15 -0
  384. package/dist/issuance/deploy.d.ts +19 -12
  385. package/dist/issuance/deploy.d.ts.map +1 -1
  386. package/dist/issuance/deploy.js +49 -2
  387. package/dist/issuance/erc20/approve.d.ts +32 -0
  388. package/dist/issuance/erc20/approve.d.ts.map +1 -0
  389. package/dist/issuance/erc20/approve.js +38 -0
  390. package/dist/issuance/erc20/burn.d.ts +32 -0
  391. package/dist/issuance/erc20/burn.d.ts.map +1 -0
  392. package/dist/issuance/erc20/burn.js +38 -0
  393. package/dist/issuance/erc20/deploy.d.ts +40 -0
  394. package/dist/issuance/erc20/deploy.d.ts.map +1 -0
  395. package/dist/issuance/erc20/deploy.js +56 -0
  396. package/dist/issuance/erc20/getInitData.d.ts +59 -0
  397. package/dist/issuance/erc20/getInitData.d.ts.map +1 -0
  398. package/dist/issuance/erc20/getInitData.js +49 -0
  399. package/dist/issuance/erc20/grantRole.d.ts +33 -0
  400. package/dist/issuance/erc20/grantRole.d.ts.map +1 -0
  401. package/dist/issuance/erc20/grantRole.js +41 -0
  402. package/dist/issuance/erc20/index.d.ts +297 -0
  403. package/dist/issuance/erc20/index.d.ts.map +1 -0
  404. package/dist/issuance/erc20/index.js +29 -0
  405. package/dist/issuance/erc20/initialize.d.ts +40 -0
  406. package/dist/issuance/erc20/initialize.d.ts.map +1 -0
  407. package/dist/issuance/erc20/initialize.js +45 -0
  408. package/dist/issuance/erc20/mint.d.ts +32 -0
  409. package/dist/issuance/erc20/mint.d.ts.map +1 -0
  410. package/dist/issuance/erc20/mint.js +38 -0
  411. package/dist/issuance/erc20/parseErc20DeployEvent.d.ts +23 -0
  412. package/dist/issuance/erc20/parseErc20DeployEvent.d.ts.map +1 -0
  413. package/dist/issuance/erc20/parseErc20DeployEvent.js +79 -0
  414. package/dist/issuance/erc20/recover.d.ts +34 -0
  415. package/dist/issuance/erc20/recover.d.ts.map +1 -0
  416. package/dist/issuance/erc20/recover.js +39 -0
  417. package/dist/issuance/erc20/renounceRole.d.ts +33 -0
  418. package/dist/issuance/erc20/renounceRole.d.ts.map +1 -0
  419. package/dist/issuance/erc20/renounceRole.js +41 -0
  420. package/dist/issuance/erc20/revokeRole.d.ts +33 -0
  421. package/dist/issuance/erc20/revokeRole.d.ts.map +1 -0
  422. package/dist/issuance/erc20/revokeRole.js +41 -0
  423. package/dist/issuance/erc20/transfer.d.ts +32 -0
  424. package/dist/issuance/erc20/transfer.d.ts.map +1 -0
  425. package/dist/issuance/erc20/transfer.js +38 -0
  426. package/dist/issuance/erc20/transferFrom.d.ts +34 -0
  427. package/dist/issuance/erc20/transferFrom.d.ts.map +1 -0
  428. package/dist/issuance/erc20/transferFrom.js +39 -0
  429. package/dist/issuance/erc721/approve.d.ts +32 -0
  430. package/dist/issuance/erc721/approve.d.ts.map +1 -0
  431. package/dist/issuance/erc721/approve.js +38 -0
  432. package/dist/issuance/erc721/burn.d.ts +30 -0
  433. package/dist/issuance/erc721/burn.d.ts.map +1 -0
  434. package/dist/issuance/erc721/burn.js +37 -0
  435. package/dist/issuance/erc721/deploy.d.ts +40 -0
  436. package/dist/issuance/erc721/deploy.d.ts.map +1 -0
  437. package/dist/issuance/erc721/deploy.js +55 -0
  438. package/dist/issuance/erc721/getInitData.d.ts +49 -0
  439. package/dist/issuance/erc721/getInitData.d.ts.map +1 -0
  440. package/dist/issuance/erc721/getInitData.js +51 -0
  441. package/dist/issuance/erc721/grantRole.d.ts +33 -0
  442. package/dist/issuance/erc721/grantRole.d.ts.map +1 -0
  443. package/dist/issuance/erc721/grantRole.js +41 -0
  444. package/dist/issuance/erc721/index.d.ts +318 -0
  445. package/dist/issuance/erc721/index.d.ts.map +1 -0
  446. package/dist/issuance/erc721/index.js +31 -0
  447. package/dist/issuance/erc721/initialize.d.ts +38 -0
  448. package/dist/issuance/erc721/initialize.d.ts.map +1 -0
  449. package/dist/issuance/erc721/initialize.js +40 -0
  450. package/dist/issuance/erc721/mint.d.ts +32 -0
  451. package/dist/issuance/erc721/mint.d.ts.map +1 -0
  452. package/dist/issuance/erc721/mint.js +38 -0
  453. package/dist/issuance/erc721/parseErc721DeployEvent.d.ts +23 -0
  454. package/dist/issuance/erc721/parseErc721DeployEvent.d.ts.map +1 -0
  455. package/dist/issuance/erc721/parseErc721DeployEvent.js +78 -0
  456. package/dist/issuance/erc721/recover.d.ts +34 -0
  457. package/dist/issuance/erc721/recover.d.ts.map +1 -0
  458. package/dist/issuance/erc721/recover.js +39 -0
  459. package/dist/issuance/erc721/renounceRole.d.ts +33 -0
  460. package/dist/issuance/erc721/renounceRole.d.ts.map +1 -0
  461. package/dist/issuance/erc721/renounceRole.js +41 -0
  462. package/dist/issuance/erc721/revokeRole.d.ts +33 -0
  463. package/dist/issuance/erc721/revokeRole.d.ts.map +1 -0
  464. package/dist/issuance/erc721/revokeRole.js +41 -0
  465. package/dist/issuance/erc721/setBaseURI.d.ts +30 -0
  466. package/dist/issuance/erc721/setBaseURI.d.ts.map +1 -0
  467. package/dist/issuance/erc721/setBaseURI.js +36 -0
  468. package/dist/issuance/erc721/setTokenURI.d.ts +32 -0
  469. package/dist/issuance/erc721/setTokenURI.d.ts.map +1 -0
  470. package/dist/issuance/erc721/setTokenURI.js +38 -0
  471. package/dist/issuance/erc721/transferFrom.d.ts +34 -0
  472. package/dist/issuance/erc721/transferFrom.d.ts.map +1 -0
  473. package/dist/issuance/erc721/transferFrom.js +39 -0
  474. package/dist/issuance/exports.d.ts +2 -0
  475. package/dist/issuance/exports.d.ts.map +1 -0
  476. package/dist/issuance/exports.js +1 -0
  477. package/dist/issuance/getInitData.d.ts +67 -10
  478. package/dist/issuance/getInitData.d.ts.map +1 -1
  479. package/dist/issuance/getInitData.js +52 -1
  480. package/dist/issuance/grantRole.d.ts +9 -9
  481. package/dist/issuance/grantRole.js +1 -1
  482. package/dist/issuance/index.d.ts +634 -228
  483. package/dist/issuance/index.d.ts.map +1 -1
  484. package/dist/issuance/index.js +12 -30
  485. package/dist/issuance/mint.d.ts +3 -3
  486. package/dist/issuance/mint.js +1 -1
  487. package/dist/issuance/proxy/deploy.d.ts +41 -0
  488. package/dist/issuance/proxy/deploy.d.ts.map +1 -0
  489. package/dist/issuance/proxy/deploy.js +68 -0
  490. package/dist/issuance/proxy/index.d.ts +59 -0
  491. package/dist/issuance/proxy/index.d.ts.map +1 -0
  492. package/dist/issuance/proxy/index.js +10 -0
  493. package/dist/issuance/proxy/upgrade.d.ts +34 -0
  494. package/dist/issuance/proxy/upgrade.d.ts.map +1 -0
  495. package/dist/issuance/proxy/upgrade.js +46 -0
  496. package/dist/issuance/recover.d.ts +82 -0
  497. package/dist/issuance/recover.d.ts.map +1 -0
  498. package/dist/issuance/recover.js +38 -0
  499. package/dist/issuance/renounceRole.d.ts +9 -9
  500. package/dist/issuance/renounceRole.js +1 -1
  501. package/dist/issuance/transfer.d.ts +9 -9
  502. package/dist/issuance/transfer.js +1 -1
  503. package/dist/issuance/upgrade.d.ts +3 -3
  504. package/dist/next/fractions/index.d.ts +275 -0
  505. package/dist/next/fractions/index.d.ts.map +1 -0
  506. package/dist/next/fractions/index.js +13 -0
  507. package/dist/next/fractions/lending/buyback/buyback.routes.d.ts +27 -0
  508. package/dist/next/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
  509. package/dist/next/fractions/lending/buyback/buyback.routes.js +28 -0
  510. package/dist/next/fractions/lending/buyback/buyback.schema.d.ts +8 -0
  511. package/dist/next/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
  512. package/dist/next/fractions/lending/buyback/buyback.schema.js +13 -0
  513. package/dist/next/fractions/lending/createLendingSale.d.ts +130 -0
  514. package/dist/next/fractions/lending/createLendingSale.d.ts.map +1 -0
  515. package/dist/next/fractions/lending/createLendingSale.js +82 -0
  516. package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts +44 -0
  517. package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
  518. package/dist/next/fractions/lending/deployMarket/lending.routes.js +40 -0
  519. package/dist/next/fractions/lending/index.d.ts +188 -0
  520. package/dist/next/fractions/lending/index.d.ts.map +1 -0
  521. package/dist/next/fractions/lending/index.js +15 -0
  522. package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts +33 -0
  523. package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
  524. package/dist/next/fractions/lending/purchase/directPurchase.route.js +34 -0
  525. package/dist/next/fractions/lending/schemas.d.ts +25 -0
  526. package/dist/next/fractions/lending/schemas.d.ts.map +1 -0
  527. package/dist/next/fractions/lending/schemas.js +21 -0
  528. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +26 -0
  529. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
  530. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +28 -0
  531. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +7 -0
  532. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
  533. package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +11 -0
  534. package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts +39 -0
  535. package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +1 -0
  536. package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.js +40 -0
  537. package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts +26 -0
  538. package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts.map +1 -0
  539. package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.js +24 -0
  540. package/dist/next/fractions/platforms/index.d.ts +36 -0
  541. package/dist/next/fractions/platforms/index.d.ts.map +1 -0
  542. package/dist/next/fractions/platforms/index.js +5 -0
  543. package/dist/next/fractions/sales/createNftFractions.routes.d.ts +58 -0
  544. package/dist/next/fractions/sales/createNftFractions.routes.d.ts.map +1 -0
  545. package/dist/next/fractions/sales/createNftFractions.routes.js +59 -0
  546. package/dist/next/fractions/sales/createNftFractions.schema.d.ts +85 -0
  547. package/dist/next/fractions/sales/createNftFractions.schema.d.ts.map +1 -0
  548. package/dist/next/fractions/sales/createNftFractions.schema.js +67 -0
  549. package/dist/next/fractions/sales/index.d.ts +55 -0
  550. package/dist/next/fractions/sales/index.d.ts.map +1 -0
  551. package/dist/next/fractions/sales/index.js +5 -0
  552. package/dist/staking/index.d.ts +193 -202
  553. package/dist/staking/index.d.ts.map +1 -1
  554. package/dist/staking/index.js +14 -19
  555. package/dist/staking/platforms/common/platform.d.ts +7 -21
  556. package/dist/staking/platforms/common/platform.d.ts.map +1 -1
  557. package/dist/staking/platforms/common/platform.js +6 -8
  558. package/dist/staking/platforms/getPlatform/index.d.ts +9 -12
  559. package/dist/staking/platforms/getPlatform/index.d.ts.map +1 -1
  560. package/dist/staking/platforms/getPlatform/index.js +5 -4
  561. package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +21 -49
  562. package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +1 -1
  563. package/dist/staking/platforms/getPlatform/v0/getPlatform.js +23 -13
  564. package/dist/staking/platforms/index.d.ts +19 -21
  565. package/dist/staking/platforms/index.d.ts.map +1 -1
  566. package/dist/staking/platforms/index.js +8 -9
  567. package/dist/staking/platforms/searchPlatforms/index.d.ts +11 -14
  568. package/dist/staking/platforms/searchPlatforms/index.d.ts.map +1 -1
  569. package/dist/staking/platforms/searchPlatforms/index.js +5 -4
  570. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +27 -73
  571. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +1 -1
  572. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +15 -12
  573. package/dist/staking/pools/common/pool.d.ts +9 -25
  574. package/dist/staking/pools/common/pool.d.ts.map +1 -1
  575. package/dist/staking/pools/common/pool.js +5 -7
  576. package/dist/staking/pools/getPool/index.d.ts +4 -7
  577. package/dist/staking/pools/getPool/index.d.ts.map +1 -1
  578. package/dist/staking/pools/getPool/index.js +5 -4
  579. package/dist/staking/pools/getPool/v0/getPool.d.ts +14 -32
  580. package/dist/staking/pools/getPool/v0/getPool.d.ts.map +1 -1
  581. package/dist/staking/pools/getPool/v0/getPool.js +23 -12
  582. package/dist/staking/pools/index.d.ts +10 -12
  583. package/dist/staking/pools/index.d.ts.map +1 -1
  584. package/dist/staking/pools/index.js +8 -9
  585. package/dist/staking/pools/searchPools/index.d.ts +7 -10
  586. package/dist/staking/pools/searchPools/index.d.ts.map +1 -1
  587. package/dist/staking/pools/searchPools/index.js +5 -4
  588. package/dist/staking/pools/searchPools/v0/searchPools.d.ts +19 -52
  589. package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +1 -1
  590. package/dist/staking/pools/searchPools/v0/searchPools.js +14 -11
  591. package/dist/staking/roles/common/role.d.ts +4 -10
  592. package/dist/staking/roles/common/role.d.ts.map +1 -1
  593. package/dist/staking/roles/common/role.js +2 -4
  594. package/dist/staking/roles/common/roleAssignment.d.ts +9 -25
  595. package/dist/staking/roles/common/roleAssignment.d.ts.map +1 -1
  596. package/dist/staking/roles/common/roleAssignment.js +5 -7
  597. package/dist/staking/roles/common/roleEvent.d.ts +8 -26
  598. package/dist/staking/roles/common/roleEvent.d.ts.map +1 -1
  599. package/dist/staking/roles/common/roleEvent.js +3 -5
  600. package/dist/staking/roles/getRoles/index.d.ts +3 -6
  601. package/dist/staking/roles/getRoles/index.d.ts.map +1 -1
  602. package/dist/staking/roles/getRoles/index.js +5 -4
  603. package/dist/staking/roles/getRoles/v0/getRoles.d.ts +22 -28
  604. package/dist/staking/roles/getRoles/v0/getRoles.d.ts.map +1 -1
  605. package/dist/staking/roles/getRoles/v0/getRoles.js +9 -6
  606. package/dist/staking/roles/grantRole/index.d.ts +6 -9
  607. package/dist/staking/roles/grantRole/index.d.ts.map +1 -1
  608. package/dist/staking/roles/grantRole/index.js +5 -4
  609. package/dist/staking/roles/grantRole/v0/grantRole.d.ts +23 -60
  610. package/dist/staking/roles/grantRole/v0/grantRole.d.ts.map +1 -1
  611. package/dist/staking/roles/grantRole/v0/grantRole.js +9 -6
  612. package/dist/staking/roles/index.d.ts +24 -26
  613. package/dist/staking/roles/index.d.ts.map +1 -1
  614. package/dist/staking/roles/index.js +12 -13
  615. package/dist/staking/roles/searchRoleEvents/index.d.ts +9 -12
  616. package/dist/staking/roles/searchRoleEvents/index.d.ts.map +1 -1
  617. package/dist/staking/roles/searchRoleEvents/index.js +5 -4
  618. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +21 -60
  619. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +1 -1
  620. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.js +14 -11
  621. package/dist/staking/roles/searchRoles/index.d.ts +9 -12
  622. package/dist/staking/roles/searchRoles/index.d.ts.map +1 -1
  623. package/dist/staking/roles/searchRoles/index.js +5 -4
  624. package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +21 -60
  625. package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +1 -1
  626. package/dist/staking/roles/searchRoles/v0/searchRoles.js +20 -14
  627. package/dist/staking/stakes/common/stake.d.ts +14 -40
  628. package/dist/staking/stakes/common/stake.d.ts.map +1 -1
  629. package/dist/staking/stakes/common/stake.js +18 -20
  630. package/dist/staking/stakes/common/stakeEvent.d.ts +9 -27
  631. package/dist/staking/stakes/common/stakeEvent.d.ts.map +1 -1
  632. package/dist/staking/stakes/common/stakeEvent.js +4 -6
  633. package/dist/staking/stakes/getStake/index.d.ts +3 -6
  634. package/dist/staking/stakes/getStake/index.d.ts.map +1 -1
  635. package/dist/staking/stakes/getStake/index.js +5 -4
  636. package/dist/staking/stakes/getStake/v0/getStake.d.ts +14 -32
  637. package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +1 -1
  638. package/dist/staking/stakes/getStake/v0/getStake.js +22 -12
  639. package/dist/staking/stakes/index.d.ts +19 -21
  640. package/dist/staking/stakes/index.d.ts.map +1 -1
  641. package/dist/staking/stakes/index.js +10 -11
  642. package/dist/staking/stakes/searchStakeEvents/index.d.ts +9 -12
  643. package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +1 -1
  644. package/dist/staking/stakes/searchStakeEvents/index.js +5 -4
  645. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +21 -60
  646. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +1 -1
  647. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.js +16 -12
  648. package/dist/staking/stakes/searchStakes/index.d.ts +9 -12
  649. package/dist/staking/stakes/searchStakes/index.d.ts.map +1 -1
  650. package/dist/staking/stakes/searchStakes/index.js +5 -4
  651. package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +21 -60
  652. package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +1 -1
  653. package/dist/staking/stakes/searchStakes/v0/searchStakes.js +16 -30
  654. package/dist/staking-templates/index.d.ts +79 -79
  655. package/dist/staking-templates/index.js +1 -1
  656. package/dist/staking-templates/templates/common/amount.d.ts +5 -11
  657. package/dist/staking-templates/templates/common/amount.d.ts.map +1 -1
  658. package/dist/staking-templates/templates/common/amount.js +6 -8
  659. package/dist/staking-templates/templates/common/amountMult.d.ts +2 -2
  660. package/dist/staking-templates/templates/common/amountMult.d.ts.map +1 -1
  661. package/dist/staking-templates/templates/common/amountMult.js +3 -4
  662. package/dist/staking-templates/templates/common/erc20Input.d.ts +4 -10
  663. package/dist/staking-templates/templates/common/erc20Input.d.ts.map +1 -1
  664. package/dist/staking-templates/templates/common/erc20Input.js +4 -6
  665. package/dist/staking-templates/templates/common/erc20Reward.d.ts +4 -10
  666. package/dist/staking-templates/templates/common/erc20Reward.d.ts.map +1 -1
  667. package/dist/staking-templates/templates/common/erc20Reward.js +4 -7
  668. package/dist/staking-templates/templates/common/getCreatePoolEvent.d.ts +2 -2
  669. package/dist/staking-templates/templates/common/getCreatePoolEvent.d.ts.map +1 -1
  670. package/dist/staking-templates/templates/common/getCreatePoolEvent.js +3 -3
  671. package/dist/staking-templates/templates/common/getPlatformDeployEvent.d.ts +2 -2
  672. package/dist/staking-templates/templates/common/getPlatformDeployEvent.js +4 -4
  673. package/dist/staking-templates/templates/common/getReward.d.ts +5 -5
  674. package/dist/staking-templates/templates/common/getReward.d.ts.map +1 -1
  675. package/dist/staking-templates/templates/common/getReward.js +2 -2
  676. package/dist/staking-templates/templates/common/getStakeEvent.d.ts +3 -3
  677. package/dist/staking-templates/templates/common/getStakeEvent.d.ts.map +1 -1
  678. package/dist/staking-templates/templates/common/getStakeEvent.js +4 -4
  679. package/dist/staking-templates/templates/common/lock.d.ts +4 -10
  680. package/dist/staking-templates/templates/common/lock.d.ts.map +1 -1
  681. package/dist/staking-templates/templates/common/lock.js +5 -7
  682. package/dist/staking-templates/templates/common/lockMult.d.ts +2 -2
  683. package/dist/staking-templates/templates/common/lockMult.d.ts.map +1 -1
  684. package/dist/staking-templates/templates/common/lockMult.js +3 -4
  685. package/dist/staking-templates/templates/common/partialUnstake.d.ts +7 -7
  686. package/dist/staking-templates/templates/common/partialUnstake.d.ts.map +1 -1
  687. package/dist/staking-templates/templates/common/partialUnstake.js +4 -4
  688. package/dist/staking-templates/templates/common/rewardDistribution.d.ts +5 -11
  689. package/dist/staking-templates/templates/common/rewardDistribution.d.ts.map +1 -1
  690. package/dist/staking-templates/templates/common/rewardDistribution.js +7 -10
  691. package/dist/staking-templates/templates/common/time.d.ts +1 -1
  692. package/dist/staking-templates/templates/common/time.d.ts.map +1 -1
  693. package/dist/staking-templates/templates/common/time.js +2 -2
  694. package/dist/staking-templates/templates/common/unstake.d.ts +5 -5
  695. package/dist/staking-templates/templates/common/unstake.d.ts.map +1 -1
  696. package/dist/staking-templates/templates/common/unstake.js +2 -2
  697. package/dist/staking-templates/templates/reputation/index.d.ts +23 -23
  698. package/dist/staking-templates/templates/reputation/v0/createPlatform.d.ts +8 -8
  699. package/dist/staking-templates/templates/reputation/v0/createPlatform.js +3 -3
  700. package/dist/staking-templates/templates/reputation/v0/createPool.d.ts +19 -19
  701. package/dist/staking-templates/templates/reputation/v0/createPool.d.ts.map +1 -1
  702. package/dist/staking-templates/templates/reputation/v0/createPool.js +6 -6
  703. package/dist/staking-templates/templates/reputation/v0/index.d.ts +23 -23
  704. package/dist/staking-templates/templates/reputation/v0/index.js +5 -5
  705. package/dist/staking-templates/templates/reputation/v0/restake.d.ts +6 -6
  706. package/dist/staking-templates/templates/reputation/v0/restake.js +4 -4
  707. package/dist/staking-templates/templates/reputation/v0/stake.d.ts +7 -7
  708. package/dist/staking-templates/templates/reputation/v0/stake.d.ts.map +1 -1
  709. package/dist/staking-templates/templates/reputation/v0/stake.js +5 -5
  710. package/dist/staking-templates/templates/reputationLock/index.d.ts +30 -30
  711. package/dist/staking-templates/templates/reputationLock/v0/createPlatform.d.ts +8 -8
  712. package/dist/staking-templates/templates/reputationLock/v0/createPlatform.js +3 -3
  713. package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts +31 -31
  714. package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts.map +1 -1
  715. package/dist/staking-templates/templates/reputationLock/v0/createPool.js +7 -7
  716. package/dist/staking-templates/templates/reputationLock/v0/index.d.ts +30 -30
  717. package/dist/staking-templates/templates/reputationLock/v0/index.js +5 -5
  718. package/dist/staking-templates/templates/reputationLock/v0/restake.d.ts +8 -8
  719. package/dist/staking-templates/templates/reputationLock/v0/restake.js +5 -5
  720. package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts +9 -9
  721. package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts.map +1 -1
  722. package/dist/staking-templates/templates/reputationLock/v0/stake.js +5 -5
  723. package/dist/staking-templates/templates/rwa/index.d.ts +26 -26
  724. package/dist/staking-templates/templates/rwa/v0/createPlatform.d.ts +8 -8
  725. package/dist/staking-templates/templates/rwa/v0/createPlatform.js +3 -3
  726. package/dist/staking-templates/templates/rwa/v0/createPool.d.ts +17 -17
  727. package/dist/staking-templates/templates/rwa/v0/createPool.d.ts.map +1 -1
  728. package/dist/staking-templates/templates/rwa/v0/createPool.js +4 -4
  729. package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts +61 -0
  730. package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
  731. package/dist/staking-templates/templates/rwa/v0/distributeRewards.js +41 -0
  732. package/dist/staking-templates/templates/rwa/v0/index.d.ts +26 -26
  733. package/dist/staking-templates/templates/rwa/v0/index.js +7 -7
  734. package/dist/staking-templates/templates/rwa/v0/restake.d.ts +6 -6
  735. package/dist/staking-templates/templates/rwa/v0/restake.js +4 -4
  736. package/dist/staking-templates/templates/rwa/v0/stake.d.ts +7 -7
  737. package/dist/staking-templates/templates/rwa/v0/stake.d.ts.map +1 -1
  738. package/dist/staking-templates/templates/rwa/v0/stake.js +5 -5
  739. package/dist/stakingTemplates/index.d.ts +723 -0
  740. package/dist/stakingTemplates/index.d.ts.map +1 -0
  741. package/dist/stakingTemplates/index.js +13 -0
  742. package/dist/stakingTemplates/templates/common/amount.d.ts +7 -0
  743. package/dist/stakingTemplates/templates/common/amount.d.ts.map +1 -0
  744. package/dist/stakingTemplates/templates/common/amount.js +15 -0
  745. package/dist/stakingTemplates/templates/common/amountMult.d.ts +3 -0
  746. package/dist/stakingTemplates/templates/common/amountMult.d.ts.map +1 -0
  747. package/dist/stakingTemplates/templates/common/amountMult.js +24 -0
  748. package/dist/stakingTemplates/templates/common/erc20Input.d.ts +6 -0
  749. package/dist/stakingTemplates/templates/common/erc20Input.d.ts.map +1 -0
  750. package/dist/stakingTemplates/templates/common/erc20Input.js +16 -0
  751. package/dist/stakingTemplates/templates/common/erc20Reward.d.ts +6 -0
  752. package/dist/stakingTemplates/templates/common/erc20Reward.d.ts.map +1 -0
  753. package/dist/stakingTemplates/templates/common/erc20Reward.js +15 -0
  754. package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts +17 -0
  755. package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts.map +1 -0
  756. package/dist/stakingTemplates/templates/common/getCreatePoolEvent.js +51 -0
  757. package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts +20 -0
  758. package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts.map +1 -0
  759. package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.js +49 -0
  760. package/dist/stakingTemplates/templates/common/getReward.d.ts +26 -0
  761. package/dist/stakingTemplates/templates/common/getReward.d.ts.map +1 -0
  762. package/dist/stakingTemplates/templates/common/getReward.js +37 -0
  763. package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts +17 -0
  764. package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts.map +1 -0
  765. package/dist/stakingTemplates/templates/common/getStakeEvent.js +55 -0
  766. package/dist/stakingTemplates/templates/common/lock.d.ts +6 -0
  767. package/dist/stakingTemplates/templates/common/lock.d.ts.map +1 -0
  768. package/dist/stakingTemplates/templates/common/lock.js +18 -0
  769. package/dist/stakingTemplates/templates/common/lockMult.d.ts +3 -0
  770. package/dist/stakingTemplates/templates/common/lockMult.d.ts.map +1 -0
  771. package/dist/stakingTemplates/templates/common/lockMult.js +16 -0
  772. package/dist/stakingTemplates/templates/common/partialUnstake.d.ts +27 -0
  773. package/dist/stakingTemplates/templates/common/partialUnstake.d.ts.map +1 -0
  774. package/dist/stakingTemplates/templates/common/partialUnstake.js +42 -0
  775. package/dist/stakingTemplates/templates/common/rewardDistribution.d.ts +7 -0
  776. package/dist/stakingTemplates/templates/common/rewardDistribution.d.ts.map +1 -0
  777. package/dist/stakingTemplates/templates/common/rewardDistribution.js +16 -0
  778. package/dist/stakingTemplates/templates/common/templates.d.ts +61 -0
  779. package/dist/stakingTemplates/templates/common/templates.d.ts.map +1 -0
  780. package/dist/stakingTemplates/templates/common/templates.js +8 -0
  781. package/dist/stakingTemplates/templates/common/time.d.ts +2 -0
  782. package/dist/stakingTemplates/templates/common/time.d.ts.map +1 -0
  783. package/dist/stakingTemplates/templates/common/time.js +4 -0
  784. package/dist/stakingTemplates/templates/common/unstake.d.ts +26 -0
  785. package/dist/stakingTemplates/templates/common/unstake.d.ts.map +1 -0
  786. package/dist/stakingTemplates/templates/common/unstake.js +37 -0
  787. package/dist/stakingTemplates/templates/reputation/common.d.ts +23 -0
  788. package/dist/stakingTemplates/templates/reputation/common.d.ts.map +1 -0
  789. package/dist/stakingTemplates/templates/reputation/common.js +3 -0
  790. package/dist/stakingTemplates/templates/reputation/index.d.ts +231 -0
  791. package/dist/stakingTemplates/templates/reputation/index.d.ts.map +1 -0
  792. package/dist/stakingTemplates/templates/reputation/index.js +5 -0
  793. package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts +31 -0
  794. package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts.map +1 -0
  795. package/dist/stakingTemplates/templates/reputation/v0/createPlatform.js +57 -0
  796. package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts +39 -0
  797. package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts.map +1 -0
  798. package/dist/stakingTemplates/templates/reputation/v0/createPool.js +86 -0
  799. package/dist/stakingTemplates/templates/reputation/v0/index.d.ts +231 -0
  800. package/dist/stakingTemplates/templates/reputation/v0/index.d.ts.map +1 -0
  801. package/dist/stakingTemplates/templates/reputation/v0/index.js +26 -0
  802. package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts +26 -0
  803. package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts.map +1 -0
  804. package/dist/stakingTemplates/templates/reputation/v0/restake.js +41 -0
  805. package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts +26 -0
  806. package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts.map +1 -0
  807. package/dist/stakingTemplates/templates/reputation/v0/stake.js +46 -0
  808. package/dist/stakingTemplates/templates/reputationLock/common.d.ts +23 -0
  809. package/dist/stakingTemplates/templates/reputationLock/common.d.ts.map +1 -0
  810. package/dist/stakingTemplates/templates/reputationLock/common.js +3 -0
  811. package/dist/stakingTemplates/templates/reputationLock/index.d.ts +242 -0
  812. package/dist/stakingTemplates/templates/reputationLock/index.d.ts.map +1 -0
  813. package/dist/stakingTemplates/templates/reputationLock/index.js +5 -0
  814. package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts +31 -0
  815. package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts.map +1 -0
  816. package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.js +57 -0
  817. package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts +48 -0
  818. package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts.map +1 -0
  819. package/dist/stakingTemplates/templates/reputationLock/v0/createPool.js +100 -0
  820. package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts +242 -0
  821. package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts.map +1 -0
  822. package/dist/stakingTemplates/templates/reputationLock/v0/index.js +26 -0
  823. package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts +27 -0
  824. package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts.map +1 -0
  825. package/dist/stakingTemplates/templates/reputationLock/v0/restake.js +45 -0
  826. package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts +27 -0
  827. package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts.map +1 -0
  828. package/dist/stakingTemplates/templates/reputationLock/v0/stake.js +47 -0
  829. package/dist/stakingTemplates/templates/rwa/common.d.ts +23 -0
  830. package/dist/stakingTemplates/templates/rwa/common.d.ts.map +1 -0
  831. package/dist/stakingTemplates/templates/rwa/common.js +3 -0
  832. package/dist/stakingTemplates/templates/rwa/index.d.ts +254 -0
  833. package/dist/stakingTemplates/templates/rwa/index.d.ts.map +1 -0
  834. package/dist/stakingTemplates/templates/rwa/index.js +5 -0
  835. package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts +31 -0
  836. package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts.map +1 -0
  837. package/dist/stakingTemplates/templates/rwa/v0/createPlatform.js +57 -0
  838. package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts +38 -0
  839. package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts.map +1 -0
  840. package/dist/stakingTemplates/templates/rwa/v0/createPool.js +80 -0
  841. package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts +26 -0
  842. package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
  843. package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.js +42 -0
  844. package/dist/stakingTemplates/templates/rwa/v0/index.d.ts +254 -0
  845. package/dist/stakingTemplates/templates/rwa/v0/index.d.ts.map +1 -0
  846. package/dist/stakingTemplates/templates/rwa/v0/index.js +28 -0
  847. package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts +26 -0
  848. package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts.map +1 -0
  849. package/dist/stakingTemplates/templates/rwa/v0/restake.js +41 -0
  850. package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts +26 -0
  851. package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts.map +1 -0
  852. package/dist/stakingTemplates/templates/rwa/v0/stake.js +46 -0
  853. package/dist/v0/fractions/index.d.ts +129 -0
  854. package/dist/v0/fractions/index.d.ts.map +1 -0
  855. package/dist/v0/fractions/index.js +9 -0
  856. package/dist/v0/fractions/networkStatistics.route.d.ts +297 -0
  857. package/dist/v0/fractions/networkStatistics.route.d.ts.map +1 -0
  858. package/dist/v0/fractions/networkStatistics.route.js +225 -0
  859. package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts +65 -0
  860. package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
  861. package/dist/v1/fractions/lending/buyback/buyback.routes.js +27 -0
  862. package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts +8 -0
  863. package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
  864. package/dist/v1/fractions/lending/buyback/buyback.schema.js +13 -0
  865. package/dist/v1/fractions/lending/createLendingSale.d.ts +303 -0
  866. package/dist/v1/fractions/lending/createLendingSale.d.ts.map +1 -0
  867. package/dist/v1/fractions/lending/createLendingSale.js +79 -0
  868. package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts +113 -0
  869. package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
  870. package/dist/v1/fractions/lending/deployMarket/lending.routes.js +41 -0
  871. package/dist/v1/fractions/lending/index.d.ts +192 -0
  872. package/dist/v1/fractions/lending/index.d.ts.map +1 -0
  873. package/dist/v1/fractions/lending/index.js +22 -0
  874. package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts +71 -0
  875. package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
  876. package/dist/v1/fractions/lending/purchase/directPurchase.route.js +31 -0
  877. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +61 -0
  878. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
  879. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +27 -0
  880. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +7 -0
  881. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
  882. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +11 -0
  883. package/dist/v1/fractions/schemas.d.ts +20 -0
  884. package/dist/v1/fractions/schemas.d.ts.map +1 -0
  885. package/dist/v1/fractions/schemas.js +20 -0
  886. package/package.json +26 -19
@@ -1,15 +1,18 @@
1
+ import { and, eq } from "@ponder/client";
1
2
  import { describeRoute } from "hono-openapi";
2
- import { resolver, validator } from "hono-openapi/zod";
3
+ import { resolver, validator } from "hono-openapi";
4
+ import { z } from "zod";
3
5
  import { unixToDate } from "@evergonlabs/tmi-protocol-utils/date";
4
- import { and, eq } from "@ponder/client";
5
- import { z } from "../../../../common/zod.js";
6
- import { indexerClient } from "../../../../common/indexer/index.js";
6
+ import { createController } from "../../../../common/controller.js";
7
+ import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../../../common/index.js";
7
8
  import { indexerSchemas } from "../../../../common/indexer/schemas.js";
9
+ import { toISOJson } from "../../../../common/models/date.js";
8
10
  import { PageSchema } from "../../../../common/models/page.js";
9
- import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../../../common/index.js";
11
+ import { createTag } from "../../../../common/tag.js";
10
12
  import { RoleAssignmentSchema } from "../../common/roleAssignment.js";
11
- export function createSearchRolesV0App(factory, tag) {
12
- return factory.createHandlers(describeRoute({
13
+ const tag = createTag("Roles");
14
+ export const SearchRolesV0 = createController({
15
+ build: (factory) => factory.createApp().post("/", describeRoute({
13
16
  summary: "Search roles",
14
17
  description: "Search roles by users, platforms and pools",
15
18
  tags: [tag.tag],
@@ -33,16 +36,19 @@ export function createSearchRolesV0App(factory, tag) {
33
36
  }),
34
37
  })), async (c) => {
35
38
  const { page, filter } = c.req.valid("json");
36
- const result = await indexerClient.db
37
- .select()
39
+ const result = await c
40
+ .get("indexerClient")
41
+ .db.select()
38
42
  .from(indexerSchemas.roles)
39
43
  .limit(page.limit)
40
44
  .offset(page.skip)
41
45
  .orderBy(indexerSchemas.roles.createdAt)
42
- .where(and(filter.chainId ? eq(indexerSchemas.roles.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.roles.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.roles.diamondAddress, filter.platform) : undefined, typeof filter.poolId === "number" ? eq(indexerSchemas.roles.campaignId, BigInt(filter.poolId)) : undefined));
46
+ .where(and(filter.chainId ? eq(indexerSchemas.roles.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.roles.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.roles.diamondAddress, filter.platform) : undefined, typeof filter.poolId === "number"
47
+ ? eq(indexerSchemas.roles.campaignId, BigInt(filter.poolId))
48
+ : undefined));
43
49
  return c.json(result.map((x) => toRoleAssignment(x)), 200);
44
- });
45
- }
50
+ }),
51
+ });
46
52
  function toRoleAssignment(raw) {
47
53
  return {
48
54
  chainId: StakingChainId.parse(raw.chainId),
@@ -50,7 +56,7 @@ function toRoleAssignment(raw) {
50
56
  owner: raw.walletAddress,
51
57
  roleId: raw.roleId,
52
58
  poolId: raw.campaignId ? PoolIdSchema.parse(raw.campaignId) : undefined,
53
- createdAt: unixToDate(raw.createdAt).toISOString(),
54
- updatedAt: unixToDate(raw.updatedAt).toISOString(),
59
+ createdAt: toISOJson(unixToDate(raw.createdAt)),
60
+ updatedAt: toISOJson(unixToDate(raw.updatedAt)),
55
61
  };
56
62
  }
@@ -1,44 +1,18 @@
1
+ import { z } from "zod";
1
2
  import { indexerSchemas } from "../../../common/indexer/schemas.js";
2
- import { z } from "../../../common/zod.js";
3
3
  export declare const StakeSchema: z.ZodObject<{
4
- chainId: z.ZodType<"11155111" | "31337", z.ZodTypeDef, "11155111" | "31337">;
5
- platform: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
6
- poolId: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>>;
7
- owner: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
8
- stakeId: z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>;
9
- activePackets: z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>;
10
- rewardsClaimed: z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>;
4
+ chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337>, z.ZodLiteral<11155111 | 31337>, ...z.ZodLiteral<11155111 | 31337>[]]>>;
5
+ platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
6
+ poolId: z.ZodOptional<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
7
+ owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
8
+ stakeId: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
9
+ activePackets: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
10
+ rewardsClaimed: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
11
11
  isActive: z.ZodBoolean;
12
- unlockTimestamp: z.ZodString;
13
- startTimestamp: z.ZodString;
14
- createdAt: z.ZodString;
15
- updatedAt: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- chainId: "11155111" | "31337";
18
- platform: `0x${string}`;
19
- createdAt: string;
20
- updatedAt: string;
21
- stakeId: bigint;
22
- activePackets: bigint;
23
- rewardsClaimed: bigint;
24
- isActive: boolean;
25
- unlockTimestamp: string;
26
- startTimestamp: string;
27
- owner: `0x${string}`;
28
- poolId?: bigint | undefined;
29
- }, {
30
- chainId: "11155111" | "31337";
31
- platform: `0x${string}`;
32
- createdAt: string;
33
- updatedAt: string;
34
- stakeId: string | number | bigint;
35
- activePackets: string | number | bigint;
36
- rewardsClaimed: string | number | bigint;
37
- isActive: boolean;
38
- unlockTimestamp: string;
39
- startTimestamp: string;
40
- owner: `0x${string}`;
41
- poolId?: string | number | bigint | undefined;
42
- }>;
43
- export declare function mapToStake(raw: typeof indexerSchemas.stakes.$inferSelect): z.output<typeof StakeSchema>;
12
+ unlockTimestamp: z.core.$ZodBranded<z.ZodString, "ISO", "out">;
13
+ startTimestamp: z.core.$ZodBranded<z.ZodString, "ISO", "out">;
14
+ createdAt: z.core.$ZodBranded<z.ZodString, "ISO", "out">;
15
+ updatedAt: z.core.$ZodBranded<z.ZodString, "ISO", "out">;
16
+ }, z.core.$strip>;
17
+ export declare function mapToStake(raw: typeof indexerSchemas.stakes.$inferSelect): z.input<typeof StakeSchema>;
44
18
  //# sourceMappingURL=stake.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/common/stake.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBpB,CAAC;AAEL,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAevG"}
1
+ {"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/common/stake.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAqBL,CAAC;AAEpB,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAetG"}
@@ -1,8 +1,8 @@
1
+ import { z } from "zod";
1
2
  import { unixToDate } from "@evergonlabs/tmi-protocol-utils/date";
2
- import { Int256Positive } from "@evergonlabs/tmi-utils/models";
3
+ import { Int256Json, toInt256Json } from "@evergonlabs/tmi-utils/models";
3
4
  import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakeIdSchema, StakingChainId, } from "../../../common/index.js";
4
- import { ISOSchema } from "../../../common/models/date.js";
5
- import { z } from "../../../common/zod.js";
5
+ import { ISOJson, toISOJson } from "../../../common/models/date.js";
6
6
  export const StakeSchema = z
7
7
  .object({
8
8
  chainId: StakingChainId,
@@ -14,32 +14,30 @@ export const StakeSchema = z
14
14
  description: "Address role assigned to",
15
15
  }),
16
16
  stakeId: StakeIdSchema,
17
- activePackets: Int256Positive,
18
- rewardsClaimed: Int256Positive,
17
+ activePackets: Int256Json,
18
+ rewardsClaimed: Int256Json,
19
19
  isActive: z.boolean().openapi({
20
20
  description: "Whether stake is active or withdrawn and closed",
21
21
  }),
22
- unlockTimestamp: ISOSchema,
23
- startTimestamp: ISOSchema,
24
- createdAt: ISOSchema,
25
- updatedAt: ISOSchema,
22
+ unlockTimestamp: ISOJson,
23
+ startTimestamp: ISOJson,
24
+ createdAt: ISOJson,
25
+ updatedAt: ISOJson,
26
26
  })
27
- .openapi({
28
- ref: "Stake",
29
- });
27
+ .openapi("Stake");
30
28
  export function mapToStake(raw) {
31
29
  return {
32
30
  chainId: StakingChainId.parse(raw.chainId),
33
31
  platform: raw.diamondAddress,
34
32
  owner: raw.walletAddress,
35
- poolId: raw.poolId ? PoolIdSchema.parse(raw.poolId) : undefined,
36
- stakeId: raw.stakeId,
37
- startTimestamp: unixToDate(raw.startTimestamp).toISOString(),
38
- unlockTimestamp: unixToDate(raw.unlockTimestamp).toISOString(),
39
- rewardsClaimed: raw.rewardsClaimed,
40
- activePackets: raw.activePackets,
33
+ poolId: toInt256Json(raw.poolId),
34
+ stakeId: toInt256Json(raw.stakeId),
35
+ startTimestamp: toISOJson(unixToDate(raw.startTimestamp)),
36
+ unlockTimestamp: toISOJson(unixToDate(raw.unlockTimestamp)),
37
+ rewardsClaimed: toInt256Json(raw.rewardsClaimed),
38
+ activePackets: toInt256Json(raw.activePackets),
41
39
  isActive: raw.isActive,
42
- createdAt: unixToDate(raw.createdAt).toISOString(),
43
- updatedAt: unixToDate(raw.updatedAt).toISOString(),
40
+ createdAt: toISOJson(unixToDate(raw.createdAt)),
41
+ updatedAt: toISOJson(unixToDate(raw.updatedAt)),
44
42
  };
45
43
  }
@@ -1,30 +1,12 @@
1
- import { z } from "../../../common/zod.js";
1
+ import { z } from "zod";
2
2
  export declare const StakeEventSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
- chainId: z.ZodType<"11155111" | "31337", z.ZodTypeDef, "11155111" | "31337">;
5
- platform: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
6
- poolId: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>>;
7
- owner: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
8
- stakeId: z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>;
9
- createdAt: z.ZodString;
10
- txHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
11
- }, "strip", z.ZodTypeAny, {
12
- chainId: "11155111" | "31337";
13
- platform: `0x${string}`;
14
- id: string;
15
- txHash: `0x${string}`;
16
- createdAt: string;
17
- stakeId: bigint;
18
- owner: `0x${string}`;
19
- poolId?: bigint | undefined;
20
- }, {
21
- chainId: "11155111" | "31337";
22
- platform: `0x${string}`;
23
- id: string;
24
- txHash: `0x${string}`;
25
- createdAt: string;
26
- stakeId: string | number | bigint;
27
- owner: `0x${string}`;
28
- poolId?: string | number | bigint | undefined;
29
- }>;
4
+ chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337>, z.ZodLiteral<11155111 | 31337>, ...z.ZodLiteral<11155111 | 31337>[]]>>;
5
+ platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
6
+ poolId: z.ZodOptional<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
7
+ owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
8
+ stakeId: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
9
+ createdAt: z.core.$ZodBranded<z.ZodString, "ISO", "out">;
10
+ txHash: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
11
+ }, z.core.$strip>;
30
12
  //# sourceMappingURL=stakeEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stakeEvent.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/common/stakeEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAY3C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBzB,CAAC"}
1
+ {"version":3,"file":"stakeEvent.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/common/stakeEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,gBAAgB;;;;;;;;;iBAiBL,CAAC"}
@@ -1,6 +1,6 @@
1
- import { ISOSchema } from "../../../common/models/date.js";
2
- import { z } from "../../../common/zod.js";
1
+ import { z } from "zod";
3
2
  import { AddressSchema, HashSchema, PlatformContractAddress, PoolIdSchema, StakeIdSchema, StakingChainId, } from "../../../common/index.js";
3
+ import { ISOJson } from "../../../common/models/date.js";
4
4
  // @todo add data field
5
5
  export const StakeEventSchema = z
6
6
  .object({
@@ -16,9 +16,7 @@ export const StakeEventSchema = z
16
16
  description: "Address role assigned to",
17
17
  }),
18
18
  stakeId: StakeIdSchema,
19
- createdAt: ISOSchema,
19
+ createdAt: ISOJson,
20
20
  txHash: HashSchema,
21
21
  })
22
- .openapi({
23
- ref: "StakeEvent",
24
- });
22
+ .openapi("StakeEvent");
@@ -1,8 +1,5 @@
1
- import { Env } from "hono";
2
- import { Factory } from "hono/factory";
3
- import { ITag } from "../../../common/tag.js";
4
- export declare function createGetStakesApp<E extends Env>(factory: Factory<E>, tag: ITag): import("hono/hono-base").HonoBase<E, {
5
- "/v0": {
1
+ export declare const GetStakeController: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
2
+ "/": {
6
3
  $get: {
7
4
  input: {
8
5
  query: {
@@ -16,5 +13,5 @@ export declare function createGetStakesApp<E extends Env>(factory: Factory<E>, t
16
13
  status: 200;
17
14
  };
18
15
  };
19
- }, "/">;
16
+ }, "/v0">, "/">>;
20
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/getStake/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;QAE/E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/getStake/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;gBAE7B,CAAC"}
@@ -1,4 +1,5 @@
1
- import { createGetStakeV0App } from "./v0/getStake.js";
2
- export function createGetStakesApp(factory, tag) {
3
- return factory.createApp().get("/v0", ...createGetStakeV0App(factory, tag));
4
- }
1
+ import { createController } from "../../../common/controller.js";
2
+ import { GetStakeV0 } from "./v0/getStake.js";
3
+ export const GetStakeController = createController({
4
+ build: (factory) => factory.createApp().route("/v0", GetStakeV0.build(factory)),
5
+ });
@@ -1,35 +1,17 @@
1
- import { Factory } from "hono/factory";
2
- import { Env } from "hono";
3
- import { ITag } from "../../../../common/tag.js";
4
- export declare function createGetStakeV0App<E extends Env>(factory: Factory<E>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<Env, string, {
5
- in: {
6
- query: {
7
- chainId: string | string[];
8
- platform: string | string[];
9
- stakeId: string | string[];
1
+ export declare const GetStakeV0: import("../../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../../common/context.js").AppContext, {
2
+ "/": {
3
+ $get: {
4
+ input: {
5
+ query: {
6
+ chainId: string | string[];
7
+ platform: string | string[];
8
+ stakeId: string | string[];
9
+ };
10
+ };
11
+ output: never;
12
+ outputFormat: "json";
13
+ status: 200;
10
14
  };
11
15
  };
12
- out: {
13
- query: {
14
- chainId: "11155111" | "31337";
15
- platform: `0x${string}`;
16
- stakeId: bigint;
17
- };
18
- };
19
- }, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
20
- in: {
21
- query: {
22
- chainId: string | string[];
23
- platform: string | string[];
24
- stakeId: string | string[];
25
- };
26
- };
27
- out: {
28
- query: {
29
- chainId: "11155111" | "31337";
30
- platform: `0x${string}`;
31
- stakeId: bigint;
32
- };
33
- };
34
- }, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>];
16
+ }, "/">>;
35
17
  //# sourceMappingURL=getStake.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getStake.d.ts","sourceRoot":"","sources":["../../../../../src/staking/stakes/getStake/v0/getStake.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAK3B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAIjD,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAqEhF"}
1
+ {"version":3,"file":"getStake.d.ts","sourceRoot":"","sources":["../../../../../src/staking/stakes/getStake/v0/getStake.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;QA+ErB,CAAC"}
@@ -1,14 +1,16 @@
1
1
  import { and, eq } from "@ponder/client";
2
2
  import { describeRoute } from "hono-openapi";
3
- import { resolver, validator } from "hono-openapi/zod";
4
- import { indexerClient } from "../../../../common/indexer/index.js";
5
- import { z } from "../../../../common/zod.js";
6
- import { indexerSchemas } from "../../../../common/indexer/schemas.js";
3
+ import { resolver, validator } from "hono-openapi";
4
+ import { z } from "zod";
5
+ import { createController } from "../../../../common/controller.js";
6
+ import { HttpError } from "../../../../common/http-error.js";
7
7
  import { ErrorSchema, PlatformContractAddress, StakeIdSchema, StakingChainId } from "../../../../common/index.js";
8
+ import { indexerSchemas } from "../../../../common/indexer/schemas.js";
9
+ import { createTag } from "../../../../common/tag.js";
8
10
  import { mapToStake, StakeSchema } from "../../common/stake.js";
9
- import { StakeNotFoundError } from "../../common/stakeNotFound.js";
10
- export function createGetStakeV0App(factory, tag) {
11
- return factory.createHandlers(describeRoute({
11
+ const tag = createTag("Stakes");
12
+ export const GetStakeV0 = createController({
13
+ build: (factory) => factory.createApp().get("/", describeRoute({
12
14
  summary: "Get Stake",
13
15
  description: "Retrieve details of a specified stake",
14
16
  tags: [tag.tag],
@@ -51,14 +53,22 @@ export function createGetStakeV0App(factory, tag) {
51
53
  }),
52
54
  })), async (c) => {
53
55
  const { chainId, platform, stakeId } = c.req.valid("query");
54
- const [stake] = await indexerClient.db
55
- .select()
56
+ const [stake] = await c
57
+ .get("indexerClient")
58
+ .db.select()
56
59
  .from(indexerSchemas.stakes)
57
60
  .limit(1)
58
61
  .where(and(eq(indexerSchemas.stakes.chainId, Number(chainId)), eq(indexerSchemas.stakes.diamondAddress, platform), eq(indexerSchemas.stakes.stakeId, stakeId)));
59
62
  if (!stake) {
60
- throw new StakeNotFoundError(chainId, platform, stakeId.toString());
63
+ throw new HttpError(400, {
64
+ name: "StakeNotFoundError",
65
+ message: `Stake with id ${stakeId} within ${platform} platform in ${chainId} network is not found`,
66
+ data: {
67
+ chainId: chainId,
68
+ contract: platform,
69
+ },
70
+ });
61
71
  }
62
72
  return c.json(mapToStake(stake), 200);
63
- });
64
- }
73
+ }),
74
+ });
@@ -1,20 +1,18 @@
1
- import { Env } from "hono";
2
- import { Factory } from "hono/factory";
3
- export declare function createStakesApp<E extends Env>(factory: Factory<E>): import("hono/hono-base").HonoBase<E, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
4
- "/v0": {
1
+ export declare const StakesController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
2
+ "/": {
5
3
  $post: {
6
4
  input: {
7
5
  json: {
8
- filter: {
9
- chainId?: "11155111" | "31337" | undefined;
10
- platform?: `0x${string}` | undefined;
11
- poolId?: string | number | bigint | undefined;
12
- owner?: `0x${string}` | undefined;
13
- };
14
6
  page: {
15
7
  skip: number;
16
8
  limit: number;
17
9
  };
10
+ filter: {
11
+ chainId?: unknown;
12
+ owner?: string | undefined;
13
+ platform?: string | undefined;
14
+ poolId?: string | undefined;
15
+ };
18
16
  };
19
17
  };
20
18
  output: never;
@@ -22,21 +20,21 @@ export declare function createStakesApp<E extends Env>(factory: Factory<E>): imp
22
20
  status: 200;
23
21
  };
24
22
  };
25
- }, "/searchStakes"> | import("hono/types").MergeSchemaPath<{
26
- "/v0": {
23
+ }, "/v0">, "/searchStakes"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
24
+ "/": {
27
25
  $post: {
28
26
  input: {
29
27
  json: {
30
- filter: {
31
- chainId?: "11155111" | "31337" | undefined;
32
- platform?: `0x${string}` | undefined;
33
- poolId?: string | number | bigint | undefined;
34
- owner?: `0x${string}` | undefined;
35
- };
36
28
  page: {
37
29
  skip: number;
38
30
  limit: number;
39
31
  };
32
+ filter: {
33
+ chainId?: unknown;
34
+ owner?: string | undefined;
35
+ platform?: string | undefined;
36
+ poolId?: string | undefined;
37
+ };
40
38
  };
41
39
  };
42
40
  output: never;
@@ -44,8 +42,8 @@ export declare function createStakesApp<E extends Env>(factory: Factory<E>): imp
44
42
  status: 200;
45
43
  };
46
44
  };
47
- }, "/searchStakeEvents"> | import("hono/types").MergeSchemaPath<{
48
- "/v0": {
45
+ }, "/v0">, "/searchStakeEvents"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
46
+ "/": {
49
47
  $get: {
50
48
  input: {
51
49
  query: {
@@ -59,5 +57,5 @@ export declare function createStakesApp<E extends Env>(factory: Factory<E>): imp
59
57
  status: 200;
60
58
  };
61
59
  };
62
- }, "/getStake">, "/">;
60
+ }, "/v0">, "/getStake">, "/">>;
63
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,wBAAgB,eAAe,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAOjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAO3B,CAAC"}
@@ -1,12 +1,11 @@
1
- import { createSearchStakesApp } from "./searchStakes/index.js";
2
- import { createSearchStakeEventsApp } from "./searchStakeEvents/index.js";
3
- import { createGetStakesApp } from "./getStake/index.js";
4
- import { createTag } from "../../common/tag.js";
5
- export function createStakesApp(factory) {
6
- const tag = createTag("Stakes");
7
- return factory
1
+ import { createController } from "../../common/controller.js";
2
+ import { GetStakeController } from "./getStake/index.js";
3
+ import { SearchStakeEventsController } from "./searchStakeEvents/index.js";
4
+ import { SearchStakesController } from "./searchStakes/index.js";
5
+ export const StakesController = createController({
6
+ build: (factory) => factory
8
7
  .createApp()
9
- .route("/searchStakes", createSearchStakesApp(factory, tag))
10
- .route("/searchStakeEvents", createSearchStakeEventsApp(factory, tag))
11
- .route("/getStake", createGetStakesApp(factory, tag));
12
- }
8
+ .route("/searchStakes", SearchStakesController.build(factory))
9
+ .route("/searchStakeEvents", SearchStakeEventsController.build(factory))
10
+ .route("/getStake", GetStakeController.build(factory)),
11
+ });
@@ -1,21 +1,18 @@
1
- import { Env } from "hono";
2
- import { Factory } from "hono/factory";
3
- import { ITag } from "../../../common/tag.js";
4
- export declare function createSearchStakeEventsApp<E extends Env>(factory: Factory<E>, tag: ITag): import("hono/hono-base").HonoBase<E, {
5
- "/v0": {
1
+ export declare const SearchStakeEventsController: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
2
+ "/": {
6
3
  $post: {
7
4
  input: {
8
5
  json: {
9
- filter: {
10
- chainId?: "11155111" | "31337" | undefined;
11
- platform?: `0x${string}` | undefined;
12
- poolId?: string | number | bigint | undefined;
13
- owner?: `0x${string}` | undefined;
14
- };
15
6
  page: {
16
7
  skip: number;
17
8
  limit: number;
18
9
  };
10
+ filter: {
11
+ chainId?: unknown;
12
+ owner?: string | undefined;
13
+ platform?: string | undefined;
14
+ poolId?: string | undefined;
15
+ };
19
16
  };
20
17
  };
21
18
  output: never;
@@ -23,5 +20,5 @@ export declare function createSearchStakeEventsApp<E extends Env>(factory: Facto
23
20
  status: 200;
24
21
  };
25
22
  };
26
- }, "/">;
23
+ }, "/v0">, "/">>;
27
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/searchStakeEvents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;QAEvF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/stakes/searchStakeEvents/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;gBAEtC,CAAC"}
@@ -1,4 +1,5 @@
1
- import { createSearchStakeEventsV0App } from "./v0/searchStakeEvents.js";
2
- export function createSearchStakeEventsApp(factory, tag) {
3
- return factory.createApp().post("/v0", ...createSearchStakeEventsV0App(factory, tag));
4
- }
1
+ import { createController } from "../../../common/controller.js";
2
+ import { SearchStakeEventsV0 } from "./v0/searchStakeEvents.js";
3
+ export const SearchStakeEventsController = createController({
4
+ build: (factory) => factory.createApp().route("/v0", SearchStakeEventsV0.build(factory)),
5
+ });