@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.
- package/README.md +169 -0
- package/dist/app.d.ts +3252 -2556
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +36 -19
- package/dist/apps.d.ts +30 -0
- package/dist/apps.d.ts.map +1 -0
- package/dist/apps.js +16 -0
- package/dist/client.d.ts +2152 -1687
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +23 -2
- package/dist/common/abis/erc20Whitelisted.d.ts +27 -12
- package/dist/common/abis/erc20Whitelisted.d.ts.map +1 -1
- package/dist/common/abis/erc20Whitelisted.js +192 -1
- package/dist/common/blockchain.d.ts +45 -52
- package/dist/common/blockchain.d.ts.map +1 -1
- package/dist/common/blockchain.js +23 -20
- package/dist/common/config.d.ts +19 -1
- package/dist/common/config.d.ts.map +1 -1
- package/dist/common/config.js +48 -26
- package/dist/common/context.d.ts +11 -0
- package/dist/common/context.d.ts.map +1 -0
- package/dist/common/context.js +0 -0
- package/dist/common/controller.d.ts +12 -0
- package/dist/common/controller.d.ts.map +1 -0
- package/dist/common/controller.js +6 -0
- package/dist/common/exports.d.ts +3 -0
- package/dist/common/exports.d.ts.map +1 -0
- package/dist/common/exports.js +2 -0
- package/dist/common/http-error.d.ts +1 -1
- package/dist/common/http-error.d.ts.map +1 -1
- package/dist/common/indexer/client.d.ts +141 -4
- package/dist/common/indexer/client.d.ts.map +1 -1
- package/dist/common/indexer/schemas.d.ts +70 -2
- package/dist/common/indexer/schemas.d.ts.map +1 -1
- package/dist/common/indexer/schemas.js +1 -1
- package/dist/common/int256.d.ts +3 -0
- package/dist/common/int256.d.ts.map +1 -0
- package/dist/common/int256.js +12 -0
- package/dist/common/middleware/indexer.d.ts +3 -0
- package/dist/common/middleware/indexer.d.ts.map +1 -0
- package/dist/common/middleware/indexer.js +7 -0
- package/dist/common/models/asset.d.ts +5 -23
- package/dist/common/models/asset.d.ts.map +1 -1
- package/dist/common/models/asset.js +4 -6
- package/dist/common/models/base/chainId.d.ts +8 -0
- package/dist/common/models/base/chainId.d.ts.map +1 -0
- package/dist/common/models/base/chainId.js +11 -0
- package/dist/common/models/base/deployTransaction.d.ts +8 -0
- package/dist/common/models/base/deployTransaction.d.ts.map +1 -0
- package/dist/common/models/base/deployTransaction.js +7 -0
- package/dist/common/models/base/page.d.ts +7 -0
- package/dist/common/models/base/page.d.ts.map +1 -0
- package/dist/common/models/base/page.js +5 -0
- package/dist/common/models/base/transaction.d.ts +13 -0
- package/dist/common/models/base/transaction.d.ts.map +1 -0
- package/dist/common/models/base/transaction.js +12 -0
- package/dist/common/models/base/viem.d.ts +6 -0
- package/dist/common/models/base/viem.d.ts.map +1 -0
- package/dist/common/models/base/viem.js +5 -0
- package/dist/common/models/chainId.d.ts +7 -4
- package/dist/common/models/chainId.d.ts.map +1 -1
- package/dist/common/models/chainId.js +25 -18
- package/dist/common/models/compilot.d.ts +3 -0
- package/dist/common/models/compilot.d.ts.map +1 -0
- package/dist/common/models/compilot.js +1 -0
- package/dist/common/models/date.d.ts +5 -2
- package/dist/common/models/date.d.ts.map +1 -1
- package/dist/common/models/date.js +13 -5
- package/dist/common/models/deployTransaction.d.ts +8 -0
- package/dist/common/models/deployTransaction.d.ts.map +1 -0
- package/dist/common/models/deployTransaction.js +12 -0
- package/dist/common/models/erc721.d.ts +3 -11
- package/dist/common/models/erc721.d.ts.map +1 -1
- package/dist/common/models/erc721.js +2 -4
- package/dist/common/models/exports.d.ts +5 -0
- package/dist/common/models/exports.d.ts.map +1 -0
- package/dist/common/models/exports.js +4 -0
- package/dist/common/models/index.d.ts +7 -4
- package/dist/common/models/index.d.ts.map +1 -1
- package/dist/common/models/index.js +7 -4
- package/dist/common/models/numOrStr.d.ts +7 -0
- package/dist/common/models/numOrStr.d.ts.map +1 -0
- package/dist/common/models/numOrStr.js +11 -0
- package/dist/common/models/page.d.ts +3 -8
- package/dist/common/models/page.d.ts.map +1 -1
- package/dist/common/models/page.js +2 -5
- package/dist/common/models/platform.d.ts +19 -6
- package/dist/common/models/platform.d.ts.map +1 -1
- package/dist/common/models/platform.js +6 -6
- package/dist/common/models/routes.d.ts +2 -10
- package/dist/common/models/routes.d.ts.map +1 -1
- package/dist/common/models/routes.js +1 -1
- package/dist/common/models/saleId.d.ts +3 -9
- package/dist/common/models/saleId.d.ts.map +1 -1
- package/dist/common/models/saleId.js +2 -1
- package/dist/common/models/transaction.d.ts +20 -81
- package/dist/common/models/transaction.d.ts.map +1 -1
- package/dist/common/models/transaction.js +12 -20
- package/dist/common/models/viem.d.ts +5 -3
- package/dist/common/models/viem.d.ts.map +1 -1
- package/dist/common/models/viem.js +6 -1
- package/dist/common/roles/erc20-gated-roles.d.ts +4 -2
- package/dist/common/roles/erc20-gated-roles.d.ts.map +1 -1
- package/dist/common/roles/erc20-gated-roles.js +3 -1
- package/dist/common/roles/erc721-factory-roles.d.ts +8 -0
- package/dist/common/roles/erc721-factory-roles.d.ts.map +1 -0
- package/dist/common/roles/erc721-factory-roles.js +13 -0
- package/dist/common/roles/exports.d.ts +3 -0
- package/dist/common/roles/exports.d.ts.map +1 -0
- package/dist/common/roles/exports.js +2 -0
- package/dist/factory.d.ts +11 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +19 -0
- package/dist/fractions/activity/searchActivity.route.d.ts +24 -24
- package/dist/fractions/activity/searchActivity.route.d.ts.map +1 -1
- package/dist/fractions/activity/searchActivity.route.js +3 -4
- package/dist/fractions/activity/utils.d.ts +11 -11
- package/dist/fractions/activity/utils.js +2 -2
- package/dist/fractions/approveSale/v0/approveSale.route.d.ts +3 -3
- package/dist/fractions/approveWrapper/v0/approveWrapper.route.d.ts +9 -9
- package/dist/fractions/completeSale/v0/completeSale.route.d.ts +3 -3
- package/dist/fractions/createFractions/v0/createFractions.route.d.ts +23 -23
- package/dist/fractions/createFractions/v0/createFractions.route.d.ts.map +1 -1
- package/dist/fractions/createFractions/v0/createFractions.route.js +3 -16
- package/dist/fractions/createFractions/v0/createFractions.schema.d.ts +34 -23
- package/dist/fractions/createFractions/v0/createFractions.schema.d.ts.map +1 -1
- package/dist/fractions/createFractions/v0/createFractions.schema.js +13 -2
- package/dist/fractions/createFractions/v0/parseFractionsCreatedEvent.d.ts +2 -2
- package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts +55 -28
- package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts.map +1 -1
- package/dist/fractions/deployMarket/v0/deployMarket.routes.js +32 -33
- package/dist/fractions/deployMarket/v0/deployMarket.schema.d.ts +6 -3
- package/dist/fractions/deployMarket/v0/deployMarket.schema.d.ts.map +1 -1
- package/dist/fractions/deployMarket/v0/deployMarket.schema.js +5 -2
- package/dist/fractions/deployMarket/v0/index.d.ts +3 -0
- package/dist/fractions/deployMarket/v0/index.d.ts.map +1 -0
- package/dist/fractions/deployMarket/v0/index.js +2 -0
- package/dist/fractions/deployMarket/v0/initNid.route.d.ts +3 -3
- package/dist/fractions/fractions/approveWrapper.route.d.ts +88 -0
- package/dist/fractions/fractions/approveWrapper.route.d.ts.map +1 -0
- package/dist/fractions/fractions/approveWrapper.route.js +92 -0
- package/dist/fractions/fractions/index.d.ts +72 -0
- package/dist/fractions/fractions/index.d.ts.map +1 -0
- package/dist/fractions/fractions/index.js +9 -0
- package/dist/fractions/gating/v0/getAuthData.d.ts +7 -7
- package/dist/fractions/gating/v0/getAuthData.js +2 -2
- package/dist/fractions/gating/v0/getNonce.route.d.ts +7 -7
- package/dist/fractions/gating/v0/getNonce.route.js +2 -2
- package/dist/fractions/grantRole/v0/grantRole.route.d.ts +7 -7
- package/dist/fractions/grantRole/v0/grantRole.schema.d.ts +3 -3
- package/dist/fractions/grantRole/v0/grantRole.schema.js +2 -2
- package/dist/fractions/index.d.ts +1115 -1093
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/index.js +20 -103
- package/dist/fractions/markets/common/platform.d.ts +23 -75
- package/dist/fractions/markets/common/platform.d.ts.map +1 -1
- package/dist/fractions/markets/common/platform.js +11 -13
- package/dist/fractions/markets/getDeployEvent.d.ts +17 -39
- package/dist/fractions/markets/getDeployEvent.d.ts.map +1 -1
- package/dist/fractions/markets/getDeployEvent.js +9 -8
- package/dist/fractions/markets/getMarket/getMarket.d.ts +30 -0
- package/dist/fractions/markets/getMarket/getMarket.d.ts.map +1 -0
- package/dist/fractions/markets/getMarket/getMarket.js +65 -0
- package/dist/fractions/markets/getMarket/index.d.ts +10 -33
- package/dist/fractions/markets/getMarket/index.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/index.js +5 -4
- package/dist/fractions/markets/getMarket/v0/getMarket.d.ts +23 -23
- package/dist/fractions/markets/getMarket/v0/getMarket.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/v0/getMarket.js +3 -4
- package/dist/fractions/markets/index.d.ts +18 -60
- package/dist/fractions/markets/index.d.ts.map +1 -1
- package/dist/fractions/markets/index.js +10 -11
- package/dist/fractions/markets/searchMarkets/index.d.ts +7 -30
- package/dist/fractions/markets/searchMarkets/index.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/index.js +5 -4
- package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts +22 -0
- package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts.map +1 -0
- package/dist/fractions/markets/searchMarkets/searchMarkets.js +45 -0
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts +20 -20
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.js +3 -4
- package/dist/fractions/nftfractions/index.d.ts +6 -0
- package/dist/fractions/nftfractions/index.d.ts.map +1 -0
- package/dist/fractions/nftfractions/index.js +5 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.routes.d.ts +192 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.routes.d.ts.map +1 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.routes.js +58 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.schema.d.ts +245 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.schema.d.ts.map +1 -0
- package/dist/fractions/nftfractions/v0/createNftFractions.schema.js +65 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.d.ts +96 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.d.ts.map +1 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.routes.js +52 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.d.ts +70 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.d.ts.map +1 -0
- package/dist/fractions/nftfractions/v0/deployNftFractionsMarket.schema.js +28 -0
- package/dist/fractions/nftfractions/v0/initCompilot.routes.d.ts +74 -0
- package/dist/fractions/nftfractions/v0/initCompilot.routes.d.ts.map +1 -0
- package/dist/fractions/nftfractions/v0/initCompilot.routes.js +41 -0
- package/dist/fractions/platforms/deployMarket.routes.d.ts +158 -0
- package/dist/fractions/platforms/deployMarket.routes.d.ts.map +1 -0
- package/dist/fractions/platforms/deployMarket.routes.js +131 -0
- package/dist/fractions/platforms/deployMarket.schema.d.ts +33 -0
- package/dist/fractions/platforms/deployMarket.schema.d.ts.map +1 -0
- package/dist/fractions/platforms/deployMarket.schema.js +28 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.routes.d.ts +96 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +1 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.routes.js +52 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.schema.d.ts +30 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.schema.d.ts.map +1 -0
- package/dist/fractions/platforms/deployNftFractionsMarket.schema.js +29 -0
- package/dist/fractions/platforms/index.d.ts +196 -0
- package/dist/fractions/platforms/index.d.ts.map +1 -0
- package/dist/fractions/platforms/index.js +15 -0
- package/dist/fractions/platforms/initCompilot.routes.d.ts +36 -0
- package/dist/fractions/platforms/initCompilot.routes.d.ts.map +1 -0
- package/dist/fractions/platforms/initCompilot.routes.js +40 -0
- package/dist/fractions/platforms/initNid.route.d.ts +28 -0
- package/dist/fractions/platforms/initNid.route.d.ts.map +1 -0
- package/dist/fractions/platforms/initNid.route.js +32 -0
- package/dist/fractions/purchase/v0/purchase.route.d.ts +10 -10
- package/dist/fractions/purchase/v0/purchase.route.js +2 -2
- package/dist/fractions/purchase/v0/statistics.route.d.ts +22 -22
- package/dist/fractions/purchase/v0/statistics.route.d.ts.map +1 -1
- package/dist/fractions/purchase/v0/statistics.route.js +5 -5
- package/dist/fractions/roles/getRoles.d.ts +23 -0
- package/dist/fractions/roles/getRoles.d.ts.map +1 -0
- package/dist/fractions/roles/getRoles.js +42 -0
- package/dist/fractions/roles/grantRole.route.d.ts +27 -0
- package/dist/fractions/roles/grantRole.route.d.ts.map +1 -0
- package/dist/fractions/roles/grantRole.route.js +34 -0
- package/dist/fractions/roles/grantRole.schema.d.ts +16 -0
- package/dist/fractions/roles/grantRole.schema.d.ts.map +1 -0
- package/dist/fractions/roles/grantRole.schema.js +14 -0
- package/dist/fractions/roles/index.d.ts +48 -0
- package/dist/fractions/roles/index.d.ts.map +1 -0
- package/dist/fractions/roles/index.js +9 -0
- package/dist/fractions/sales/activityUtils.d.ts +49 -0
- package/dist/fractions/sales/activityUtils.d.ts.map +1 -0
- package/dist/fractions/sales/activityUtils.js +68 -0
- package/dist/fractions/sales/approveSale.route.d.ts +30 -0
- package/dist/fractions/sales/approveSale.route.d.ts.map +1 -0
- package/dist/fractions/sales/approveSale.route.js +35 -0
- package/dist/fractions/sales/common/fractionsSale.d.ts +50 -326
- package/dist/fractions/sales/common/fractionsSale.d.ts.map +1 -1
- package/dist/fractions/sales/common/fractionsSale.js +64 -79
- package/dist/fractions/sales/completeSale.route.d.ts +30 -0
- package/dist/fractions/sales/completeSale.route.d.ts.map +1 -0
- package/dist/fractions/sales/completeSale.route.js +35 -0
- package/dist/fractions/sales/createFractions.route.d.ts +71 -0
- package/dist/fractions/sales/createFractions.route.d.ts.map +1 -0
- package/dist/fractions/sales/createFractions.route.js +51 -0
- package/dist/fractions/sales/createFractions.schema.d.ts +123 -0
- package/dist/fractions/sales/createFractions.schema.d.ts.map +1 -0
- package/dist/fractions/sales/createFractions.schema.js +80 -0
- package/dist/fractions/sales/createNftFractions.routes.d.ts +180 -0
- package/dist/fractions/sales/createNftFractions.routes.d.ts.map +1 -0
- package/dist/fractions/sales/createNftFractions.routes.js +58 -0
- package/dist/fractions/sales/createNftFractions.schema.d.ts +85 -0
- package/dist/fractions/sales/createNftFractions.schema.d.ts.map +1 -0
- package/dist/fractions/sales/createNftFractions.schema.js +67 -0
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +31 -92
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.js +15 -16
- package/dist/fractions/sales/getVaultAddress.d.ts +31 -49
- package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
- package/dist/fractions/sales/getVaultAddress.js +13 -12
- package/dist/fractions/sales/getWithdrawEvent.d.ts +17 -39
- package/dist/fractions/sales/getWithdrawEvent.d.ts.map +1 -1
- package/dist/fractions/sales/getWithdrawEvent.js +12 -10
- package/dist/fractions/sales/index.d.ts +760 -0
- package/dist/fractions/sales/index.d.ts.map +1 -0
- package/dist/fractions/sales/index.js +52 -0
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts +23 -0
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts.map +1 -0
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +59 -0
- package/dist/fractions/sales/purchase.route.d.ts +36 -0
- package/dist/fractions/sales/purchase.route.d.ts.map +1 -0
- package/dist/fractions/sales/purchase.route.js +42 -0
- package/dist/fractions/sales/purchaseStatistics.route.d.ts +27 -0
- package/dist/fractions/sales/purchaseStatistics.route.d.ts.map +1 -0
- package/dist/fractions/sales/purchaseStatistics.route.js +53 -0
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +56 -140
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts.map +1 -1
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.js +19 -15
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +22 -54
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts.map +1 -1
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.js +6 -5
- package/dist/fractions/sales/recoverFractions.d.ts +65 -103
- package/dist/fractions/sales/recoverFractions.d.ts.map +1 -1
- package/dist/fractions/sales/recoverFractions.js +13 -11
- package/dist/fractions/sales/rejectFractions.d.ts +49 -75
- package/dist/fractions/sales/rejectFractions.d.ts.map +1 -1
- package/dist/fractions/sales/rejectFractions.js +12 -8
- package/dist/fractions/sales/searchActivity.route.d.ts +67 -86
- package/dist/fractions/sales/searchActivity.route.d.ts.map +1 -1
- package/dist/fractions/sales/searchActivity.route.js +27 -37
- package/dist/fractions/sales/searchSales/searchSales.d.ts +24 -0
- package/dist/fractions/sales/searchSales/searchSales.d.ts.map +1 -0
- package/dist/fractions/sales/searchSales/searchSales.js +50 -0
- package/dist/fractions/sales/searchSales/v0/searchSales.d.ts +39 -39
- package/dist/fractions/sales/searchSales/v0/searchSales.d.ts.map +1 -1
- package/dist/fractions/sales/searchSales/v0/searchSales.js +3 -4
- package/dist/fractions/sales/searchWithdrawal.route.d.ts +20 -55
- package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +1 -1
- package/dist/fractions/sales/searchWithdrawal.route.js +11 -11
- package/dist/fractions/sales/setFeeCapLimit.d.ts +27 -70
- package/dist/fractions/sales/setFeeCapLimit.d.ts.map +1 -1
- package/dist/fractions/sales/setFeeCapLimit.js +12 -8
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts +26 -65
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts.map +1 -1
- package/dist/fractions/sales/unlockWrappedAssets.route.js +10 -11
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts +36 -0
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/claimStatistics.route.js +87 -0
- package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts +62 -0
- package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/claimVestedTokens.route.js +45 -0
- package/dist/fractions/sales/vesting/editCliff.route.d.ts +58 -0
- package/dist/fractions/sales/vesting/editCliff.route.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/editCliff.route.js +45 -0
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts +22 -0
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.js +58 -0
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts +27 -27
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.js +9 -8
- package/dist/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts +9 -9
- package/dist/fractions/sales/vesting/v0/editCliff.route.d.ts +3 -3
- package/dist/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.d.ts +2 -2
- package/dist/fractions/sales/withdraw.route.d.ts +29 -0
- package/dist/fractions/sales/withdraw.route.d.ts.map +1 -0
- package/dist/fractions/sales/withdraw.route.js +30 -0
- package/dist/fractions/sig/getAuthData.d.ts +40 -0
- package/dist/fractions/sig/getAuthData.d.ts.map +1 -0
- package/dist/fractions/sig/getAuthData.js +52 -0
- package/dist/fractions/sig/getNonce.route.d.ts +25 -0
- package/dist/fractions/sig/getNonce.route.d.ts.map +1 -0
- package/dist/fractions/sig/getNonce.route.js +43 -0
- package/dist/fractions/sig/index.d.ts +40 -0
- package/dist/fractions/sig/index.d.ts.map +1 -0
- package/dist/fractions/sig/index.js +6 -0
- package/dist/fractions/statistics/index.d.ts +107 -0
- package/dist/fractions/statistics/index.d.ts.map +1 -0
- package/dist/fractions/statistics/index.js +10 -0
- package/dist/fractions/statistics/networkStatistics.route.d.ts +121 -0
- package/dist/fractions/statistics/networkStatistics.route.d.ts.map +1 -0
- package/dist/fractions/statistics/networkStatistics.route.js +222 -0
- package/dist/fractions/withdraw/v0/withdraw.route.d.ts +3 -3
- package/dist/general/balanceClient.d.ts +19 -59
- package/dist/general/balanceClient.d.ts.map +1 -1
- package/dist/general/balanceClient.js +1 -1
- package/dist/general/common.d.ts +10 -74
- package/dist/general/common.d.ts.map +1 -1
- package/dist/general/common.js +5 -9
- package/dist/general/estimateGas.d.ts +18 -45
- package/dist/general/estimateGas.d.ts.map +1 -1
- package/dist/general/estimateGas.js +31 -29
- package/dist/general/getBalance.d.ts +16 -37
- package/dist/general/getBalance.d.ts.map +1 -1
- package/dist/general/getBalance.js +29 -25
- package/dist/general/getBalancesBatch.d.ts +22 -56
- package/dist/general/getBalancesBatch.d.ts.map +1 -1
- package/dist/general/getBalancesBatch.js +23 -19
- package/dist/general/index.d.ts +74 -83
- package/dist/general/index.d.ts.map +1 -1
- package/dist/general/index.js +14 -19
- package/dist/general/searchBalances.d.ts +27 -67
- package/dist/general/searchBalances.d.ts.map +1 -1
- package/dist/general/searchBalances.js +24 -20
- package/dist/general/utils/tokenBalance/tokenBalance.d.ts +18 -34
- package/dist/general/utils/tokenBalance/tokenBalance.d.ts.map +1 -1
- package/dist/general/utils/tokenBalance/tokenBalance.js +5 -5
- package/dist/issuance/approve.d.ts +3 -3
- package/dist/issuance/approve.js +1 -1
- package/dist/issuance/burn.d.ts +3 -3
- package/dist/issuance/burn.js +1 -1
- package/dist/issuance/common/exports.d.ts +2 -0
- package/dist/issuance/common/exports.d.ts.map +1 -0
- package/dist/issuance/common/exports.js +1 -0
- package/dist/issuance/common/factories.d.ts +167 -0
- package/dist/issuance/common/factories.d.ts.map +1 -0
- package/dist/issuance/common/factories.js +15 -0
- package/dist/issuance/deploy.d.ts +19 -12
- package/dist/issuance/deploy.d.ts.map +1 -1
- package/dist/issuance/deploy.js +49 -2
- package/dist/issuance/erc20/approve.d.ts +32 -0
- package/dist/issuance/erc20/approve.d.ts.map +1 -0
- package/dist/issuance/erc20/approve.js +38 -0
- package/dist/issuance/erc20/burn.d.ts +32 -0
- package/dist/issuance/erc20/burn.d.ts.map +1 -0
- package/dist/issuance/erc20/burn.js +38 -0
- package/dist/issuance/erc20/deploy.d.ts +40 -0
- package/dist/issuance/erc20/deploy.d.ts.map +1 -0
- package/dist/issuance/erc20/deploy.js +56 -0
- package/dist/issuance/erc20/getInitData.d.ts +59 -0
- package/dist/issuance/erc20/getInitData.d.ts.map +1 -0
- package/dist/issuance/erc20/getInitData.js +49 -0
- package/dist/issuance/erc20/grantRole.d.ts +33 -0
- package/dist/issuance/erc20/grantRole.d.ts.map +1 -0
- package/dist/issuance/erc20/grantRole.js +41 -0
- package/dist/issuance/erc20/index.d.ts +297 -0
- package/dist/issuance/erc20/index.d.ts.map +1 -0
- package/dist/issuance/erc20/index.js +29 -0
- package/dist/issuance/erc20/initialize.d.ts +40 -0
- package/dist/issuance/erc20/initialize.d.ts.map +1 -0
- package/dist/issuance/erc20/initialize.js +45 -0
- package/dist/issuance/erc20/mint.d.ts +32 -0
- package/dist/issuance/erc20/mint.d.ts.map +1 -0
- package/dist/issuance/erc20/mint.js +38 -0
- package/dist/issuance/erc20/parseErc20DeployEvent.d.ts +23 -0
- package/dist/issuance/erc20/parseErc20DeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc20/parseErc20DeployEvent.js +79 -0
- package/dist/issuance/erc20/recover.d.ts +34 -0
- package/dist/issuance/erc20/recover.d.ts.map +1 -0
- package/dist/issuance/erc20/recover.js +39 -0
- package/dist/issuance/erc20/renounceRole.d.ts +33 -0
- package/dist/issuance/erc20/renounceRole.d.ts.map +1 -0
- package/dist/issuance/erc20/renounceRole.js +41 -0
- package/dist/issuance/erc20/revokeRole.d.ts +33 -0
- package/dist/issuance/erc20/revokeRole.d.ts.map +1 -0
- package/dist/issuance/erc20/revokeRole.js +41 -0
- package/dist/issuance/erc20/transfer.d.ts +32 -0
- package/dist/issuance/erc20/transfer.d.ts.map +1 -0
- package/dist/issuance/erc20/transfer.js +38 -0
- package/dist/issuance/erc20/transferFrom.d.ts +34 -0
- package/dist/issuance/erc20/transferFrom.d.ts.map +1 -0
- package/dist/issuance/erc20/transferFrom.js +39 -0
- package/dist/issuance/erc721/approve.d.ts +32 -0
- package/dist/issuance/erc721/approve.d.ts.map +1 -0
- package/dist/issuance/erc721/approve.js +38 -0
- package/dist/issuance/erc721/burn.d.ts +30 -0
- package/dist/issuance/erc721/burn.d.ts.map +1 -0
- package/dist/issuance/erc721/burn.js +37 -0
- package/dist/issuance/erc721/deploy.d.ts +40 -0
- package/dist/issuance/erc721/deploy.d.ts.map +1 -0
- package/dist/issuance/erc721/deploy.js +55 -0
- package/dist/issuance/erc721/getInitData.d.ts +49 -0
- package/dist/issuance/erc721/getInitData.d.ts.map +1 -0
- package/dist/issuance/erc721/getInitData.js +51 -0
- package/dist/issuance/erc721/grantRole.d.ts +33 -0
- package/dist/issuance/erc721/grantRole.d.ts.map +1 -0
- package/dist/issuance/erc721/grantRole.js +41 -0
- package/dist/issuance/erc721/index.d.ts +318 -0
- package/dist/issuance/erc721/index.d.ts.map +1 -0
- package/dist/issuance/erc721/index.js +31 -0
- package/dist/issuance/erc721/initialize.d.ts +38 -0
- package/dist/issuance/erc721/initialize.d.ts.map +1 -0
- package/dist/issuance/erc721/initialize.js +40 -0
- package/dist/issuance/erc721/mint.d.ts +32 -0
- package/dist/issuance/erc721/mint.d.ts.map +1 -0
- package/dist/issuance/erc721/mint.js +38 -0
- package/dist/issuance/erc721/parseErc721DeployEvent.d.ts +23 -0
- package/dist/issuance/erc721/parseErc721DeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc721/parseErc721DeployEvent.js +78 -0
- package/dist/issuance/erc721/recover.d.ts +34 -0
- package/dist/issuance/erc721/recover.d.ts.map +1 -0
- package/dist/issuance/erc721/recover.js +39 -0
- package/dist/issuance/erc721/renounceRole.d.ts +33 -0
- package/dist/issuance/erc721/renounceRole.d.ts.map +1 -0
- package/dist/issuance/erc721/renounceRole.js +41 -0
- package/dist/issuance/erc721/revokeRole.d.ts +33 -0
- package/dist/issuance/erc721/revokeRole.d.ts.map +1 -0
- package/dist/issuance/erc721/revokeRole.js +41 -0
- package/dist/issuance/erc721/setBaseURI.d.ts +30 -0
- package/dist/issuance/erc721/setBaseURI.d.ts.map +1 -0
- package/dist/issuance/erc721/setBaseURI.js +36 -0
- package/dist/issuance/erc721/setTokenURI.d.ts +32 -0
- package/dist/issuance/erc721/setTokenURI.d.ts.map +1 -0
- package/dist/issuance/erc721/setTokenURI.js +38 -0
- package/dist/issuance/erc721/transferFrom.d.ts +34 -0
- package/dist/issuance/erc721/transferFrom.d.ts.map +1 -0
- package/dist/issuance/erc721/transferFrom.js +39 -0
- package/dist/issuance/exports.d.ts +2 -0
- package/dist/issuance/exports.d.ts.map +1 -0
- package/dist/issuance/exports.js +1 -0
- package/dist/issuance/getInitData.d.ts +67 -10
- package/dist/issuance/getInitData.d.ts.map +1 -1
- package/dist/issuance/getInitData.js +52 -1
- package/dist/issuance/grantRole.d.ts +9 -9
- package/dist/issuance/grantRole.js +1 -1
- package/dist/issuance/index.d.ts +634 -228
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/issuance/index.js +12 -30
- package/dist/issuance/mint.d.ts +3 -3
- package/dist/issuance/mint.js +1 -1
- package/dist/issuance/proxy/deploy.d.ts +41 -0
- package/dist/issuance/proxy/deploy.d.ts.map +1 -0
- package/dist/issuance/proxy/deploy.js +68 -0
- package/dist/issuance/proxy/index.d.ts +59 -0
- package/dist/issuance/proxy/index.d.ts.map +1 -0
- package/dist/issuance/proxy/index.js +10 -0
- package/dist/issuance/proxy/upgrade.d.ts +34 -0
- package/dist/issuance/proxy/upgrade.d.ts.map +1 -0
- package/dist/issuance/proxy/upgrade.js +46 -0
- package/dist/issuance/recover.d.ts +82 -0
- package/dist/issuance/recover.d.ts.map +1 -0
- package/dist/issuance/recover.js +38 -0
- package/dist/issuance/renounceRole.d.ts +9 -9
- package/dist/issuance/renounceRole.js +1 -1
- package/dist/issuance/transfer.d.ts +9 -9
- package/dist/issuance/transfer.js +1 -1
- package/dist/issuance/upgrade.d.ts +3 -3
- package/dist/next/fractions/index.d.ts +275 -0
- package/dist/next/fractions/index.d.ts.map +1 -0
- package/dist/next/fractions/index.js +13 -0
- package/dist/next/fractions/lending/buyback/buyback.routes.d.ts +27 -0
- package/dist/next/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
- package/dist/next/fractions/lending/buyback/buyback.routes.js +28 -0
- package/dist/next/fractions/lending/buyback/buyback.schema.d.ts +8 -0
- package/dist/next/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
- package/dist/next/fractions/lending/buyback/buyback.schema.js +13 -0
- package/dist/next/fractions/lending/createLendingSale.d.ts +130 -0
- package/dist/next/fractions/lending/createLendingSale.d.ts.map +1 -0
- package/dist/next/fractions/lending/createLendingSale.js +82 -0
- package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts +44 -0
- package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
- package/dist/next/fractions/lending/deployMarket/lending.routes.js +40 -0
- package/dist/next/fractions/lending/index.d.ts +188 -0
- package/dist/next/fractions/lending/index.d.ts.map +1 -0
- package/dist/next/fractions/lending/index.js +15 -0
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts +33 -0
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
- package/dist/next/fractions/lending/purchase/directPurchase.route.js +34 -0
- package/dist/next/fractions/lending/schemas.d.ts +25 -0
- package/dist/next/fractions/lending/schemas.d.ts.map +1 -0
- package/dist/next/fractions/lending/schemas.js +21 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +26 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +28 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +7 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +11 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts +39 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +1 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.js +40 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts +26 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.d.ts.map +1 -0
- package/dist/next/fractions/platforms/deployNftFractionsMarket.schema.js +24 -0
- package/dist/next/fractions/platforms/index.d.ts +36 -0
- package/dist/next/fractions/platforms/index.d.ts.map +1 -0
- package/dist/next/fractions/platforms/index.js +5 -0
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts +58 -0
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts.map +1 -0
- package/dist/next/fractions/sales/createNftFractions.routes.js +59 -0
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts +85 -0
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts.map +1 -0
- package/dist/next/fractions/sales/createNftFractions.schema.js +67 -0
- package/dist/next/fractions/sales/index.d.ts +55 -0
- package/dist/next/fractions/sales/index.d.ts.map +1 -0
- package/dist/next/fractions/sales/index.js +5 -0
- package/dist/staking/index.d.ts +193 -202
- package/dist/staking/index.d.ts.map +1 -1
- package/dist/staking/index.js +14 -19
- package/dist/staking/platforms/common/platform.d.ts +7 -21
- package/dist/staking/platforms/common/platform.d.ts.map +1 -1
- package/dist/staking/platforms/common/platform.js +6 -8
- package/dist/staking/platforms/getPlatform/index.d.ts +9 -12
- package/dist/staking/platforms/getPlatform/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/index.js +5 -4
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +21 -49
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.js +23 -13
- package/dist/staking/platforms/index.d.ts +19 -21
- package/dist/staking/platforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/index.js +8 -9
- package/dist/staking/platforms/searchPlatforms/index.d.ts +11 -14
- package/dist/staking/platforms/searchPlatforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/index.js +5 -4
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +27 -73
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +15 -12
- package/dist/staking/pools/common/pool.d.ts +9 -25
- package/dist/staking/pools/common/pool.d.ts.map +1 -1
- package/dist/staking/pools/common/pool.js +5 -7
- package/dist/staking/pools/getPool/index.d.ts +4 -7
- package/dist/staking/pools/getPool/index.d.ts.map +1 -1
- package/dist/staking/pools/getPool/index.js +5 -4
- package/dist/staking/pools/getPool/v0/getPool.d.ts +14 -32
- package/dist/staking/pools/getPool/v0/getPool.d.ts.map +1 -1
- package/dist/staking/pools/getPool/v0/getPool.js +23 -12
- package/dist/staking/pools/index.d.ts +10 -12
- package/dist/staking/pools/index.d.ts.map +1 -1
- package/dist/staking/pools/index.js +8 -9
- package/dist/staking/pools/searchPools/index.d.ts +7 -10
- package/dist/staking/pools/searchPools/index.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/index.js +5 -4
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +19 -52
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.js +14 -11
- package/dist/staking/roles/common/role.d.ts +4 -10
- package/dist/staking/roles/common/role.d.ts.map +1 -1
- package/dist/staking/roles/common/role.js +2 -4
- package/dist/staking/roles/common/roleAssignment.d.ts +9 -25
- package/dist/staking/roles/common/roleAssignment.d.ts.map +1 -1
- package/dist/staking/roles/common/roleAssignment.js +5 -7
- package/dist/staking/roles/common/roleEvent.d.ts +8 -26
- package/dist/staking/roles/common/roleEvent.d.ts.map +1 -1
- package/dist/staking/roles/common/roleEvent.js +3 -5
- package/dist/staking/roles/getRoles/index.d.ts +3 -6
- package/dist/staking/roles/getRoles/index.d.ts.map +1 -1
- package/dist/staking/roles/getRoles/index.js +5 -4
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts +22 -28
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts.map +1 -1
- package/dist/staking/roles/getRoles/v0/getRoles.js +9 -6
- package/dist/staking/roles/grantRole/index.d.ts +6 -9
- package/dist/staking/roles/grantRole/index.d.ts.map +1 -1
- package/dist/staking/roles/grantRole/index.js +5 -4
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts +23 -60
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts.map +1 -1
- package/dist/staking/roles/grantRole/v0/grantRole.js +9 -6
- package/dist/staking/roles/index.d.ts +24 -26
- package/dist/staking/roles/index.d.ts.map +1 -1
- package/dist/staking/roles/index.js +12 -13
- package/dist/staking/roles/searchRoleEvents/index.d.ts +9 -12
- package/dist/staking/roles/searchRoleEvents/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/index.js +5 -4
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +21 -60
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.js +14 -11
- package/dist/staking/roles/searchRoles/index.d.ts +9 -12
- package/dist/staking/roles/searchRoles/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/index.js +5 -4
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +21 -60
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.js +20 -14
- package/dist/staking/stakes/common/stake.d.ts +14 -40
- package/dist/staking/stakes/common/stake.d.ts.map +1 -1
- package/dist/staking/stakes/common/stake.js +18 -20
- package/dist/staking/stakes/common/stakeEvent.d.ts +9 -27
- package/dist/staking/stakes/common/stakeEvent.d.ts.map +1 -1
- package/dist/staking/stakes/common/stakeEvent.js +4 -6
- package/dist/staking/stakes/getStake/index.d.ts +3 -6
- package/dist/staking/stakes/getStake/index.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/index.js +5 -4
- package/dist/staking/stakes/getStake/v0/getStake.d.ts +14 -32
- package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/v0/getStake.js +22 -12
- package/dist/staking/stakes/index.d.ts +19 -21
- package/dist/staking/stakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/index.js +10 -11
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +9 -12
- package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/index.js +5 -4
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +21 -60
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.js +16 -12
- package/dist/staking/stakes/searchStakes/index.d.ts +9 -12
- package/dist/staking/stakes/searchStakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/index.js +5 -4
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +21 -60
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/v0/searchStakes.js +16 -30
- package/dist/staking-templates/index.d.ts +79 -79
- package/dist/staking-templates/index.js +1 -1
- package/dist/staking-templates/templates/common/amount.d.ts +5 -11
- package/dist/staking-templates/templates/common/amount.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/amount.js +6 -8
- package/dist/staking-templates/templates/common/amountMult.d.ts +2 -2
- package/dist/staking-templates/templates/common/amountMult.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/amountMult.js +3 -4
- package/dist/staking-templates/templates/common/erc20Input.d.ts +4 -10
- package/dist/staking-templates/templates/common/erc20Input.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/erc20Input.js +4 -6
- package/dist/staking-templates/templates/common/erc20Reward.d.ts +4 -10
- package/dist/staking-templates/templates/common/erc20Reward.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/erc20Reward.js +4 -7
- package/dist/staking-templates/templates/common/getCreatePoolEvent.d.ts +2 -2
- package/dist/staking-templates/templates/common/getCreatePoolEvent.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/getCreatePoolEvent.js +3 -3
- package/dist/staking-templates/templates/common/getPlatformDeployEvent.d.ts +2 -2
- package/dist/staking-templates/templates/common/getPlatformDeployEvent.js +4 -4
- package/dist/staking-templates/templates/common/getReward.d.ts +5 -5
- package/dist/staking-templates/templates/common/getReward.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/getReward.js +2 -2
- package/dist/staking-templates/templates/common/getStakeEvent.d.ts +3 -3
- package/dist/staking-templates/templates/common/getStakeEvent.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/getStakeEvent.js +4 -4
- package/dist/staking-templates/templates/common/lock.d.ts +4 -10
- package/dist/staking-templates/templates/common/lock.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/lock.js +5 -7
- package/dist/staking-templates/templates/common/lockMult.d.ts +2 -2
- package/dist/staking-templates/templates/common/lockMult.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/lockMult.js +3 -4
- package/dist/staking-templates/templates/common/partialUnstake.d.ts +7 -7
- package/dist/staking-templates/templates/common/partialUnstake.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/partialUnstake.js +4 -4
- package/dist/staking-templates/templates/common/rewardDistribution.d.ts +5 -11
- package/dist/staking-templates/templates/common/rewardDistribution.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/rewardDistribution.js +7 -10
- package/dist/staking-templates/templates/common/time.d.ts +1 -1
- package/dist/staking-templates/templates/common/time.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/time.js +2 -2
- package/dist/staking-templates/templates/common/unstake.d.ts +5 -5
- package/dist/staking-templates/templates/common/unstake.d.ts.map +1 -1
- package/dist/staking-templates/templates/common/unstake.js +2 -2
- package/dist/staking-templates/templates/reputation/index.d.ts +23 -23
- package/dist/staking-templates/templates/reputation/v0/createPlatform.d.ts +8 -8
- package/dist/staking-templates/templates/reputation/v0/createPlatform.js +3 -3
- package/dist/staking-templates/templates/reputation/v0/createPool.d.ts +19 -19
- package/dist/staking-templates/templates/reputation/v0/createPool.d.ts.map +1 -1
- package/dist/staking-templates/templates/reputation/v0/createPool.js +6 -6
- package/dist/staking-templates/templates/reputation/v0/index.d.ts +23 -23
- package/dist/staking-templates/templates/reputation/v0/index.js +5 -5
- package/dist/staking-templates/templates/reputation/v0/restake.d.ts +6 -6
- package/dist/staking-templates/templates/reputation/v0/restake.js +4 -4
- package/dist/staking-templates/templates/reputation/v0/stake.d.ts +7 -7
- package/dist/staking-templates/templates/reputation/v0/stake.d.ts.map +1 -1
- package/dist/staking-templates/templates/reputation/v0/stake.js +5 -5
- package/dist/staking-templates/templates/reputationLock/index.d.ts +30 -30
- package/dist/staking-templates/templates/reputationLock/v0/createPlatform.d.ts +8 -8
- package/dist/staking-templates/templates/reputationLock/v0/createPlatform.js +3 -3
- package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts +31 -31
- package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts.map +1 -1
- package/dist/staking-templates/templates/reputationLock/v0/createPool.js +7 -7
- package/dist/staking-templates/templates/reputationLock/v0/index.d.ts +30 -30
- package/dist/staking-templates/templates/reputationLock/v0/index.js +5 -5
- package/dist/staking-templates/templates/reputationLock/v0/restake.d.ts +8 -8
- package/dist/staking-templates/templates/reputationLock/v0/restake.js +5 -5
- package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts +9 -9
- package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts.map +1 -1
- package/dist/staking-templates/templates/reputationLock/v0/stake.js +5 -5
- package/dist/staking-templates/templates/rwa/index.d.ts +26 -26
- package/dist/staking-templates/templates/rwa/v0/createPlatform.d.ts +8 -8
- package/dist/staking-templates/templates/rwa/v0/createPlatform.js +3 -3
- package/dist/staking-templates/templates/rwa/v0/createPool.d.ts +17 -17
- package/dist/staking-templates/templates/rwa/v0/createPool.d.ts.map +1 -1
- package/dist/staking-templates/templates/rwa/v0/createPool.js +4 -4
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts +61 -0
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.js +41 -0
- package/dist/staking-templates/templates/rwa/v0/index.d.ts +26 -26
- package/dist/staking-templates/templates/rwa/v0/index.js +7 -7
- package/dist/staking-templates/templates/rwa/v0/restake.d.ts +6 -6
- package/dist/staking-templates/templates/rwa/v0/restake.js +4 -4
- package/dist/staking-templates/templates/rwa/v0/stake.d.ts +7 -7
- package/dist/staking-templates/templates/rwa/v0/stake.d.ts.map +1 -1
- package/dist/staking-templates/templates/rwa/v0/stake.js +5 -5
- package/dist/stakingTemplates/index.d.ts +723 -0
- package/dist/stakingTemplates/index.d.ts.map +1 -0
- package/dist/stakingTemplates/index.js +13 -0
- package/dist/stakingTemplates/templates/common/amount.d.ts +7 -0
- package/dist/stakingTemplates/templates/common/amount.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/amount.js +15 -0
- package/dist/stakingTemplates/templates/common/amountMult.d.ts +3 -0
- package/dist/stakingTemplates/templates/common/amountMult.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/amountMult.js +24 -0
- package/dist/stakingTemplates/templates/common/erc20Input.d.ts +6 -0
- package/dist/stakingTemplates/templates/common/erc20Input.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/erc20Input.js +16 -0
- package/dist/stakingTemplates/templates/common/erc20Reward.d.ts +6 -0
- package/dist/stakingTemplates/templates/common/erc20Reward.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/erc20Reward.js +15 -0
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts +17 -0
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.js +51 -0
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts +20 -0
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.js +49 -0
- package/dist/stakingTemplates/templates/common/getReward.d.ts +26 -0
- package/dist/stakingTemplates/templates/common/getReward.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/getReward.js +37 -0
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts +17 -0
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/getStakeEvent.js +55 -0
- package/dist/stakingTemplates/templates/common/lock.d.ts +6 -0
- package/dist/stakingTemplates/templates/common/lock.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/lock.js +18 -0
- package/dist/stakingTemplates/templates/common/lockMult.d.ts +3 -0
- package/dist/stakingTemplates/templates/common/lockMult.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/lockMult.js +16 -0
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts +27 -0
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/partialUnstake.js +42 -0
- package/dist/stakingTemplates/templates/common/rewardDistribution.d.ts +7 -0
- package/dist/stakingTemplates/templates/common/rewardDistribution.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/rewardDistribution.js +16 -0
- package/dist/stakingTemplates/templates/common/templates.d.ts +61 -0
- package/dist/stakingTemplates/templates/common/templates.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/templates.js +8 -0
- package/dist/stakingTemplates/templates/common/time.d.ts +2 -0
- package/dist/stakingTemplates/templates/common/time.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/time.js +4 -0
- package/dist/stakingTemplates/templates/common/unstake.d.ts +26 -0
- package/dist/stakingTemplates/templates/common/unstake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/common/unstake.js +37 -0
- package/dist/stakingTemplates/templates/reputation/common.d.ts +23 -0
- package/dist/stakingTemplates/templates/reputation/common.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/common.js +3 -0
- package/dist/stakingTemplates/templates/reputation/index.d.ts +231 -0
- package/dist/stakingTemplates/templates/reputation/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/index.js +5 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts +31 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.js +57 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts +39 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/v0/createPool.js +86 -0
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts +231 -0
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/v0/index.js +26 -0
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts +26 -0
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/v0/restake.js +41 -0
- package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts +26 -0
- package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/v0/stake.js +46 -0
- package/dist/stakingTemplates/templates/reputationLock/common.d.ts +23 -0
- package/dist/stakingTemplates/templates/reputationLock/common.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/common.js +3 -0
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts +242 -0
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/index.js +5 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts +31 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.js +57 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts +48 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.js +100 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts +242 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/index.js +26 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts +27 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.js +45 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts +27 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.js +47 -0
- package/dist/stakingTemplates/templates/rwa/common.d.ts +23 -0
- package/dist/stakingTemplates/templates/rwa/common.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/common.js +3 -0
- package/dist/stakingTemplates/templates/rwa/index.d.ts +254 -0
- package/dist/stakingTemplates/templates/rwa/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/index.js +5 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts +31 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.js +57 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts +38 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/createPool.js +80 -0
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts +26 -0
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.js +42 -0
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts +254 -0
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/index.js +28 -0
- package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts +26 -0
- package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/restake.js +41 -0
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts +26 -0
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/v0/stake.js +46 -0
- package/dist/v0/fractions/index.d.ts +129 -0
- package/dist/v0/fractions/index.d.ts.map +1 -0
- package/dist/v0/fractions/index.js +9 -0
- package/dist/v0/fractions/networkStatistics.route.d.ts +297 -0
- package/dist/v0/fractions/networkStatistics.route.d.ts.map +1 -0
- package/dist/v0/fractions/networkStatistics.route.js +225 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts +65 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.js +27 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts +8 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.js +13 -0
- package/dist/v1/fractions/lending/createLendingSale.d.ts +303 -0
- package/dist/v1/fractions/lending/createLendingSale.d.ts.map +1 -0
- package/dist/v1/fractions/lending/createLendingSale.js +79 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts +113 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.js +41 -0
- package/dist/v1/fractions/lending/index.d.ts +192 -0
- package/dist/v1/fractions/lending/index.d.ts.map +1 -0
- package/dist/v1/fractions/lending/index.js +22 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts +71 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.js +31 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +61 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +27 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +7 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +11 -0
- package/dist/v1/fractions/schemas.d.ts +20 -0
- package/dist/v1/fractions/schemas.d.ts.map +1 -0
- package/dist/v1/fractions/schemas.js +20 -0
- package/package.json +26 -19
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { encodePacked, keccak256, padHex, toHex } from "viem";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { HexStringSchema } from "@evergonlabs/tmi-utils/models";
|
|
6
|
+
import { createController } from "../../common/controller.js";
|
|
7
|
+
import { AddressSchema, FractionsChainId } from "../../common/index.js";
|
|
8
|
+
import { Int256BigInt } from "../../common/int256.js";
|
|
9
|
+
/**
|
|
10
|
+
* functionCallData: functionCallData as `0x${string}`,
|
|
11
|
+
* contractAddress: diamondAddress_ as string,
|
|
12
|
+
* userAddress: creator_.address as string,
|
|
13
|
+
* chainID: chainID_,
|
|
14
|
+
* nonce: Number(nonce_),
|
|
15
|
+
* blockExpiration: blockExpiration_,
|
|
16
|
+
*/
|
|
17
|
+
export const TxAuthDataRequestSchema = z.object({
|
|
18
|
+
marketAddress: AddressSchema,
|
|
19
|
+
userAddress: AddressSchema,
|
|
20
|
+
chainId: FractionsChainId,
|
|
21
|
+
nonce: Int256BigInt(),
|
|
22
|
+
blockExpiration: Int256BigInt(),
|
|
23
|
+
callData: HexStringSchema,
|
|
24
|
+
});
|
|
25
|
+
const route = describeRoute({
|
|
26
|
+
summary: "Get TX auth data",
|
|
27
|
+
description: "Returns TX auth data ",
|
|
28
|
+
tags: ["Signatures"],
|
|
29
|
+
responses: {
|
|
30
|
+
200: {
|
|
31
|
+
description: "Returns TX auth data",
|
|
32
|
+
content: {
|
|
33
|
+
"application/json": {
|
|
34
|
+
schema: resolver(TxAuthDataRequestSchema),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const GetAuthDataV0 = createController({
|
|
41
|
+
build: (factory) => factory
|
|
42
|
+
.createApp()
|
|
43
|
+
.post("/", route, validator("json", TxAuthDataRequestSchema.openapi("TxAuthDataRequestSchema")), async (c) => {
|
|
44
|
+
const { marketAddress, userAddress, chainId, blockExpiration, callData, nonce } = c.req.valid("json");
|
|
45
|
+
const blockExpirationAbi = padHex(toHex(blockExpiration), { size: 32 });
|
|
46
|
+
const message = keccak256(encodePacked(["uint256", "uint256", "uint256", "address", "address", "bytes"], [BigInt(chainId), BigInt(nonce), BigInt(blockExpiration), marketAddress, userAddress, callData]));
|
|
47
|
+
return c.json({
|
|
48
|
+
messageToSign: message,
|
|
49
|
+
blockExpiration: blockExpirationAbi,
|
|
50
|
+
});
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const NonceRequestSchema: z.ZodObject<{
|
|
3
|
+
marketAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
+
userAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 72080>[]]>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const GetNonceV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, {
|
|
8
|
+
"/": {
|
|
9
|
+
$post: {
|
|
10
|
+
input: {
|
|
11
|
+
json: {
|
|
12
|
+
marketAddress: string;
|
|
13
|
+
userAddress: string;
|
|
14
|
+
chainId: unknown;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
output: {
|
|
18
|
+
nonce: string;
|
|
19
|
+
};
|
|
20
|
+
outputFormat: "json";
|
|
21
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}, "/">>;
|
|
25
|
+
//# sourceMappingURL=getNonce.route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNonce.route.d.ts","sourceRoot":"","sources":["../../../src/fractions/sig/getNonce.route.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAkBH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;QAiBrB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { ABIS } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
5
|
+
import { getPublicClient } from "../../common/blockchain.js";
|
|
6
|
+
import { createController } from "../../common/controller.js";
|
|
7
|
+
import { AddressSchema, FractionsChainId } from "../../common/index.js";
|
|
8
|
+
export const NonceRequestSchema = z.object({
|
|
9
|
+
marketAddress: AddressSchema,
|
|
10
|
+
userAddress: AddressSchema,
|
|
11
|
+
chainId: FractionsChainId,
|
|
12
|
+
});
|
|
13
|
+
const route = describeRoute({
|
|
14
|
+
summary: "Get a nonce",
|
|
15
|
+
description: "Returns transaction data for approving a sale",
|
|
16
|
+
tags: ["Signatures"],
|
|
17
|
+
responses: {
|
|
18
|
+
200: {
|
|
19
|
+
description: "Returns transaction data for approving a sale",
|
|
20
|
+
content: {
|
|
21
|
+
"application/json": {
|
|
22
|
+
schema: resolver(NonceRequestSchema),
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
export const GetNonceV0 = createController({
|
|
29
|
+
build: (factory) => factory
|
|
30
|
+
.createApp()
|
|
31
|
+
.post("/", route, validator("json", NonceRequestSchema.openapi("NonceRequestSchema")), async (c) => {
|
|
32
|
+
const { marketAddress, userAddress, chainId } = c.req.valid("json");
|
|
33
|
+
const nonce = await getPublicClient(chainId).readContract({
|
|
34
|
+
address: marketAddress,
|
|
35
|
+
abi: ABIS.createFractionsAbi.nid,
|
|
36
|
+
functionName: "txAuthDataUserNonce",
|
|
37
|
+
args: [userAddress],
|
|
38
|
+
});
|
|
39
|
+
return c.json({
|
|
40
|
+
nonce: nonce.toString(),
|
|
41
|
+
});
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const SigController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
|
+
"/": {
|
|
3
|
+
$post: {
|
|
4
|
+
input: {
|
|
5
|
+
json: {
|
|
6
|
+
marketAddress: string;
|
|
7
|
+
userAddress: string;
|
|
8
|
+
chainId: unknown;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
output: {
|
|
12
|
+
nonce: string;
|
|
13
|
+
};
|
|
14
|
+
outputFormat: "json";
|
|
15
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}, "/nonce"> | import("hono/types").MergeSchemaPath<{
|
|
19
|
+
"/": {
|
|
20
|
+
$post: {
|
|
21
|
+
input: {
|
|
22
|
+
json: {
|
|
23
|
+
marketAddress: string;
|
|
24
|
+
userAddress: string;
|
|
25
|
+
chainId: unknown;
|
|
26
|
+
nonce: string;
|
|
27
|
+
blockExpiration: string;
|
|
28
|
+
callData: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
output: {
|
|
32
|
+
messageToSign: `0x${string}`;
|
|
33
|
+
blockExpiration: `0x${string}`;
|
|
34
|
+
};
|
|
35
|
+
outputFormat: "json";
|
|
36
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, "/authData">, "/">>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/sig/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAGxB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createController } from "../../common/controller.js";
|
|
2
|
+
import { GetAuthDataV0 } from "./getAuthData.js";
|
|
3
|
+
import { GetNonceV0 } from "./getNonce.route.js";
|
|
4
|
+
export const SigController = createController({
|
|
5
|
+
build: (factory) => factory.createApp().route("/nonce", GetNonceV0.build(factory)).route("/authData", GetAuthDataV0.build(factory)),
|
|
6
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export declare const StatisticsController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
|
+
"/": {
|
|
3
|
+
$post: {
|
|
4
|
+
input: {
|
|
5
|
+
json: {
|
|
6
|
+
chainId?: unknown;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
output: {
|
|
10
|
+
[x: number]: string & import("zod").$brand<"Int256">;
|
|
11
|
+
total: string & import("zod").$brand<"Int256">;
|
|
12
|
+
} | {
|
|
13
|
+
total: string & import("zod").$brand<"Int256">;
|
|
14
|
+
1: string & import("zod").$brand<"Int256">;
|
|
15
|
+
11155111: string & import("zod").$brand<"Int256">;
|
|
16
|
+
31337: string & import("zod").$brand<"Int256">;
|
|
17
|
+
72080: string & import("zod").$brand<"Int256">;
|
|
18
|
+
};
|
|
19
|
+
outputFormat: "json";
|
|
20
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, "/holders"> | import("hono/types").MergeSchemaPath<{
|
|
24
|
+
"/": {
|
|
25
|
+
$post: {
|
|
26
|
+
input: {
|
|
27
|
+
json: {
|
|
28
|
+
chainId?: unknown;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
output: {
|
|
32
|
+
[x: number]: string & import("zod").$brand<"Int256">;
|
|
33
|
+
total: string & import("zod").$brand<"Int256">;
|
|
34
|
+
} | {
|
|
35
|
+
total: string & import("zod").$brand<"Int256">;
|
|
36
|
+
1: string & import("zod").$brand<"Int256">;
|
|
37
|
+
11155111: string & import("zod").$brand<"Int256">;
|
|
38
|
+
31337: string & import("zod").$brand<"Int256">;
|
|
39
|
+
72080: string & import("zod").$brand<"Int256">;
|
|
40
|
+
};
|
|
41
|
+
outputFormat: "json";
|
|
42
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, "/sales"> | import("hono/types").MergeSchemaPath<{
|
|
46
|
+
"/": {
|
|
47
|
+
$post: {
|
|
48
|
+
input: {
|
|
49
|
+
json: {
|
|
50
|
+
chainId?: unknown;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
output: {
|
|
54
|
+
[x: number]: string & import("zod").$brand<"Int256">;
|
|
55
|
+
total: string & import("zod").$brand<"Int256">;
|
|
56
|
+
} | {
|
|
57
|
+
total: string & import("zod").$brand<"Int256">;
|
|
58
|
+
1: string & import("zod").$brand<"Int256">;
|
|
59
|
+
11155111: string & import("zod").$brand<"Int256">;
|
|
60
|
+
31337: string & import("zod").$brand<"Int256">;
|
|
61
|
+
72080: string & import("zod").$brand<"Int256">;
|
|
62
|
+
};
|
|
63
|
+
outputFormat: "json";
|
|
64
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, "/ttv"> | import("hono/types").MergeSchemaPath<{
|
|
68
|
+
"/": {
|
|
69
|
+
$post: {
|
|
70
|
+
input: {
|
|
71
|
+
json: {
|
|
72
|
+
chainId?: unknown;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
output: {
|
|
76
|
+
total: {
|
|
77
|
+
holders: string & import("zod").$brand<"Int256">;
|
|
78
|
+
sales: string & import("zod").$brand<"Int256">;
|
|
79
|
+
ttv: string & import("zod").$brand<"Int256">;
|
|
80
|
+
};
|
|
81
|
+
1: {
|
|
82
|
+
holders: string & import("zod").$brand<"Int256">;
|
|
83
|
+
sales: string & import("zod").$brand<"Int256">;
|
|
84
|
+
ttv: string & import("zod").$brand<"Int256">;
|
|
85
|
+
};
|
|
86
|
+
11155111: {
|
|
87
|
+
holders: string & import("zod").$brand<"Int256">;
|
|
88
|
+
sales: string & import("zod").$brand<"Int256">;
|
|
89
|
+
ttv: string & import("zod").$brand<"Int256">;
|
|
90
|
+
};
|
|
91
|
+
31337: {
|
|
92
|
+
holders: string & import("zod").$brand<"Int256">;
|
|
93
|
+
sales: string & import("zod").$brand<"Int256">;
|
|
94
|
+
ttv: string & import("zod").$brand<"Int256">;
|
|
95
|
+
};
|
|
96
|
+
72080: {
|
|
97
|
+
holders: string & import("zod").$brand<"Int256">;
|
|
98
|
+
sales: string & import("zod").$brand<"Int256">;
|
|
99
|
+
ttv: string & import("zod").$brand<"Int256">;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
outputFormat: "json";
|
|
103
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
}, "/">, "/">>;
|
|
107
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fractions/statistics/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAQ/B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createController } from "../../common/controller.js";
|
|
2
|
+
import { GetHoldersV0, GetNetworkStatisticsV0, GetSalesStatisticsV0, GetTtvV0 } from "./networkStatistics.route.js";
|
|
3
|
+
export const StatisticsController = createController({
|
|
4
|
+
build: (factory) => factory
|
|
5
|
+
.createApp()
|
|
6
|
+
.route("/holders", GetHoldersV0.build(factory))
|
|
7
|
+
.route("/sales", GetSalesStatisticsV0.build(factory))
|
|
8
|
+
.route("/ttv", GetTtvV0.build(factory))
|
|
9
|
+
.route("/", GetNetworkStatisticsV0.build(factory)),
|
|
10
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AppContext } from "../../common/context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get the number of unique fraction holders from successful (finalized) sales
|
|
5
|
+
*/
|
|
6
|
+
export declare const GetHoldersV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<AppContext, {
|
|
7
|
+
"/": {
|
|
8
|
+
$post: {
|
|
9
|
+
input: {
|
|
10
|
+
json: {
|
|
11
|
+
chainId?: unknown;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
output: {
|
|
15
|
+
[x: number]: string & z.core.$brand<"Int256">;
|
|
16
|
+
total: string & z.core.$brand<"Int256">;
|
|
17
|
+
} | {
|
|
18
|
+
total: string & z.core.$brand<"Int256">;
|
|
19
|
+
1: string & z.core.$brand<"Int256">;
|
|
20
|
+
11155111: string & z.core.$brand<"Int256">;
|
|
21
|
+
31337: string & z.core.$brand<"Int256">;
|
|
22
|
+
72080: string & z.core.$brand<"Int256">;
|
|
23
|
+
};
|
|
24
|
+
outputFormat: "json";
|
|
25
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}, "/">>;
|
|
29
|
+
/**
|
|
30
|
+
* Get the number of successful (finalized) fraction sales
|
|
31
|
+
*/
|
|
32
|
+
export declare const GetSalesStatisticsV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<AppContext, {
|
|
33
|
+
"/": {
|
|
34
|
+
$post: {
|
|
35
|
+
input: {
|
|
36
|
+
json: {
|
|
37
|
+
chainId?: unknown;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
output: {
|
|
41
|
+
[x: number]: string & z.core.$brand<"Int256">;
|
|
42
|
+
total: string & z.core.$brand<"Int256">;
|
|
43
|
+
} | {
|
|
44
|
+
total: string & z.core.$brand<"Int256">;
|
|
45
|
+
1: string & z.core.$brand<"Int256">;
|
|
46
|
+
11155111: string & z.core.$brand<"Int256">;
|
|
47
|
+
31337: string & z.core.$brand<"Int256">;
|
|
48
|
+
72080: string & z.core.$brand<"Int256">;
|
|
49
|
+
};
|
|
50
|
+
outputFormat: "json";
|
|
51
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}, "/">>;
|
|
55
|
+
/**
|
|
56
|
+
* Get the Total Tokenized Value (TTV) - sum of all amounts raised by successful sales in USDC
|
|
57
|
+
*/
|
|
58
|
+
export declare const GetTtvV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<AppContext, {
|
|
59
|
+
"/": {
|
|
60
|
+
$post: {
|
|
61
|
+
input: {
|
|
62
|
+
json: {
|
|
63
|
+
chainId?: unknown;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
output: {
|
|
67
|
+
[x: number]: string & z.core.$brand<"Int256">;
|
|
68
|
+
total: string & z.core.$brand<"Int256">;
|
|
69
|
+
} | {
|
|
70
|
+
total: string & z.core.$brand<"Int256">;
|
|
71
|
+
1: string & z.core.$brand<"Int256">;
|
|
72
|
+
11155111: string & z.core.$brand<"Int256">;
|
|
73
|
+
31337: string & z.core.$brand<"Int256">;
|
|
74
|
+
72080: string & z.core.$brand<"Int256">;
|
|
75
|
+
};
|
|
76
|
+
outputFormat: "json";
|
|
77
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}, "/">>;
|
|
81
|
+
export declare const GetNetworkStatisticsV0: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<AppContext, {
|
|
82
|
+
"/": {
|
|
83
|
+
$post: {
|
|
84
|
+
input: {
|
|
85
|
+
json: {
|
|
86
|
+
chainId?: unknown;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
output: {
|
|
90
|
+
total: {
|
|
91
|
+
holders: string & z.core.$brand<"Int256">;
|
|
92
|
+
sales: string & z.core.$brand<"Int256">;
|
|
93
|
+
ttv: string & z.core.$brand<"Int256">;
|
|
94
|
+
};
|
|
95
|
+
1: {
|
|
96
|
+
holders: string & z.core.$brand<"Int256">;
|
|
97
|
+
sales: string & z.core.$brand<"Int256">;
|
|
98
|
+
ttv: string & z.core.$brand<"Int256">;
|
|
99
|
+
};
|
|
100
|
+
11155111: {
|
|
101
|
+
holders: string & z.core.$brand<"Int256">;
|
|
102
|
+
sales: string & z.core.$brand<"Int256">;
|
|
103
|
+
ttv: string & z.core.$brand<"Int256">;
|
|
104
|
+
};
|
|
105
|
+
31337: {
|
|
106
|
+
holders: string & z.core.$brand<"Int256">;
|
|
107
|
+
sales: string & z.core.$brand<"Int256">;
|
|
108
|
+
ttv: string & z.core.$brand<"Int256">;
|
|
109
|
+
};
|
|
110
|
+
72080: {
|
|
111
|
+
holders: string & z.core.$brand<"Int256">;
|
|
112
|
+
sales: string & z.core.$brand<"Int256">;
|
|
113
|
+
ttv: string & z.core.$brand<"Int256">;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
outputFormat: "json";
|
|
117
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}, "/">>;
|
|
121
|
+
//# sourceMappingURL=networkStatistics.route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkStatistics.route.d.ts","sourceRoot":"","sources":["../../../src/fractions/statistics/networkStatistics.route.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAuIrD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;QA8BvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;QA8B/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;QA8BnB,CAAC;AA2BH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkCjC,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { and, count, countDistinct, eq, sum } from "@ponder/client";
|
|
2
|
+
import { describeRoute } from "hono-openapi";
|
|
3
|
+
import { resolver, validator } from "hono-openapi";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { FractionsChains } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
6
|
+
import { Int256Json, toInt256Json } from "@evergonlabs/tmi-utils/models";
|
|
7
|
+
import { createController } from "../../common/controller.js";
|
|
8
|
+
import { FractionsChainId } from "../../common/index.js";
|
|
9
|
+
import { indexerSchemas } from "../../common/indexer/schemas.js";
|
|
10
|
+
const FractionsStatsRequestSchema = z.object({
|
|
11
|
+
chainId: FractionsChainId.optional().openapi({
|
|
12
|
+
description: `Optional chain ID to filter statistics by specific chain. If provided, returns only that chain's data. If not provided, returns total and all per-chain breakdowns.`,
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
const FractionStatsByChain = z.intersection(z.object({ total: Int256Json }), z.partialRecord(FractionsChainId, Int256Json));
|
|
16
|
+
const FractionChainStats = z.object({
|
|
17
|
+
holders: Int256Json.openapi({
|
|
18
|
+
description: "Number of unique fraction holders",
|
|
19
|
+
}),
|
|
20
|
+
sales: Int256Json.openapi({
|
|
21
|
+
description: "Number of successful (finalized) fraction sales",
|
|
22
|
+
}),
|
|
23
|
+
ttv: Int256Json.openapi({
|
|
24
|
+
description: "Total Tokenized Value as string representation of bigdecimal in USDC (raw units)",
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Combined network statistics response schema
|
|
29
|
+
* Keys can be 'total' or chain IDs (as strings), values are statistics objects
|
|
30
|
+
*/
|
|
31
|
+
const FractionsStatsAllSchema = z
|
|
32
|
+
.intersection(z.object({ total: FractionChainStats }), z.record(FractionsChainId, FractionChainStats))
|
|
33
|
+
.openapi("NetworkStatistics", {
|
|
34
|
+
description: `Contains 'total' (when chainId not specified) aggregated statistics and per-chain breakdowns (chain IDs as string keys). When chainId is specified, only that chain's data is returned.`,
|
|
35
|
+
});
|
|
36
|
+
async function fetchPerChainStatistics(c, chainIdFilter) {
|
|
37
|
+
const { fractionsPurchases, fractionsSales } = indexerSchemas.fractions;
|
|
38
|
+
const chainFilter = chainIdFilter ? eq(fractionsSales.chainId, chainIdFilter) : undefined;
|
|
39
|
+
const purchaseChainFilter = chainIdFilter ? eq(fractionsPurchases.chainId, chainIdFilter) : undefined;
|
|
40
|
+
const indexerClient = c.get("indexerClient");
|
|
41
|
+
const [holders, sales, ttv] = await Promise.all([
|
|
42
|
+
// Unique holders from finalized sales, grouped by chain
|
|
43
|
+
indexerClient.db
|
|
44
|
+
.select({
|
|
45
|
+
chainId: fractionsPurchases.chainId,
|
|
46
|
+
holders: countDistinct(fractionsPurchases.buyerAddress),
|
|
47
|
+
})
|
|
48
|
+
.from(fractionsPurchases)
|
|
49
|
+
.innerJoin(fractionsSales, and(eq(fractionsPurchases.chainId, fractionsSales.chainId), eq(fractionsPurchases.diamondAddress, fractionsSales.diamondAddress), eq(fractionsPurchases.saleId, fractionsSales.saleId)))
|
|
50
|
+
.where(chainFilter)
|
|
51
|
+
.groupBy(fractionsPurchases.chainId),
|
|
52
|
+
// Count of finalized sales, grouped by chain
|
|
53
|
+
indexerClient.db
|
|
54
|
+
.select({
|
|
55
|
+
chainId: fractionsSales.chainId,
|
|
56
|
+
sales: count(fractionsSales.saleId),
|
|
57
|
+
})
|
|
58
|
+
.from(fractionsSales)
|
|
59
|
+
.where(chainFilter)
|
|
60
|
+
.groupBy(fractionsSales.chainId),
|
|
61
|
+
// Sum of amountPaid from purchases of finalized sales, grouped by chain
|
|
62
|
+
indexerClient.db
|
|
63
|
+
.select({
|
|
64
|
+
chainId: fractionsPurchases.chainId,
|
|
65
|
+
ttv: sum(fractionsPurchases.usdValue),
|
|
66
|
+
})
|
|
67
|
+
.from(fractionsPurchases)
|
|
68
|
+
.innerJoin(fractionsSales, and(eq(fractionsPurchases.chainId, fractionsSales.chainId), eq(fractionsPurchases.diamondAddress, fractionsSales.diamondAddress), eq(fractionsPurchases.saleId, fractionsSales.saleId)))
|
|
69
|
+
.where(purchaseChainFilter)
|
|
70
|
+
.groupBy(fractionsPurchases.chainId),
|
|
71
|
+
]);
|
|
72
|
+
const val = FractionsChains.chainIds.reduce((prev, curr) => {
|
|
73
|
+
const holdersByChain = holders.find((x) => x.chainId === curr);
|
|
74
|
+
const salesByChain = sales.find((x) => x.chainId === curr);
|
|
75
|
+
const ttvByChain = ttv.find((x) => x.chainId === curr);
|
|
76
|
+
return {
|
|
77
|
+
...prev,
|
|
78
|
+
[curr]: {
|
|
79
|
+
holders: toInt256Json(holdersByChain ? holdersByChain.holders : 0),
|
|
80
|
+
sales: toInt256Json(salesByChain ? salesByChain.sales : 0),
|
|
81
|
+
ttv: toInt256Json(ttvByChain?.ttv ? ttvByChain.ttv : 0),
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}, {});
|
|
85
|
+
return {
|
|
86
|
+
...val,
|
|
87
|
+
total: FractionsChains.chainIds.reduce((prev, curr) => ({
|
|
88
|
+
holders: toInt256Json(BigInt(prev.holders) + BigInt(val[curr].holders)),
|
|
89
|
+
sales: toInt256Json(BigInt(prev.sales) + BigInt(val[curr].sales)),
|
|
90
|
+
ttv: toInt256Json(BigInt(prev.ttv) + BigInt(val[curr].ttv)),
|
|
91
|
+
}), {
|
|
92
|
+
holders: toInt256Json(0),
|
|
93
|
+
sales: toInt256Json(0),
|
|
94
|
+
ttv: toInt256Json(0),
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the number of unique fraction holders from successful (finalized) sales
|
|
100
|
+
*/
|
|
101
|
+
export const GetHoldersV0 = createController({
|
|
102
|
+
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
103
|
+
summary: "Get number of fraction holders",
|
|
104
|
+
description: `Returns the count of unique wallet addresses that hold fractions from successful (finalized) sales. If chainId is provided, returns only that chain's data. Otherwise, returns total and all per-chain breakdowns. Used for RWA aggregator integrations.`,
|
|
105
|
+
tags: ["RWA Statistics"],
|
|
106
|
+
responses: {
|
|
107
|
+
200: {
|
|
108
|
+
description: "Number of unique fraction holders",
|
|
109
|
+
content: {
|
|
110
|
+
"application/json": {
|
|
111
|
+
schema: resolver(FractionStatsByChain.openapi("FractionHoldersCount", {
|
|
112
|
+
description: `Contains 'total' (when chainId not specified) and per-chain holder counts (chain IDs as string keys). When chainId is specified, only that chain's data is returned.`,
|
|
113
|
+
})),
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
}), validator("json", FractionsStatsRequestSchema), async (c) => {
|
|
119
|
+
const { chainId } = c.req.valid("json");
|
|
120
|
+
const stats = await fetchPerChainStatistics(c, chainId);
|
|
121
|
+
return c.json(getSingleStats(stats, "holders", chainId));
|
|
122
|
+
}),
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* Get the number of successful (finalized) fraction sales
|
|
126
|
+
*/
|
|
127
|
+
export const GetSalesStatisticsV0 = createController({
|
|
128
|
+
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
129
|
+
summary: "Get number of successful sales",
|
|
130
|
+
description: `Returns the count of successful (finalized) fraction sales representing RWA tokens. If chainId is provided, returns only that chain's data. Otherwise, returns total and all per-chain breakdowns. Used for RWA aggregator integrations.`,
|
|
131
|
+
tags: ["RWA Statistics"],
|
|
132
|
+
responses: {
|
|
133
|
+
200: {
|
|
134
|
+
description: "Number of successful fraction sales",
|
|
135
|
+
content: {
|
|
136
|
+
"application/json": {
|
|
137
|
+
schema: resolver(FractionStatsByChain.openapi("SuccessfulSalesCount", {
|
|
138
|
+
description: `Contains 'total' (when chainId not specified) and per-chain sales counts (chain IDs as string keys). When chainId is specified, only that chain's data is returned.`,
|
|
139
|
+
})),
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
}), validator("json", FractionsStatsRequestSchema), async (c) => {
|
|
145
|
+
const { chainId } = c.req.valid("json");
|
|
146
|
+
const stats = await fetchPerChainStatistics(c, chainId);
|
|
147
|
+
return c.json(getSingleStats(stats, "sales", chainId));
|
|
148
|
+
}),
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* Get the Total Tokenized Value (TTV) - sum of all amounts raised by successful sales in USDC
|
|
152
|
+
*/
|
|
153
|
+
export const GetTtvV0 = createController({
|
|
154
|
+
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
155
|
+
summary: "Get Total Tokenized Value (TTV)",
|
|
156
|
+
description: `Returns the Total Tokenized Value - the sum of all amounts raised by successful (finalized) sales in USDC. If chainId is provided, returns only that chain's data. Otherwise, returns total and all per-chain breakdowns. Used for RWA aggregator integrations.`,
|
|
157
|
+
tags: ["RWA Statistics"],
|
|
158
|
+
responses: {
|
|
159
|
+
200: {
|
|
160
|
+
description: "Total Tokenized Value in USDC",
|
|
161
|
+
content: {
|
|
162
|
+
"application/json": {
|
|
163
|
+
schema: resolver(FractionStatsByChain.openapi("TotalTokenizedValue", {
|
|
164
|
+
description: `Contains 'total' (when chainId not specified) and per-chain TTV values as string representations of bigdecimal (chain IDs as string keys). When chainId is specified, only that chain's data is returned.`,
|
|
165
|
+
})),
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
}), validator("json", FractionsStatsRequestSchema), async (c) => {
|
|
171
|
+
const { chainId } = c.req.valid("json");
|
|
172
|
+
const stats = await fetchPerChainStatistics(c, chainId);
|
|
173
|
+
return c.json(getSingleStats(stats, "ttv", chainId));
|
|
174
|
+
}),
|
|
175
|
+
});
|
|
176
|
+
function getSingleStats(stats, key, chainId) {
|
|
177
|
+
if (chainId) {
|
|
178
|
+
const statsByChain = stats[chainId];
|
|
179
|
+
return {
|
|
180
|
+
[chainId]: statsByChain[key],
|
|
181
|
+
total: stats.total[key],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
return {
|
|
186
|
+
...FractionsChains.chainIds.reduce((prev, curr) => ({
|
|
187
|
+
...prev,
|
|
188
|
+
[curr]: stats[curr][key],
|
|
189
|
+
}), {}),
|
|
190
|
+
total: stats.total[key],
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
export const GetNetworkStatisticsV0 = createController({
|
|
195
|
+
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
196
|
+
summary: "Get all network statistics",
|
|
197
|
+
description: `Returns all network statistics in a single call: number of fraction holders, successful sales count, and TTV. If chainId is provided, returns only that chain's data. Otherwise, returns total and all per-chain breakdowns. Used for RWA aggregator integrations like RWA.XYZ.`,
|
|
198
|
+
tags: ["RWA Statistics"],
|
|
199
|
+
responses: {
|
|
200
|
+
200: {
|
|
201
|
+
description: "Network statistics including holders, sales, and TTV",
|
|
202
|
+
content: {
|
|
203
|
+
"application/json": {
|
|
204
|
+
schema: resolver(FractionsStatsAllSchema),
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
}), validator("json", FractionsStatsRequestSchema), async (c) => {
|
|
210
|
+
const { chainId } = c.req.valid("json");
|
|
211
|
+
const stats = await fetchPerChainStatistics(c, chainId);
|
|
212
|
+
if (chainId) {
|
|
213
|
+
return c.json({
|
|
214
|
+
total: stats.total,
|
|
215
|
+
[chainId]: stats[chainId],
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
return c.json(stats);
|
|
220
|
+
}
|
|
221
|
+
}),
|
|
222
|
+
});
|