@evergonlabs/tmi-protocol-api 0.4.1 → 0.5.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 (247) hide show
  1. package/dist/app.d.ts +452 -152
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +4 -0
  4. package/dist/client.d.ts +500 -151
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/common/abis/erc20Whitelisted.d.ts +27 -12
  7. package/dist/common/abis/erc20Whitelisted.d.ts.map +1 -1
  8. package/dist/common/abis/erc20Whitelisted.js +192 -1
  9. package/dist/common/blockchain.d.ts +20 -26
  10. package/dist/common/blockchain.d.ts.map +1 -1
  11. package/dist/common/blockchain.js +22 -19
  12. package/dist/common/config.d.ts +43 -1
  13. package/dist/common/config.d.ts.map +1 -1
  14. package/dist/common/config.js +47 -25
  15. package/dist/common/context.d.ts +11 -0
  16. package/dist/common/context.d.ts.map +1 -0
  17. package/dist/common/context.js +0 -0
  18. package/dist/common/indexer/client.d.ts +3 -2
  19. package/dist/common/indexer/client.d.ts.map +1 -1
  20. package/dist/common/indexer/schemas.d.ts +1 -1
  21. package/dist/common/indexer/schemas.d.ts.map +1 -1
  22. package/dist/common/middleware/indexer.d.ts +3 -0
  23. package/dist/common/middleware/indexer.d.ts.map +1 -0
  24. package/dist/common/middleware/indexer.js +7 -0
  25. package/dist/common/models/asset.d.ts +4 -4
  26. package/dist/common/models/chainId.d.ts +3 -0
  27. package/dist/common/models/chainId.d.ts.map +1 -1
  28. package/dist/common/models/chainId.js +6 -14
  29. package/dist/common/models/numOrStr.d.ts +7 -0
  30. package/dist/common/models/numOrStr.d.ts.map +1 -0
  31. package/dist/common/models/numOrStr.js +11 -0
  32. package/dist/common/models/platform.d.ts +1 -1
  33. package/dist/common/models/platform.d.ts.map +1 -1
  34. package/dist/common/models/platform.js +1 -1
  35. package/dist/common/models/routes.d.ts +2 -2
  36. package/dist/common/models/transaction.d.ts +8 -8
  37. package/dist/common/models/transaction.d.ts.map +1 -1
  38. package/dist/common/models/transaction.js +1 -1
  39. package/dist/fractions/activity/searchActivity.route.d.ts +17 -17
  40. package/dist/fractions/activity/searchActivity.route.d.ts.map +1 -1
  41. package/dist/fractions/activity/searchActivity.route.js +1 -2
  42. package/dist/fractions/activity/utils.d.ts +8 -8
  43. package/dist/fractions/approveSale/v0/approveSale.route.d.ts +3 -3
  44. package/dist/fractions/approveWrapper/v0/approveWrapper.route.d.ts +9 -9
  45. package/dist/fractions/completeSale/v0/completeSale.route.d.ts +3 -3
  46. package/dist/fractions/createFractions/v0/createFractions.route.d.ts +19 -19
  47. package/dist/fractions/createFractions/v0/createFractions.schema.d.ts +20 -20
  48. package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts +25 -12
  49. package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts.map +1 -1
  50. package/dist/fractions/deployMarket/v0/deployMarket.routes.js +3 -2
  51. package/dist/fractions/deployMarket/v0/index.d.ts +3 -0
  52. package/dist/fractions/deployMarket/v0/index.d.ts.map +1 -0
  53. package/dist/fractions/deployMarket/v0/index.js +2 -0
  54. package/dist/fractions/deployMarket/v0/initNid.route.d.ts +3 -3
  55. package/dist/fractions/grantRole/v0/grantRole.route.d.ts +3 -3
  56. package/dist/fractions/index.d.ts +141 -77
  57. package/dist/fractions/index.d.ts.map +1 -1
  58. package/dist/fractions/index.js +5 -3
  59. package/dist/fractions/markets/common/platform.d.ts +11 -11
  60. package/dist/fractions/markets/getMarket/index.d.ts +19 -19
  61. package/dist/fractions/markets/getMarket/index.d.ts.map +1 -1
  62. package/dist/fractions/markets/getMarket/v0/getMarket.d.ts +17 -17
  63. package/dist/fractions/markets/getMarket/v0/getMarket.d.ts.map +1 -1
  64. package/dist/fractions/markets/getMarket/v0/getMarket.js +1 -2
  65. package/dist/fractions/markets/index.d.ts +22 -22
  66. package/dist/fractions/markets/index.d.ts.map +1 -1
  67. package/dist/fractions/markets/searchMarkets/index.d.ts +5 -5
  68. package/dist/fractions/markets/searchMarkets/index.d.ts.map +1 -1
  69. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts +13 -13
  70. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts.map +1 -1
  71. package/dist/fractions/markets/searchMarkets/v0/searchMarkets.js +1 -2
  72. package/dist/fractions/purchase/v0/purchase.route.d.ts +3 -3
  73. package/dist/fractions/purchase/v0/statistics.route.d.ts +15 -15
  74. package/dist/fractions/purchase/v0/statistics.route.d.ts.map +1 -1
  75. package/dist/fractions/purchase/v0/statistics.route.js +3 -3
  76. package/dist/fractions/sales/common/fractionsSale.d.ts +40 -40
  77. package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +13 -13
  78. package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +1 -1
  79. package/dist/fractions/sales/getFractionSaleStatistics.route.js +3 -3
  80. package/dist/fractions/sales/getVaultAddress.d.ts +4 -4
  81. package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
  82. package/dist/fractions/sales/getVaultAddress.js +3 -3
  83. package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +6 -6
  84. package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +3 -3
  85. package/dist/fractions/sales/recoverFractions.d.ts +3 -3
  86. package/dist/fractions/sales/rejectFractions.d.ts +3 -3
  87. package/dist/fractions/sales/searchSales/v0/searchSales.d.ts +32 -32
  88. package/dist/fractions/sales/searchSales/v0/searchSales.d.ts.map +1 -1
  89. package/dist/fractions/sales/searchSales/v0/searchSales.js +1 -2
  90. package/dist/fractions/sales/searchWithdrawal.route.d.ts +7 -7
  91. package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +1 -1
  92. package/dist/fractions/sales/searchWithdrawal.route.js +1 -2
  93. package/dist/fractions/sales/setFeeCapLimit.d.ts +3 -3
  94. package/dist/fractions/sales/unlockWrappedAssets.route.d.ts +3 -3
  95. package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts +17 -17
  96. package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts.map +1 -1
  97. package/dist/fractions/sales/vesting/v0/claimStatistics.route.js +6 -5
  98. package/dist/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts +9 -9
  99. package/dist/fractions/sales/vesting/v0/editCliff.route.d.ts +3 -3
  100. package/dist/fractions/withdraw/v0/withdraw.route.d.ts +3 -3
  101. package/dist/general/balanceClient.d.ts +6 -6
  102. package/dist/general/common.d.ts +6 -6
  103. package/dist/general/estimateGas.d.ts +8 -8
  104. package/dist/general/getBalance.d.ts +4 -4
  105. package/dist/general/getBalancesBatch.d.ts +4 -4
  106. package/dist/general/index.d.ts +5 -5
  107. package/dist/general/searchBalances.d.ts +4 -4
  108. package/dist/general/utils/tokenBalance/tokenBalance.d.ts +3 -3
  109. package/dist/issuance/approve.d.ts +3 -3
  110. package/dist/issuance/burn.d.ts +3 -3
  111. package/dist/issuance/deploy.d.ts +7 -0
  112. package/dist/issuance/deploy.d.ts.map +1 -1
  113. package/dist/issuance/deploy.js +34 -0
  114. package/dist/issuance/grantRole.d.ts +9 -9
  115. package/dist/issuance/index.d.ts +47 -10
  116. package/dist/issuance/index.d.ts.map +1 -1
  117. package/dist/issuance/index.js +4 -1
  118. package/dist/issuance/mint.d.ts +3 -3
  119. package/dist/issuance/recover.d.ts +82 -0
  120. package/dist/issuance/recover.d.ts.map +1 -0
  121. package/dist/issuance/recover.js +38 -0
  122. package/dist/issuance/renounceRole.d.ts +9 -9
  123. package/dist/issuance/transfer.d.ts +9 -9
  124. package/dist/issuance/upgrade.d.ts +3 -3
  125. package/dist/staking/index.d.ts +10 -10
  126. package/dist/staking/index.d.ts.map +1 -1
  127. package/dist/staking/platforms/getPlatform/index.d.ts +3 -3
  128. package/dist/staking/platforms/getPlatform/index.d.ts.map +1 -1
  129. package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +8 -8
  130. package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +1 -1
  131. package/dist/staking/platforms/getPlatform/v0/getPlatform.js +3 -3
  132. package/dist/staking/platforms/index.d.ts +3 -3
  133. package/dist/staking/platforms/index.d.ts.map +1 -1
  134. package/dist/staking/platforms/searchPlatforms/index.d.ts +2 -2
  135. package/dist/staking/platforms/searchPlatforms/index.d.ts.map +1 -1
  136. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +4 -4
  137. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +1 -1
  138. package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +3 -3
  139. package/dist/staking/pools/common/pool.d.ts +4 -4
  140. package/dist/staking/pools/getPool/index.d.ts +3 -3
  141. package/dist/staking/pools/getPool/index.d.ts.map +1 -1
  142. package/dist/staking/pools/getPool/v0/getPool.d.ts +7 -7
  143. package/dist/staking/pools/getPool/v0/getPool.d.ts.map +1 -1
  144. package/dist/staking/pools/getPool/v0/getPool.js +3 -3
  145. package/dist/staking/pools/index.d.ts +3 -3
  146. package/dist/staking/pools/index.d.ts.map +1 -1
  147. package/dist/staking/pools/searchPools/index.d.ts +2 -2
  148. package/dist/staking/pools/searchPools/index.d.ts.map +1 -1
  149. package/dist/staking/pools/searchPools/v0/searchPools.d.ts +3 -3
  150. package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +1 -1
  151. package/dist/staking/pools/searchPools/v0/searchPools.js +3 -3
  152. package/dist/staking/roles/common/roleAssignment.d.ts +2 -2
  153. package/dist/staking/roles/common/roleEvent.d.ts +4 -4
  154. package/dist/staking/roles/grantRole/index.d.ts +1 -1
  155. package/dist/staking/roles/grantRole/v0/grantRole.d.ts +3 -3
  156. package/dist/staking/roles/index.d.ts +5 -5
  157. package/dist/staking/roles/index.d.ts.map +1 -1
  158. package/dist/staking/roles/searchRoleEvents/index.d.ts +3 -3
  159. package/dist/staking/roles/searchRoleEvents/index.d.ts.map +1 -1
  160. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +7 -7
  161. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +1 -1
  162. package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.js +3 -3
  163. package/dist/staking/roles/searchRoles/index.d.ts +3 -3
  164. package/dist/staking/roles/searchRoles/index.d.ts.map +1 -1
  165. package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +7 -7
  166. package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +1 -1
  167. package/dist/staking/roles/searchRoles/v0/searchRoles.js +3 -3
  168. package/dist/staking/stakes/common/stake.d.ts +2 -2
  169. package/dist/staking/stakes/common/stakeEvent.d.ts +4 -4
  170. package/dist/staking/stakes/getStake/index.d.ts +3 -3
  171. package/dist/staking/stakes/getStake/index.d.ts.map +1 -1
  172. package/dist/staking/stakes/getStake/v0/getStake.d.ts +7 -7
  173. package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +1 -1
  174. package/dist/staking/stakes/getStake/v0/getStake.js +3 -3
  175. package/dist/staking/stakes/index.d.ts +5 -5
  176. package/dist/staking/stakes/index.d.ts.map +1 -1
  177. package/dist/staking/stakes/searchStakeEvents/index.d.ts +3 -3
  178. package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +1 -1
  179. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +7 -7
  180. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +1 -1
  181. package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.js +3 -3
  182. package/dist/staking/stakes/searchStakes/index.d.ts +3 -3
  183. package/dist/staking/stakes/searchStakes/index.d.ts.map +1 -1
  184. package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +7 -7
  185. package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +1 -1
  186. package/dist/staking/stakes/searchStakes/v0/searchStakes.js +3 -3
  187. package/dist/staking-templates/index.d.ts +42 -42
  188. package/dist/staking-templates/templates/common/getReward.d.ts +7 -7
  189. package/dist/staking-templates/templates/common/partialUnstake.d.ts +7 -7
  190. package/dist/staking-templates/templates/common/rewardDistribution.js +2 -2
  191. package/dist/staking-templates/templates/common/unstake.d.ts +7 -7
  192. package/dist/staking-templates/templates/reputation/index.d.ts +13 -13
  193. package/dist/staking-templates/templates/reputation/v0/createPlatform.d.ts +3 -3
  194. package/dist/staking-templates/templates/reputation/v0/createPool.d.ts +7 -7
  195. package/dist/staking-templates/templates/reputation/v0/index.d.ts +13 -13
  196. package/dist/staking-templates/templates/reputation/v0/restake.d.ts +7 -7
  197. package/dist/staking-templates/templates/reputation/v0/stake.d.ts +7 -7
  198. package/dist/staking-templates/templates/reputationLock/index.d.ts +13 -13
  199. package/dist/staking-templates/templates/reputationLock/v0/createPlatform.d.ts +3 -3
  200. package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts +7 -7
  201. package/dist/staking-templates/templates/reputationLock/v0/index.d.ts +13 -13
  202. package/dist/staking-templates/templates/reputationLock/v0/restake.d.ts +7 -7
  203. package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts +7 -7
  204. package/dist/staking-templates/templates/rwa/index.d.ts +16 -16
  205. package/dist/staking-templates/templates/rwa/v0/createPlatform.d.ts +3 -3
  206. package/dist/staking-templates/templates/rwa/v0/createPool.d.ts +7 -7
  207. package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts +61 -0
  208. package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
  209. package/dist/staking-templates/templates/rwa/v0/distributeRewards.js +41 -0
  210. package/dist/staking-templates/templates/rwa/v0/index.d.ts +16 -16
  211. package/dist/staking-templates/templates/rwa/v0/index.js +2 -2
  212. package/dist/staking-templates/templates/rwa/v0/restake.d.ts +7 -7
  213. package/dist/staking-templates/templates/rwa/v0/stake.d.ts +7 -7
  214. package/dist/v0/fractions/index.d.ts +68 -0
  215. package/dist/v0/fractions/index.d.ts.map +1 -0
  216. package/dist/v0/fractions/index.js +9 -0
  217. package/dist/v0/fractions/networkStatistics.route.d.ts +176 -0
  218. package/dist/v0/fractions/networkStatistics.route.d.ts.map +1 -0
  219. package/dist/v0/fractions/networkStatistics.route.js +354 -0
  220. package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts +65 -0
  221. package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
  222. package/dist/v1/fractions/lending/buyback/buyback.routes.js +27 -0
  223. package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts +19 -0
  224. package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
  225. package/dist/v1/fractions/lending/buyback/buyback.schema.js +12 -0
  226. package/dist/v1/fractions/lending/createLendingSale.d.ts +585 -0
  227. package/dist/v1/fractions/lending/createLendingSale.d.ts.map +1 -0
  228. package/dist/v1/fractions/lending/createLendingSale.js +81 -0
  229. package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts +117 -0
  230. package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
  231. package/dist/v1/fractions/lending/deployMarket/lending.routes.js +35 -0
  232. package/dist/v1/fractions/lending/index.d.ts +209 -0
  233. package/dist/v1/fractions/lending/index.d.ts.map +1 -0
  234. package/dist/v1/fractions/lending/index.js +22 -0
  235. package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts +82 -0
  236. package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
  237. package/dist/v1/fractions/lending/purchase/directPurchase.route.js +34 -0
  238. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +61 -0
  239. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
  240. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +27 -0
  241. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +16 -0
  242. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
  243. package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +10 -0
  244. package/dist/v1/fractions/schemas.d.ts +108 -0
  245. package/dist/v1/fractions/schemas.d.ts.map +1 -0
  246. package/dist/v1/fractions/schemas.js +35 -0
  247. package/package.json +10 -7
@@ -4,7 +4,7 @@ import { TmiChainId } from "@evergonlabs/tmi-protocol-fractions-sdk";
4
4
  export declare const FractionsMarketSchema: z.ZodObject<{
5
5
  chainId: z.ZodType<TmiChainId, z.ZodTypeDef, TmiChainId>;
6
6
  transactionHash: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
7
- template: z.ZodEnum<["default", "compilot", "continuous-withdrawal", "continuous-withdrawal-nid"]>;
7
+ template: z.ZodEnum<["default", "compilot", "continuous-withdrawal", "continuous-withdrawal-nid", "lending"]>;
8
8
  contractAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
9
9
  adminAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
10
10
  wrapperAddress: z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNull]>;
@@ -20,18 +20,18 @@ export declare const FractionsMarketSchema: z.ZodObject<{
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  symbol: string;
22
22
  type: string;
23
- name: string;
24
- address: `0x${string}`;
25
23
  chainId: TmiChainId;
24
+ address: `0x${string}`;
25
+ name: string;
26
26
  tokenId: string | null;
27
27
  decimals: number;
28
28
  burnable: boolean;
29
29
  }, {
30
30
  symbol: string;
31
31
  type: string;
32
- name: string;
33
- address: `0x${string}`;
34
32
  chainId: TmiChainId;
33
+ address: `0x${string}`;
34
+ name: string;
35
35
  tokenId: string | null;
36
36
  decimals?: number | undefined;
37
37
  burnable?: boolean | undefined;
@@ -45,16 +45,16 @@ export declare const FractionsMarketSchema: z.ZodObject<{
45
45
  contractAddress: `0x${string}`;
46
46
  adminAddress: `0x${string}`;
47
47
  updatedAt: string;
48
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
48
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
49
49
  wrapperAddress: `0x${string}` | null;
50
50
  transactionHash: `0x${string}`;
51
51
  feesBps: number | null;
52
52
  burnAsset: {
53
53
  symbol: string;
54
54
  type: string;
55
- name: string;
56
- address: `0x${string}`;
57
55
  chainId: TmiChainId;
56
+ address: `0x${string}`;
57
+ name: string;
58
58
  tokenId: string | null;
59
59
  decimals: number;
60
60
  burnable: boolean;
@@ -65,16 +65,16 @@ export declare const FractionsMarketSchema: z.ZodObject<{
65
65
  contractAddress: `0x${string}`;
66
66
  adminAddress: `0x${string}`;
67
67
  updatedAt: string;
68
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
68
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
69
69
  wrapperAddress: `0x${string}` | null;
70
70
  transactionHash: `0x${string}`;
71
71
  feesBps: number | null;
72
72
  burnAsset: {
73
73
  symbol: string;
74
74
  type: string;
75
- name: string;
76
- address: `0x${string}`;
77
75
  chainId: TmiChainId;
76
+ address: `0x${string}`;
77
+ name: string;
78
78
  tokenId: string | null;
79
79
  decimals?: number | undefined;
80
80
  burnable?: boolean | undefined;
@@ -1,13 +1,27 @@
1
1
  import { Factory } from "hono/factory";
2
- import { Env } from "hono";
2
+ import { AppContext } from "../../../common/context.js";
3
3
  import { ITag } from "../../../common/tag.js";
4
- export declare function createGetMarketApp<E extends Env>(factory: Factory<E>, tag: ITag): import("hono/hono-base").HonoBase<E, {
4
+ export declare function createGetMarketApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
5
5
  "/": {
6
6
  $get: {
7
7
  input: {
8
8
  query: {
9
+ chainId: string | string[];
9
10
  address: string | string[];
11
+ };
12
+ };
13
+ output: {
14
+ error: string;
15
+ chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
16
+ market: `0x${string}`;
17
+ };
18
+ outputFormat: "json";
19
+ status: 404;
20
+ } | {
21
+ input: {
22
+ query: {
10
23
  chainId: string | string[];
24
+ address: string | string[];
11
25
  };
12
26
  };
13
27
  output: {
@@ -16,16 +30,16 @@ export declare function createGetMarketApp<E extends Env>(factory: Factory<E>, t
16
30
  contractAddress: `0x${string}`;
17
31
  adminAddress: `0x${string}`;
18
32
  updatedAt: string;
19
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
33
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
20
34
  wrapperAddress: `0x${string}` | null;
21
35
  transactionHash: `0x${string}`;
22
36
  feesBps: number | null;
23
37
  burnAsset: {
24
38
  symbol: string;
25
39
  type: string;
26
- name: string;
27
- address: `0x${string}`;
28
40
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
41
+ address: `0x${string}`;
42
+ name: string;
29
43
  tokenId: string | null;
30
44
  decimals: number;
31
45
  burnable: boolean;
@@ -33,20 +47,6 @@ export declare function createGetMarketApp<E extends Env>(factory: Factory<E>, t
33
47
  };
34
48
  outputFormat: "json";
35
49
  status: 200;
36
- } | {
37
- input: {
38
- query: {
39
- address: string | string[];
40
- chainId: string | string[];
41
- };
42
- };
43
- output: {
44
- error: string;
45
- chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
46
- market: `0x${string}`;
47
- };
48
- outputFormat: "json";
49
- status: 404;
50
50
  };
51
51
  };
52
52
  }, "/">;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fractions/markets/getMarket/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,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/fractions/markets/getMarket/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEzE"}
@@ -1,7 +1,7 @@
1
1
  import { Factory } from "hono/factory";
2
- import { Env } from "hono";
3
2
  import { ITag } from "../../../../common/tag.js";
4
- export declare function createGetMarketV0App<E extends Env>(factory: Factory<E>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<(Response & import("hono").TypedResponse<{
3
+ import { AppContext } from "../../../../common/context.js";
4
+ export declare function createGetMarketV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<(Response & import("hono").TypedResponse<{
5
5
  error: string;
6
6
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
7
7
  market: `0x${string}`;
@@ -11,31 +11,31 @@ export declare function createGetMarketV0App<E extends Env>(factory: Factory<E>,
11
11
  contractAddress: `0x${string}`;
12
12
  adminAddress: `0x${string}`;
13
13
  updatedAt: string;
14
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
14
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
15
15
  wrapperAddress: `0x${string}` | null;
16
16
  transactionHash: `0x${string}`;
17
17
  feesBps: number | null;
18
18
  burnAsset: {
19
19
  symbol: string;
20
20
  type: string;
21
- name: string;
22
- address: `0x${string}`;
23
21
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
22
+ address: `0x${string}`;
23
+ name: string;
24
24
  tokenId: string | null;
25
25
  decimals: number;
26
26
  burnable: boolean;
27
27
  } | null;
28
- }, 200, "json">)>>, import("hono/types").H<Env, string, {
28
+ }, 200, "json">)>>, import("hono/types").H<import("hono").Env, string, {
29
29
  in: {
30
30
  query: {
31
- address: string | string[];
32
31
  chainId: string | string[];
32
+ address: string | string[];
33
33
  };
34
34
  };
35
35
  out: {
36
36
  query: {
37
- address: `0x${string}`;
38
37
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
38
+ address: `0x${string}`;
39
39
  };
40
40
  };
41
41
  }, Promise<(Response & import("hono").TypedResponse<{
@@ -48,31 +48,31 @@ export declare function createGetMarketV0App<E extends Env>(factory: Factory<E>,
48
48
  contractAddress: `0x${string}`;
49
49
  adminAddress: `0x${string}`;
50
50
  updatedAt: string;
51
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
51
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
52
52
  wrapperAddress: `0x${string}` | null;
53
53
  transactionHash: `0x${string}`;
54
54
  feesBps: number | null;
55
55
  burnAsset: {
56
56
  symbol: string;
57
57
  type: string;
58
- name: string;
59
- address: `0x${string}`;
60
58
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
59
+ address: `0x${string}`;
60
+ name: string;
61
61
  tokenId: string | null;
62
62
  decimals: number;
63
63
  burnable: boolean;
64
64
  } | null;
65
- }, 200, "json">)>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
65
+ }, 200, "json">)>>, import("hono/types").H<AppContext, string, {
66
66
  in: {
67
67
  query: {
68
- address: string | string[];
69
68
  chainId: string | string[];
69
+ address: string | string[];
70
70
  };
71
71
  };
72
72
  out: {
73
73
  query: {
74
- address: `0x${string}`;
75
74
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
75
+ address: `0x${string}`;
76
76
  };
77
77
  };
78
78
  }, Promise<(Response & import("hono").TypedResponse<{
@@ -85,16 +85,16 @@ export declare function createGetMarketV0App<E extends Env>(factory: Factory<E>,
85
85
  contractAddress: `0x${string}`;
86
86
  adminAddress: `0x${string}`;
87
87
  updatedAt: string;
88
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
88
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
89
89
  wrapperAddress: `0x${string}` | null;
90
90
  transactionHash: `0x${string}`;
91
91
  feesBps: number | null;
92
92
  burnAsset: {
93
93
  symbol: string;
94
94
  type: string;
95
- name: string;
96
- address: `0x${string}`;
97
95
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
96
+ address: `0x${string}`;
97
+ name: string;
98
98
  tokenId: string | null;
99
99
  decimals: number;
100
100
  burnable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"getMarket.d.ts","sourceRoot":"","sources":["../../../../../src/fractions/markets/getMarket/v0/getMarket.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;AAGjD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAoEjF"}
1
+ {"version":3,"file":"getMarket.d.ts","sourceRoot":"","sources":["../../../../../src/fractions/markets/getMarket/v0/getMarket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAoE3E"}
@@ -1,7 +1,6 @@
1
1
  import { and, eq } from "@ponder/client";
2
2
  import { describeRoute } from "hono-openapi";
3
3
  import { resolver, validator } from "hono-openapi/zod";
4
- import { indexerClient } from "../../../../common/indexer/index.js";
5
4
  import { z } from "../../../../common/zod.js";
6
5
  import { indexerSchemas } from "../../../../common/indexer/schemas.js";
7
6
  import { ErrorSchema, PlatformContractAddress, TmiChainIdSchema } from "../../../../common/index.js";
@@ -45,7 +44,7 @@ export function createGetMarketV0App(factory, tag) {
45
44
  })), async (c) => {
46
45
  const { chainId, address } = c.req.valid("query");
47
46
  const { fractions: { fractionsMarkets }, } = indexerSchemas;
48
- const market = await indexerClient.db.query.fractionsMarkets.findFirst({
47
+ const market = await c.get("indexerClient").db.query.fractionsMarkets.findFirst({
49
48
  with: { burnAsset: true },
50
49
  where: and(eq(fractionsMarkets.chainId, Number(chainId)), eq(fractionsMarkets.contractAddress, address)),
51
50
  });
@@ -1,12 +1,26 @@
1
- import { Env } from "hono";
2
1
  import { Factory } from "hono/factory";
3
- export declare function createMarketsApp<E extends Env>(factory: Factory<E>): import("hono/hono-base").HonoBase<E, (import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
2
+ import { AppContext } from "../../common/context.js";
3
+ export declare function createMarketsApp(factory: Factory<AppContext>): import("hono/hono-base").HonoBase<AppContext, (import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
4
4
  "/": {
5
5
  $get: {
6
6
  input: {
7
7
  query: {
8
+ chainId: string | string[];
8
9
  address: string | string[];
10
+ };
11
+ };
12
+ output: {
13
+ error: string;
14
+ chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
15
+ market: `0x${string}`;
16
+ };
17
+ outputFormat: "json";
18
+ status: 404;
19
+ } | {
20
+ input: {
21
+ query: {
9
22
  chainId: string | string[];
23
+ address: string | string[];
10
24
  };
11
25
  };
12
26
  output: {
@@ -15,16 +29,16 @@ export declare function createMarketsApp<E extends Env>(factory: Factory<E>): im
15
29
  contractAddress: `0x${string}`;
16
30
  adminAddress: `0x${string}`;
17
31
  updatedAt: string;
18
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
32
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
19
33
  wrapperAddress: `0x${string}` | null;
20
34
  transactionHash: `0x${string}`;
21
35
  feesBps: number | null;
22
36
  burnAsset: {
23
37
  symbol: string;
24
38
  type: string;
25
- name: string;
26
- address: `0x${string}`;
27
39
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
40
+ address: `0x${string}`;
41
+ name: string;
28
42
  tokenId: string | null;
29
43
  decimals: number;
30
44
  burnable: boolean;
@@ -32,20 +46,6 @@ export declare function createMarketsApp<E extends Env>(factory: Factory<E>): im
32
46
  };
33
47
  outputFormat: "json";
34
48
  status: 200;
35
- } | {
36
- input: {
37
- query: {
38
- address: string | string[];
39
- chainId: string | string[];
40
- };
41
- };
42
- output: {
43
- error: string;
44
- chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
45
- market: `0x${string}`;
46
- };
47
- outputFormat: "json";
48
- status: 404;
49
49
  };
50
50
  };
51
51
  }, "/get"> | import("hono/types").MergeSchemaPath<{
@@ -69,16 +69,16 @@ export declare function createMarketsApp<E extends Env>(factory: Factory<E>): im
69
69
  contractAddress: `0x${string}`;
70
70
  adminAddress: `0x${string}`;
71
71
  updatedAt: string;
72
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
72
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
73
73
  wrapperAddress: `0x${string}` | null;
74
74
  transactionHash: `0x${string}`;
75
75
  feesBps: number | null;
76
76
  burnAsset: {
77
77
  symbol: string;
78
78
  type: string;
79
- name: string;
80
- address: `0x${string}`;
81
79
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
80
+ address: `0x${string}`;
81
+ name: string;
82
82
  tokenId: string | null;
83
83
  decimals: number;
84
84
  burnable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/markets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/markets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAO5D"}
@@ -1,7 +1,7 @@
1
- import { Env } from "hono";
1
+ import { AppContext } from "../../../common/context.js";
2
2
  import { Factory } from "hono/factory";
3
3
  import { ITag } from "../../../common/tag.js";
4
- export declare function createSearchMarketsApp<E extends Env>(factory: Factory<E>, tag: ITag): import("hono/hono-base").HonoBase<E, {
4
+ export declare function createSearchMarketsApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
5
5
  "/": {
6
6
  $post: {
7
7
  input: {
@@ -22,16 +22,16 @@ export declare function createSearchMarketsApp<E extends Env>(factory: Factory<E
22
22
  contractAddress: `0x${string}`;
23
23
  adminAddress: `0x${string}`;
24
24
  updatedAt: string;
25
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
25
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
26
26
  wrapperAddress: `0x${string}` | null;
27
27
  transactionHash: `0x${string}`;
28
28
  feesBps: number | null;
29
29
  burnAsset: {
30
30
  symbol: string;
31
31
  type: string;
32
- name: string;
33
- address: `0x${string}`;
34
32
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
33
+ address: `0x${string}`;
34
+ name: string;
35
35
  tokenId: string | null;
36
36
  decimals: number;
37
37
  burnable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fractions/markets/searchMarkets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEnF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fractions/markets/searchMarkets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAE7E"}
@@ -1,27 +1,27 @@
1
- import { Env } from "hono";
2
1
  import { Factory } from "hono/factory";
3
2
  import { ITag } from "../../../../common/tag.js";
4
- export declare function createSearchMarketsV0App<E extends Env>(factory: Factory<E>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
3
+ import { AppContext } from "../../../../common/context.js";
4
+ export declare function createSearchMarketsV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
5
5
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
6
6
  createdAt: string;
7
7
  contractAddress: `0x${string}`;
8
8
  adminAddress: `0x${string}`;
9
9
  updatedAt: string;
10
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
10
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
11
11
  wrapperAddress: `0x${string}` | null;
12
12
  transactionHash: `0x${string}`;
13
13
  feesBps: number | null;
14
14
  burnAsset: {
15
15
  symbol: string;
16
16
  type: string;
17
- name: string;
18
- address: `0x${string}`;
19
17
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
18
+ address: `0x${string}`;
19
+ name: string;
20
20
  tokenId: string | null;
21
21
  decimals: number;
22
22
  burnable: boolean;
23
23
  } | null;
24
- }[], 200, "json">>>, import("hono/types").H<Env, string, {
24
+ }[], 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
25
25
  in: {
26
26
  json: {
27
27
  filter: {
@@ -52,21 +52,21 @@ export declare function createSearchMarketsV0App<E extends Env>(factory: Factory
52
52
  contractAddress: `0x${string}`;
53
53
  adminAddress: `0x${string}`;
54
54
  updatedAt: string;
55
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
55
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
56
56
  wrapperAddress: `0x${string}` | null;
57
57
  transactionHash: `0x${string}`;
58
58
  feesBps: number | null;
59
59
  burnAsset: {
60
60
  symbol: string;
61
61
  type: string;
62
- name: string;
63
- address: `0x${string}`;
64
62
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
63
+ address: `0x${string}`;
64
+ name: string;
65
65
  tokenId: string | null;
66
66
  decimals: number;
67
67
  burnable: boolean;
68
68
  } | null;
69
- }[], 200, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
69
+ }[], 200, "json">>>, import("hono/types").H<AppContext, string, {
70
70
  in: {
71
71
  json: {
72
72
  filter: {
@@ -97,16 +97,16 @@ export declare function createSearchMarketsV0App<E extends Env>(factory: Factory
97
97
  contractAddress: `0x${string}`;
98
98
  adminAddress: `0x${string}`;
99
99
  updatedAt: string;
100
- template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid";
100
+ template: "default" | "compilot" | "continuous-withdrawal" | "continuous-withdrawal-nid" | "lending";
101
101
  wrapperAddress: `0x${string}` | null;
102
102
  transactionHash: `0x${string}`;
103
103
  feesBps: number | null;
104
104
  burnAsset: {
105
105
  symbol: string;
106
106
  type: string;
107
- name: string;
108
- address: `0x${string}`;
109
107
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
108
+ address: `0x${string}`;
109
+ name: string;
110
110
  tokenId: string | null;
111
111
  decimals: number;
112
112
  burnable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"searchMarkets.d.ts","sourceRoot":"","sources":["../../../../../src/fractions/markets/searchMarkets/v0/searchMarkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AASvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGjD,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmDrF"}
1
+ {"version":3,"file":"searchMarkets.d.ts","sourceRoot":"","sources":["../../../../../src/fractions/markets/searchMarkets/v0/searchMarkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmD/E"}
@@ -1,7 +1,6 @@
1
1
  import { describeRoute } from "hono-openapi";
2
2
  import { resolver, validator } from "hono-openapi/zod";
3
3
  import { and, eq } from "@ponder/client";
4
- import { indexerClient } from "../../../../common/indexer/index.js";
5
4
  import { indexerSchemas } from "../../../../common/indexer/schemas.js";
6
5
  import { PageSchema } from "../../../../common/models/page.js";
7
6
  import { AddressSchema, TmiChainIdSchema } from "../../../../common/index.js";
@@ -31,7 +30,7 @@ export function createSearchMarketsV0App(factory, tag) {
31
30
  })), async (c) => {
32
31
  const { page, filter } = c.req.valid("json");
33
32
  const { fractions: { fractionsMarkets }, } = indexerSchemas;
34
- const result = await indexerClient.db.query.fractionsMarkets.findMany({
33
+ const result = await c.get("indexerClient").db.query.fractionsMarkets.findMany({
35
34
  with: { burnAsset: true },
36
35
  where: and(filter.chainId ? eq(fractionsMarkets.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(fractionsMarkets.adminAddress, filter.owner) : undefined),
37
36
  limit: page.limit,
@@ -24,8 +24,8 @@ export declare function createPurchaseSalesTransactionV0<E extends Env>(factory:
24
24
  data: `0x${string}`;
25
25
  to: `0x${string}`;
26
26
  details: {
27
- functionName: string;
28
27
  address: `0x${string}`;
28
+ functionName: string;
29
29
  abi: any[];
30
30
  args: any[];
31
31
  };
@@ -52,8 +52,8 @@ export declare function createPurchaseSalesTransactionV0<E extends Env>(factory:
52
52
  data: `0x${string}`;
53
53
  to: `0x${string}`;
54
54
  details: {
55
- functionName: string;
56
55
  address: `0x${string}`;
56
+ functionName: string;
57
57
  abi: any[];
58
58
  args: any[];
59
59
  };
@@ -80,8 +80,8 @@ export declare function createPurchaseSalesTransactionV0<E extends Env>(factory:
80
80
  data: `0x${string}`;
81
81
  to: `0x${string}`;
82
82
  details: {
83
- functionName: string;
84
83
  address: `0x${string}`;
84
+ functionName: string;
85
85
  abi: any[];
86
86
  args: any[];
87
87
  };
@@ -1,61 +1,61 @@
1
- import { Env } from "hono";
2
1
  import { Factory } from "hono/factory";
3
- export declare function createPurchaseSalesStatisticsV0<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
2
+ import { AppContext } from "../../../common/context.js";
3
+ export declare function createPurchaseSalesStatisticsV0(factory: Factory<AppContext>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
4
4
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
5
- platform: `0x${string}`;
6
5
  campaignId: string;
6
+ platform: `0x${string}`;
7
7
  statistics: {
8
8
  priceId: string;
9
9
  purchases: number;
10
10
  fractionsSold: string;
11
11
  }[];
12
- }, 200, "json">>>, import("hono/types").H<Env, string, {
12
+ }, 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
13
13
  in: {
14
14
  json: {
15
- platform: `0x${string}`;
16
- campaignId: string | number | bigint;
17
15
  walletAddress: `0x${string}`;
16
+ campaignId: string | number | bigint;
17
+ platform: `0x${string}`;
18
18
  chainId?: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId | undefined;
19
19
  };
20
20
  };
21
21
  out: {
22
22
  json: {
23
- platform: `0x${string}`;
24
- campaignId: bigint;
25
23
  walletAddress: `0x${string}`;
24
+ campaignId: bigint;
25
+ platform: `0x${string}`;
26
26
  chainId?: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId | undefined;
27
27
  };
28
28
  };
29
29
  }, Promise<Response & import("hono").TypedResponse<{
30
30
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
31
- platform: `0x${string}`;
32
31
  campaignId: string;
32
+ platform: `0x${string}`;
33
33
  statistics: {
34
34
  priceId: string;
35
35
  purchases: number;
36
36
  fractionsSold: string;
37
37
  }[];
38
- }, 200, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
38
+ }, 200, "json">>>, import("hono/types").H<AppContext, string, {
39
39
  in: {
40
40
  json: {
41
- platform: `0x${string}`;
42
- campaignId: string | number | bigint;
43
41
  walletAddress: `0x${string}`;
42
+ campaignId: string | number | bigint;
43
+ platform: `0x${string}`;
44
44
  chainId?: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId | undefined;
45
45
  };
46
46
  };
47
47
  out: {
48
48
  json: {
49
- platform: `0x${string}`;
50
- campaignId: bigint;
51
49
  walletAddress: `0x${string}`;
50
+ campaignId: bigint;
51
+ platform: `0x${string}`;
52
52
  chainId?: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId | undefined;
53
53
  };
54
54
  };
55
55
  }, Promise<Response & import("hono").TypedResponse<{
56
56
  chainId: import("@evergonlabs/tmi-protocol-fractions-sdk").TmiChainId;
57
- platform: `0x${string}`;
58
57
  campaignId: string;
58
+ platform: `0x${string}`;
59
59
  statistics: {
60
60
  priceId: string;
61
61
  purchases: number;
@@ -1 +1 @@
1
- {"version":3,"file":"statistics.route.d.ts","sourceRoot":"","sources":["../../../../src/fractions/purchase/v0/statistics.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAUvC,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAiEjF"}
1
+ {"version":3,"file":"statistics.route.d.ts","sourceRoot":"","sources":["../../../../src/fractions/purchase/v0/statistics.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAmE3E"}
@@ -5,7 +5,6 @@ import { FractionsSaleStatisticSchema } from "../../sales/getFractionSaleStatist
5
5
  import { AddressSchema, CampaignIdSchema, PlatformContractAddress, TmiChainIdSchema } from "../../../common/index.js";
6
6
  import { z } from "../../../common/zod.js";
7
7
  import { indexerSchemas } from "../../../common/indexer/schemas.js";
8
- import { indexerClient } from "../../../common/indexer/index.js";
9
8
  export function createPurchaseSalesStatisticsV0(factory) {
10
9
  return factory.createHandlers(describeRoute({
11
10
  summary: "Aggregate investor statistics for certain campaign",
@@ -29,8 +28,9 @@ export function createPurchaseSalesStatisticsV0(factory) {
29
28
  })), async (c) => {
30
29
  const { chainId, platform, campaignId, walletAddress } = c.req.valid("json");
31
30
  const { fractions: { fractionsPurchases }, } = indexerSchemas;
32
- const rows = await indexerClient.db
33
- .select({
31
+ const rows = await c
32
+ .get("indexerClient")
33
+ .db.select({
34
34
  purchases: count(fractionsPurchases.transactionHash),
35
35
  fractionsSold: sum(fractionsPurchases.amountOfFractions),
36
36
  priceId: fractionsPurchases.priceId,