@evergonlabs/tmi-protocol-api 0.11.0-rc.3 → 0.11.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/dist/app.d.ts +473 -232
- package/dist/app.d.ts.map +1 -1
- package/dist/apps.d.ts +1 -1
- package/dist/apps.js +1 -1
- package/dist/client.d.ts +1260 -1103
- package/dist/client.d.ts.map +1 -1
- package/dist/fractions/index.d.ts +84 -100
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/markets/deployMarket.d.ts +1 -1
- package/dist/fractions/markets/deployMarket.d.ts.map +1 -1
- package/dist/fractions/markets/deployMarket.js +5 -5
- package/dist/fractions/markets/getDeployEvent.d.ts +6 -0
- package/dist/fractions/markets/getDeployEvent.d.ts.map +1 -1
- package/dist/fractions/markets/getDeployEvent.js +8 -5
- package/dist/fractions/markets/getMarket.d.ts +5 -0
- package/dist/fractions/markets/getMarket.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket.js +7 -14
- package/dist/fractions/markets/index.d.ts +7 -11
- package/dist/fractions/markets/index.d.ts.map +1 -1
- package/dist/fractions/markets/initCompilot.d.ts +4 -0
- package/dist/fractions/markets/initCompilot.d.ts.map +1 -1
- package/dist/fractions/markets/initCompilot.js +6 -4
- package/dist/fractions/markets/searchMarkets.d.ts +42 -11
- package/dist/fractions/markets/searchMarkets.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets.js +16 -11
- package/dist/fractions/roles/grantRole.d.ts +1 -1
- package/dist/fractions/roles/grantRole.js +1 -1
- package/dist/fractions/sales/{approveSale.route.d.ts → approveSale.d.ts} +2 -2
- package/dist/fractions/sales/approveSale.d.ts.map +1 -0
- package/dist/fractions/sales/{approveSale.route.js → approveSale.js} +1 -1
- package/dist/fractions/sales/{approveWrapper.route.d.ts → approveWrapper.d.ts} +2 -2
- package/dist/fractions/sales/approveWrapper.d.ts.map +1 -0
- package/dist/fractions/sales/{approveWrapper.route.js → approveWrapper.js} +1 -1
- package/dist/fractions/sales/{completeSale.route.d.ts → completeSale.d.ts} +2 -2
- package/dist/fractions/sales/completeSale.d.ts.map +1 -0
- package/dist/fractions/sales/{completeSale.route.js → completeSale.js} +1 -1
- package/dist/fractions/sales/{createFractions.route.d.ts → createFractions.d.ts} +2 -2
- package/dist/fractions/sales/createFractions.d.ts.map +1 -0
- package/dist/fractions/sales/{createFractions.route.js → createFractions.js} +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.d.ts +47 -0
- package/dist/fractions/sales/getFractionSaleStatistics.d.ts.map +1 -0
- package/dist/fractions/sales/{getFractionSaleStatistics.route.js → getFractionSaleStatistics.js} +32 -18
- package/dist/fractions/sales/getVaultAddress.d.ts +10 -1
- package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
- package/dist/fractions/sales/getVaultAddress.js +11 -7
- package/dist/fractions/sales/getWithdrawEvent.d.ts +4 -3
- package/dist/fractions/sales/getWithdrawEvent.d.ts.map +1 -1
- package/dist/fractions/sales/getWithdrawEvent.js +8 -13
- package/dist/fractions/sales/index.d.ts +50 -62
- package/dist/fractions/sales/index.d.ts.map +1 -1
- package/dist/fractions/sales/index.js +16 -16
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts +13 -4
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts.map +1 -1
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +20 -22
- package/dist/fractions/sales/{purchase.route.d.ts → purchase.d.ts} +2 -2
- package/dist/fractions/sales/purchase.d.ts.map +1 -0
- package/dist/fractions/sales/{purchase.route.js → purchase.js} +1 -1
- package/dist/fractions/sales/{purchaseStatistics.route.d.ts → purchaseStatistics.d.ts} +8 -7
- package/dist/fractions/sales/purchaseStatistics.d.ts.map +1 -0
- package/dist/fractions/sales/{purchaseStatistics.route.js → purchaseStatistics.js} +12 -10
- package/dist/fractions/sales/{receiveFundsAfterNonFunded.route.d.ts → receiveFundsAfterNonFunded.d.ts} +4 -4
- package/dist/fractions/sales/receiveFundsAfterNonFunded.d.ts.map +1 -0
- package/dist/fractions/sales/{receiveFundsAfterNonFunded.route.js → receiveFundsAfterNonFunded.js} +1 -1
- package/dist/fractions/sales/{receiveNonPurchasedWrappedAssets.route.d.ts → receiveNonPurchasedWrappedAssets.d.ts} +1 -1
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.d.ts.map +1 -0
- package/dist/fractions/sales/recoverFractions.d.ts +1 -1
- package/dist/fractions/sales/recoverFractions.js +1 -1
- package/dist/fractions/sales/rejectFractions.d.ts +1 -1
- package/dist/fractions/sales/rejectFractions.js +1 -1
- package/dist/fractions/sales/searchActivity.d.ts +121 -0
- package/dist/fractions/sales/searchActivity.d.ts.map +1 -0
- package/dist/fractions/sales/{searchActivity.route.js → searchActivity.js} +23 -15
- package/dist/fractions/sales/searchSales/searchSales.d.ts +89 -12
- package/dist/fractions/sales/searchSales/searchSales.d.ts.map +1 -1
- package/dist/fractions/sales/searchSales/searchSales.js +17 -12
- package/dist/fractions/sales/searchWithdrawal.d.ts +132 -0
- package/dist/fractions/sales/searchWithdrawal.d.ts.map +1 -0
- package/dist/fractions/sales/{searchWithdrawal.route.js → searchWithdrawal.js} +16 -11
- package/dist/fractions/sales/setFeeCapLimit.d.ts +1 -1
- package/dist/fractions/sales/setFeeCapLimit.js +1 -1
- package/dist/fractions/sales/{unlockWrappedAssets.route.d.ts → unlockWrappedAssets.d.ts} +2 -2
- package/dist/fractions/sales/unlockWrappedAssets.d.ts.map +1 -0
- package/dist/fractions/sales/{unlockWrappedAssets.route.js → unlockWrappedAssets.js} +1 -1
- package/dist/fractions/sales/vesting/{claimStatistics.route.d.ts → claimStatistics.d.ts} +5 -5
- package/dist/fractions/sales/vesting/claimStatistics.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/{claimStatistics.route.js → claimStatistics.js} +6 -6
- package/dist/fractions/sales/vesting/{claimVestedTokens.route.d.ts → claimVestedTokens.d.ts} +1 -1
- package/dist/fractions/sales/vesting/claimVestedTokens.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/{editCliff.route.d.ts → editCliff.d.ts} +1 -1
- package/dist/fractions/sales/vesting/editCliff.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/{editCliff.route.js → editCliff.js} +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts +6 -5
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.js +11 -16
- package/dist/fractions/sales/{withdraw.route.d.ts → withdraw.d.ts} +2 -2
- package/dist/fractions/sales/withdraw.d.ts.map +1 -0
- package/dist/fractions/sales/{withdraw.route.js → withdraw.js} +1 -1
- package/dist/fractions/schemas.d.ts +16 -5
- package/dist/fractions/schemas.d.ts.map +1 -1
- package/dist/fractions/schemas.js +20 -6
- package/dist/fractions/sig/getAuthData.d.ts +5 -9
- package/dist/fractions/sig/getAuthData.d.ts.map +1 -1
- package/dist/fractions/sig/getAuthData.js +7 -11
- package/dist/fractions/sig/{getNonce.route.d.ts → getNonce.d.ts} +6 -3
- package/dist/fractions/sig/getNonce.d.ts.map +1 -0
- package/dist/fractions/sig/{getNonce.route.js → getNonce.js} +10 -6
- package/dist/fractions/sig/index.d.ts +1 -1
- package/dist/fractions/sig/index.js +1 -1
- package/dist/fractions/statistics/index.d.ts +26 -26
- package/dist/fractions/statistics/index.js +1 -1
- package/dist/fractions/statistics/{networkStatistics.route.d.ts → networkStatistics.d.ts} +27 -27
- package/dist/fractions/statistics/networkStatistics.d.ts.map +1 -0
- package/dist/fractions/statistics/{networkStatistics.route.js → networkStatistics.js} +13 -13
- package/dist/general/common.d.ts +1 -1
- package/dist/general/common.d.ts.map +1 -1
- package/dist/general/common.js +2 -2
- package/dist/general/estimateGas.d.ts +14 -9
- package/dist/general/estimateGas.d.ts.map +1 -1
- package/dist/general/estimateGas.js +26 -27
- package/dist/general/getBalance.d.ts +10 -1
- package/dist/general/getBalance.d.ts.map +1 -1
- package/dist/general/getBalance.js +33 -24
- package/dist/general/getBalancesBatch.d.ts +18 -2
- package/dist/general/getBalancesBatch.d.ts.map +1 -1
- package/dist/general/getBalancesBatch.js +28 -21
- package/dist/general/index.d.ts +9 -10
- package/dist/general/index.d.ts.map +1 -1
- package/dist/general/searchBalances.d.ts +18 -3
- package/dist/general/searchBalances.d.ts.map +1 -1
- package/dist/general/searchBalances.js +24 -4
- package/dist/issuance/erc1155/burn.d.ts +1 -1
- package/dist/issuance/erc1155/burn.d.ts.map +1 -1
- package/dist/issuance/erc1155/burn.js +5 -3
- package/dist/issuance/erc1155/default/deploy.d.ts +1 -1
- package/dist/issuance/erc1155/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/deploy.js +5 -3
- package/dist/issuance/erc1155/default/initialize.d.ts +1 -1
- package/dist/issuance/erc1155/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/initialize.js +5 -3
- package/dist/issuance/erc1155/default/parseDeployEvent.d.ts +11 -0
- package/dist/issuance/erc1155/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/parseDeployEvent.js +14 -9
- package/dist/issuance/erc1155/gated/deploy.d.ts +1 -1
- package/dist/issuance/erc1155/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/deploy.js +5 -5
- package/dist/issuance/erc1155/gated/initialize.d.ts +1 -1
- package/dist/issuance/erc1155/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/initialize.js +5 -5
- package/dist/issuance/erc1155/gated/parseDeployEvent.d.ts +11 -0
- package/dist/issuance/erc1155/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc1155/gated/parseDeployEvent.js +14 -9
- package/dist/issuance/erc1155/getMintedTokenId.d.ts +9 -1
- package/dist/issuance/erc1155/getMintedTokenId.d.ts.map +1 -1
- package/dist/issuance/erc1155/getMintedTokenId.js +16 -8
- package/dist/issuance/erc1155/grantRole.d.ts +1 -1
- package/dist/issuance/erc1155/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/grantRole.js +6 -4
- package/dist/issuance/erc1155/index.d.ts +1 -1
- package/dist/issuance/erc1155/mint.d.ts +1 -1
- package/dist/issuance/erc1155/mint.d.ts.map +1 -1
- package/dist/issuance/erc1155/mint.js +5 -3
- package/dist/issuance/erc1155/recover.d.ts +1 -1
- package/dist/issuance/erc1155/recover.d.ts.map +1 -1
- package/dist/issuance/erc1155/recover.js +5 -3
- package/dist/issuance/erc1155/renounceRole.d.ts +1 -1
- package/dist/issuance/erc1155/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/renounceRole.js +6 -4
- package/dist/issuance/erc1155/revokeRole.d.ts +1 -1
- package/dist/issuance/erc1155/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc1155/revokeRole.js +6 -4
- package/dist/issuance/erc1155/setApprovalForAll.d.ts +1 -1
- package/dist/issuance/erc1155/setApprovalForAll.d.ts.map +1 -1
- package/dist/issuance/erc1155/setApprovalForAll.js +5 -3
- package/dist/issuance/erc1155/setBaseURI.d.ts +1 -1
- package/dist/issuance/erc1155/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc1155/setBaseURI.js +5 -3
- package/dist/issuance/erc1155/setTokenURI.d.ts +1 -1
- package/dist/issuance/erc1155/setTokenURI.d.ts.map +1 -1
- package/dist/issuance/erc1155/setTokenURI.js +5 -3
- package/dist/issuance/erc20/approve.d.ts +1 -1
- package/dist/issuance/erc20/approve.d.ts.map +1 -1
- package/dist/issuance/erc20/approve.js +5 -3
- package/dist/issuance/erc20/burn.d.ts +1 -1
- package/dist/issuance/erc20/burn.d.ts.map +1 -1
- package/dist/issuance/erc20/burn.js +5 -3
- package/dist/issuance/erc20/default/deploy.d.ts +1 -1
- package/dist/issuance/erc20/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/default/deploy.js +5 -3
- package/dist/issuance/erc20/default/initialize.d.ts +1 -1
- package/dist/issuance/erc20/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc20/default/initialize.js +5 -5
- package/dist/issuance/erc20/default/parseDeployEvent.d.ts +14 -1
- package/dist/issuance/erc20/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/default/parseDeployEvent.js +22 -22
- package/dist/issuance/erc20/gated/deploy.d.ts +1 -1
- package/dist/issuance/erc20/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/deploy.js +5 -5
- package/dist/issuance/erc20/gated/initialize.d.ts +1 -1
- package/dist/issuance/erc20/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/initialize.js +5 -3
- package/dist/issuance/erc20/gated/parseDeployEvent.d.ts +14 -1
- package/dist/issuance/erc20/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/gated/parseDeployEvent.js +28 -24
- package/dist/issuance/erc20/gatedSimple/deploy.d.ts +285 -3
- package/dist/issuance/erc20/gatedSimple/deploy.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/getInitData.d.ts +3 -3
- package/dist/issuance/erc20/gatedSimple/getInitData.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/getInitData.js +15 -9
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.d.ts +8 -0
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.js +11 -6
- package/dist/issuance/erc20/grantRole.d.ts +1 -1
- package/dist/issuance/erc20/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc20/grantRole.js +6 -4
- package/dist/issuance/erc20/index.d.ts +289 -7
- package/dist/issuance/erc20/index.d.ts.map +1 -1
- package/dist/issuance/erc20/mint.d.ts +1 -1
- package/dist/issuance/erc20/mint.d.ts.map +1 -1
- package/dist/issuance/erc20/mint.js +5 -3
- package/dist/issuance/erc20/recover.d.ts +1 -1
- package/dist/issuance/erc20/recover.d.ts.map +1 -1
- package/dist/issuance/erc20/recover.js +5 -3
- package/dist/issuance/erc20/renounceRole.d.ts +1 -1
- package/dist/issuance/erc20/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc20/renounceRole.js +6 -4
- package/dist/issuance/erc20/revokeRole.d.ts +1 -1
- package/dist/issuance/erc20/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc20/revokeRole.js +6 -4
- package/dist/issuance/erc20/transfer.d.ts +1 -1
- package/dist/issuance/erc20/transfer.d.ts.map +1 -1
- package/dist/issuance/erc20/transfer.js +5 -3
- package/dist/issuance/erc20/transferFrom.d.ts +1 -1
- package/dist/issuance/erc20/transferFrom.d.ts.map +1 -1
- package/dist/issuance/erc20/transferFrom.js +5 -3
- package/dist/issuance/erc721/approve.d.ts +1 -1
- package/dist/issuance/erc721/approve.d.ts.map +1 -1
- package/dist/issuance/erc721/approve.js +5 -3
- package/dist/issuance/erc721/burn.d.ts +1 -1
- package/dist/issuance/erc721/burn.d.ts.map +1 -1
- package/dist/issuance/erc721/burn.js +5 -3
- package/dist/issuance/erc721/default/deploy.d.ts +1 -1
- package/dist/issuance/erc721/default/deploy.d.ts.map +1 -1
- package/dist/issuance/erc721/default/deploy.js +5 -3
- package/dist/issuance/erc721/default/initialize.d.ts +1 -1
- package/dist/issuance/erc721/default/initialize.d.ts.map +1 -1
- package/dist/issuance/erc721/default/initialize.js +5 -3
- package/dist/issuance/erc721/default/parseDeployEvent.d.ts +13 -0
- package/dist/issuance/erc721/default/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc721/default/parseDeployEvent.js +16 -11
- package/dist/issuance/erc721/gated/deploy.d.ts +1 -1
- package/dist/issuance/erc721/gated/deploy.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/deploy.js +5 -5
- package/dist/issuance/erc721/gated/initialize.d.ts +1 -1
- package/dist/issuance/erc721/gated/initialize.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/initialize.js +5 -3
- package/dist/issuance/erc721/gated/parseDeployEvent.d.ts +13 -0
- package/dist/issuance/erc721/gated/parseDeployEvent.d.ts.map +1 -1
- package/dist/issuance/erc721/gated/parseDeployEvent.js +16 -11
- package/dist/issuance/erc721/getMintedTokenId.d.ts +8 -0
- package/dist/issuance/erc721/getMintedTokenId.d.ts.map +1 -1
- package/dist/issuance/erc721/getMintedTokenId.js +11 -6
- package/dist/issuance/erc721/grantRole.d.ts +1 -1
- package/dist/issuance/erc721/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc721/grantRole.js +6 -4
- package/dist/issuance/erc721/mint.d.ts +1 -1
- package/dist/issuance/erc721/mint.d.ts.map +1 -1
- package/dist/issuance/erc721/mint.js +5 -3
- package/dist/issuance/erc721/recover.d.ts +1 -1
- package/dist/issuance/erc721/recover.d.ts.map +1 -1
- package/dist/issuance/erc721/recover.js +5 -3
- package/dist/issuance/erc721/renounceRole.d.ts +1 -1
- package/dist/issuance/erc721/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc721/renounceRole.js +6 -4
- package/dist/issuance/erc721/revokeRole.d.ts +1 -1
- package/dist/issuance/erc721/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc721/revokeRole.js +6 -4
- package/dist/issuance/erc721/setBaseURI.d.ts +1 -1
- package/dist/issuance/erc721/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc721/setBaseURI.js +5 -3
- package/dist/issuance/erc721/setTokenURI.d.ts +1 -1
- package/dist/issuance/erc721/setTokenURI.d.ts.map +1 -1
- package/dist/issuance/erc721/setTokenURI.js +5 -3
- package/dist/issuance/erc721/transferFrom.d.ts +1 -1
- package/dist/issuance/erc721/transferFrom.d.ts.map +1 -1
- package/dist/issuance/erc721/transferFrom.js +5 -3
- package/dist/issuance/index.d.ts +292 -10
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/issuance/proxy/deploy.d.ts +3 -3
- package/dist/issuance/proxy/deploy.d.ts.map +1 -1
- package/dist/issuance/proxy/deploy.js +5 -3
- package/dist/issuance/proxy/index.d.ts +2 -2
- package/dist/issuance/proxy/upgrade.d.ts +1 -1
- package/dist/issuance/proxy/upgrade.d.ts.map +1 -1
- package/dist/issuance/proxy/upgrade.js +5 -3
- package/dist/issuance/schemas.d.ts +52 -42
- package/dist/issuance/schemas.d.ts.map +1 -1
- package/dist/issuance/schemas.js +52 -42
- package/dist/next/app.d.ts +21 -25
- package/dist/next/app.d.ts.map +1 -1
- package/dist/next/client.d.ts +21 -25
- package/dist/next/client.d.ts.map +1 -1
- package/dist/next/lending/buyback.d.ts.map +1 -1
- package/dist/next/lending/buyback.js +1 -1
- package/dist/next/lending/createSale.d.ts.map +1 -1
- package/dist/next/lending/createSale.js +1 -1
- package/dist/next/lending/deployMarket.d.ts.map +1 -1
- package/dist/next/lending/deployMarket.js +1 -1
- package/dist/next/lending/forcefullyUnlockWrappersNft.d.ts +7 -0
- package/dist/next/lending/forcefullyUnlockWrappersNft.d.ts.map +1 -0
- package/dist/next/lending/forcefullyUnlockWrappersNft.js +39 -0
- package/dist/next/lending/index.js +1 -1
- package/dist/next/lending/schemas.d.ts +5 -1
- package/dist/next/lending/schemas.d.ts.map +1 -1
- package/dist/next/lending/schemas.js +5 -3
- package/dist/next/lending/setCollateralPrice.d.ts.map +1 -1
- package/dist/next/lending/setCollateralPrice.js +1 -1
- package/dist/next/nftFractions/createNftFractions.d.ts.map +1 -1
- package/dist/next/nftFractions/createNftFractions.js +4 -2
- package/dist/next/nftFractions/deployNftFractionsMarket.d.ts.map +1 -1
- package/dist/next/nftFractions/deployNftFractionsMarket.js +4 -2
- package/dist/next/nftFractions/deployNftFractionsMarketGated.d.ts.map +1 -1
- package/dist/next/nftFractions/deployNftFractionsMarketGated.js +4 -2
- package/dist/next/nftFractions/index.d.ts +5 -5
- package/dist/next/nftFractions/index.js +1 -1
- package/dist/next/nftFractions/parseNftFractionsCreatedEvent.d.ts +18 -5
- package/dist/next/nftFractions/parseNftFractionsCreatedEvent.d.ts.map +1 -1
- package/dist/next/nftFractions/parseNftFractionsCreatedEvent.js +32 -28
- package/dist/next/nftFractions/schemas.d.ts +4 -1
- package/dist/next/nftFractions/schemas.d.ts.map +1 -1
- package/dist/next/nftFractions/schemas.js +4 -1
- package/dist/next/vestingRedemptionDynamic/approveCampaign.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/approveCampaign.js +1 -1
- package/dist/next/vestingRedemptionDynamic/createCampaign.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/createCampaign.js +1 -1
- package/dist/next/vestingRedemptionDynamic/deployMarket.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/deployMarket.js +1 -1
- package/dist/next/vestingRedemptionDynamic/epochPurchase.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/epochPurchase.js +1 -1
- package/dist/next/vestingRedemptionDynamic/exchangeNftForFractions.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/exchangeNftForFractions.js +1 -1
- package/dist/next/vestingRedemptionDynamic/getCurrentEpoch.d.ts +14 -7
- package/dist/next/vestingRedemptionDynamic/getCurrentEpoch.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/getCurrentEpoch.js +18 -11
- package/dist/next/vestingRedemptionDynamic/getEpochPurchaseEvent.d.ts +6 -2
- package/dist/next/vestingRedemptionDynamic/getEpochPurchaseEvent.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/getEpochPurchaseEvent.js +5 -5
- package/dist/next/vestingRedemptionDynamic/getPurchasePriceForEpoch.d.ts +17 -9
- package/dist/next/vestingRedemptionDynamic/getPurchasePriceForEpoch.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/getPurchasePriceForEpoch.js +25 -16
- package/dist/next/vestingRedemptionDynamic/getWithdrawalRequestedEvent.d.ts +6 -2
- package/dist/next/vestingRedemptionDynamic/getWithdrawalRequestedEvent.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/getWithdrawalRequestedEvent.js +5 -5
- package/dist/next/vestingRedemptionDynamic/index.d.ts +16 -20
- package/dist/next/vestingRedemptionDynamic/index.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/requestWithdrawal.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/requestWithdrawal.js +1 -1
- package/dist/next/vestingRedemptionDynamic/schemas.d.ts +13 -1
- package/dist/next/vestingRedemptionDynamic/schemas.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/schemas.js +15 -1
- package/dist/next/vestingRedemptionDynamic/setEpochPrice.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/setEpochPrice.js +1 -1
- package/dist/next/vestingRedemptionDynamic/withdrawFunds.d.ts.map +1 -1
- package/dist/next/vestingRedemptionDynamic/withdrawFunds.js +1 -1
- package/dist/schemas.d.ts +50 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +62 -0
- package/dist/staking/index.d.ts +60 -84
- package/dist/staking/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform.d.ts +36 -0
- package/dist/staking/platforms/getPlatform.d.ts.map +1 -0
- package/dist/staking/platforms/{getPlatform/v0/getPlatform.js → getPlatform.js} +26 -22
- package/dist/staking/platforms/index.d.ts +10 -14
- package/dist/staking/platforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/index.js +3 -6
- package/dist/staking/platforms/searchPlatforms.d.ts +40 -0
- package/dist/staking/platforms/searchPlatforms.d.ts.map +1 -0
- package/dist/staking/platforms/searchPlatforms.js +50 -0
- package/dist/staking/pools/getPool.d.ts +40 -0
- package/dist/staking/pools/getPool.d.ts.map +1 -0
- package/dist/staking/pools/{getPool/v0/getPool.js → getPool.js} +32 -28
- package/dist/staking/pools/index.d.ts +9 -13
- package/dist/staking/pools/index.d.ts.map +1 -1
- package/dist/staking/pools/index.js +3 -6
- package/dist/staking/pools/searchPools.d.ts +42 -0
- package/dist/staking/pools/searchPools.d.ts.map +1 -0
- package/dist/staking/pools/searchPools.js +50 -0
- package/dist/staking/roles/getRoles.d.ts +28 -0
- package/dist/staking/roles/getRoles.d.ts.map +1 -0
- package/dist/staking/roles/{getRoles/v0/getRoles.js → getRoles.js} +6 -5
- package/dist/staking/roles/grantRole.d.ts +33 -0
- package/dist/staking/roles/grantRole.d.ts.map +1 -0
- package/dist/staking/roles/{grantRole/v0/grantRole.js → grantRole.js} +19 -16
- package/dist/staking/roles/index.d.ts +23 -31
- package/dist/staking/roles/index.d.ts.map +1 -1
- package/dist/staking/roles/index.js +8 -8
- package/dist/staking/roles/searchRoleEvents.d.ts +48 -0
- package/dist/staking/roles/searchRoleEvents.d.ts.map +1 -0
- package/dist/staking/roles/{searchRoleEvents/v0/searchRoleEvents.js → searchRoleEvents.js} +25 -20
- package/dist/staking/roles/searchRoles.d.ts +46 -0
- package/dist/staking/roles/searchRoles.d.ts.map +1 -0
- package/dist/staking/roles/{searchRoles/v0/searchRoles.js → searchRoles.js} +24 -19
- package/dist/staking/stakes/getStake.d.ts +50 -0
- package/dist/staking/stakes/getStake.d.ts.map +1 -0
- package/dist/staking/stakes/{getStake/v0/getStake.js → getStake.js} +32 -28
- package/dist/staking/stakes/index.d.ts +21 -29
- package/dist/staking/stakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/index.js +6 -6
- package/dist/staking/stakes/searchStakeEvents.d.ts +48 -0
- package/dist/staking/stakes/searchStakeEvents.d.ts.map +1 -0
- package/dist/staking/stakes/{searchStakeEvents/v0/searchStakeEvents.js → searchStakeEvents.js} +25 -20
- package/dist/staking/stakes/searchStakes.d.ts +56 -0
- package/dist/staking/stakes/searchStakes.d.ts.map +1 -0
- package/dist/staking/stakes/searchStakes.js +52 -0
- package/dist/stakingTemplates/index.d.ts +28 -28
- package/dist/stakingTemplates/index.d.ts.map +1 -1
- package/dist/stakingTemplates/index.js +6 -6
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts +8 -2
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.js +18 -16
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts +6 -1
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.js +8 -5
- package/dist/stakingTemplates/templates/common/getReward.d.ts +5 -0
- package/dist/stakingTemplates/templates/common/getReward.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getReward.js +7 -4
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts +15 -5
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getStakeEvent.js +21 -10
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts +6 -0
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/partialUnstake.js +10 -7
- package/dist/stakingTemplates/templates/common/unstake.d.ts +5 -0
- package/dist/stakingTemplates/templates/common/unstake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/unstake.js +7 -4
- package/dist/stakingTemplates/templates/reputation/{v0/createPlatform.d.ts → createPlatform.d.ts} +12 -1
- package/dist/stakingTemplates/templates/reputation/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/{v0/createPlatform.js → createPlatform.js} +22 -19
- package/dist/stakingTemplates/templates/reputation/createPool.d.ts +58 -0
- package/dist/stakingTemplates/templates/reputation/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/{v0/createPool.js → createPool.js} +23 -20
- package/dist/stakingTemplates/templates/reputation/index.d.ts +10 -10
- package/dist/stakingTemplates/templates/reputation/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/index.js +24 -3
- package/dist/stakingTemplates/templates/reputation/restake.d.ts +32 -0
- package/dist/stakingTemplates/templates/reputation/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/{v0/restake.js → restake.js} +14 -11
- package/dist/stakingTemplates/templates/{rwa/v0/restake.d.ts → reputation/stake.d.ts} +8 -2
- package/dist/stakingTemplates/templates/reputation/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputation/{v0/stake.js → stake.js} +15 -16
- package/dist/stakingTemplates/templates/reputationLock/createPlatform.d.ts +42 -0
- package/dist/stakingTemplates/templates/reputationLock/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/{v0/createPlatform.js → createPlatform.js} +22 -19
- package/dist/stakingTemplates/templates/reputationLock/createPool.d.ts +76 -0
- package/dist/stakingTemplates/templates/reputationLock/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/{v0/createPool.js → createPool.js} +28 -25
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts +10 -10
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/index.js +24 -3
- package/dist/stakingTemplates/templates/reputationLock/restake.d.ts +34 -0
- package/dist/stakingTemplates/templates/reputationLock/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/{v0/restake.js → restake.js} +17 -14
- package/dist/stakingTemplates/templates/reputationLock/stake.d.ts +34 -0
- package/dist/stakingTemplates/templates/reputationLock/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/reputationLock/{v0/stake.js → stake.js} +19 -16
- package/dist/stakingTemplates/templates/{reputationLock/v0 → rwa}/createPlatform.d.ts +12 -1
- package/dist/stakingTemplates/templates/rwa/createPlatform.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/{v0/createPlatform.js → createPlatform.js} +22 -19
- package/dist/stakingTemplates/templates/rwa/createPool.d.ts +56 -0
- package/dist/stakingTemplates/templates/rwa/createPool.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/{v0/createPool.js → createPool.js} +21 -18
- package/dist/stakingTemplates/templates/{reputation/v0/stake.d.ts → rwa/distributeRewards.d.ts} +8 -2
- package/dist/stakingTemplates/templates/rwa/distributeRewards.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/{v0/distributeRewards.js → distributeRewards.js} +15 -12
- package/dist/stakingTemplates/templates/rwa/index.d.ts +10 -10
- package/dist/stakingTemplates/templates/rwa/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/index.js +26 -3
- package/dist/stakingTemplates/templates/rwa/restake.d.ts +32 -0
- package/dist/stakingTemplates/templates/rwa/restake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/{v0/restake.js → restake.js} +14 -11
- package/dist/stakingTemplates/templates/rwa/stake.d.ts +32 -0
- package/dist/stakingTemplates/templates/rwa/stake.d.ts.map +1 -0
- package/dist/stakingTemplates/templates/rwa/{v0/stake.js → stake.js} +15 -16
- package/package.json +12 -12
- package/dist/fractions/sales/approveSale.route.d.ts.map +0 -1
- package/dist/fractions/sales/approveWrapper.route.d.ts.map +0 -1
- package/dist/fractions/sales/completeSale.route.d.ts.map +0 -1
- package/dist/fractions/sales/createFractions.route.d.ts.map +0 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +0 -37
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +0 -1
- package/dist/fractions/sales/purchase.route.d.ts.map +0 -1
- package/dist/fractions/sales/purchaseStatistics.route.d.ts.map +0 -1
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts.map +0 -1
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts.map +0 -1
- package/dist/fractions/sales/searchActivity.route.d.ts +0 -71
- package/dist/fractions/sales/searchActivity.route.d.ts.map +0 -1
- package/dist/fractions/sales/searchWithdrawal.route.d.ts +0 -56
- package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +0 -1
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts.map +0 -1
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts.map +0 -1
- package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts.map +0 -1
- package/dist/fractions/sales/vesting/editCliff.route.d.ts.map +0 -1
- package/dist/fractions/sales/withdraw.route.d.ts.map +0 -1
- package/dist/fractions/sig/getNonce.route.d.ts.map +0 -1
- package/dist/fractions/statistics/networkStatistics.route.d.ts.map +0 -1
- package/dist/staking/platforms/getPlatform/index.d.ts +0 -23
- package/dist/staking/platforms/getPlatform/index.d.ts.map +0 -1
- package/dist/staking/platforms/getPlatform/index.js +0 -5
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +0 -24
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +0 -1
- package/dist/staking/platforms/searchPlatforms/index.d.ts +0 -29
- package/dist/staking/platforms/searchPlatforms/index.d.ts.map +0 -1
- package/dist/staking/platforms/searchPlatforms/index.js +0 -5
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +0 -30
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +0 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +0 -45
- package/dist/staking/pools/getPool/index.d.ts +0 -25
- package/dist/staking/pools/getPool/index.d.ts.map +0 -1
- package/dist/staking/pools/getPool/index.js +0 -5
- package/dist/staking/pools/getPool/v0/getPool.d.ts +0 -26
- package/dist/staking/pools/getPool/v0/getPool.d.ts.map +0 -1
- package/dist/staking/pools/searchPools/index.d.ts +0 -30
- package/dist/staking/pools/searchPools/index.d.ts.map +0 -1
- package/dist/staking/pools/searchPools/index.js +0 -5
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +0 -31
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +0 -1
- package/dist/staking/pools/searchPools/v0/searchPools.js +0 -45
- package/dist/staking/roles/getRoles/index.d.ts +0 -23
- package/dist/staking/roles/getRoles/index.d.ts.map +0 -1
- package/dist/staking/roles/getRoles/index.js +0 -5
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts +0 -23
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts.map +0 -1
- package/dist/staking/roles/grantRole/index.d.ts +0 -26
- package/dist/staking/roles/grantRole/index.d.ts.map +0 -1
- package/dist/staking/roles/grantRole/index.js +0 -5
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts +0 -26
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts.map +0 -1
- package/dist/staking/roles/searchRoleEvents/index.d.ts +0 -33
- package/dist/staking/roles/searchRoleEvents/index.d.ts.map +0 -1
- package/dist/staking/roles/searchRoleEvents/index.js +0 -5
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +0 -34
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +0 -1
- package/dist/staking/roles/searchRoles/index.d.ts +0 -32
- package/dist/staking/roles/searchRoles/index.d.ts.map +0 -1
- package/dist/staking/roles/searchRoles/index.js +0 -5
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +0 -33
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +0 -1
- package/dist/staking/stakes/getStake/index.d.ts +0 -30
- package/dist/staking/stakes/getStake/index.d.ts.map +0 -1
- package/dist/staking/stakes/getStake/index.js +0 -5
- package/dist/staking/stakes/getStake/v0/getStake.d.ts +0 -30
- package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +0 -1
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +0 -33
- package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +0 -1
- package/dist/staking/stakes/searchStakeEvents/index.js +0 -5
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +0 -34
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +0 -1
- package/dist/staking/stakes/searchStakes/index.d.ts +0 -37
- package/dist/staking/stakes/searchStakes/index.d.ts.map +0 -1
- package/dist/staking/stakes/searchStakes/index.js +0 -5
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +0 -37
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +0 -1
- package/dist/staking/stakes/searchStakes/v0/searchStakes.js +0 -47
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts +0 -39
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts +0 -243
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputation/v0/index.js +0 -26
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts +0 -26
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts +0 -48
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts +0 -254
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/index.js +0 -26
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts +0 -27
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts +0 -27
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts +0 -31
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts +0 -38
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts +0 -26
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts +0 -266
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/index.js +0 -28
- package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts.map +0 -1
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts +0 -26
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts.map +0 -1
- /package/dist/fractions/sales/{receiveNonPurchasedWrappedAssets.route.js → receiveNonPurchasedWrappedAssets.js} +0 -0
- /package/dist/fractions/sales/vesting/{claimVestedTokens.route.js → claimVestedTokens.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GetStake } from "./getStake.js";
|
|
2
|
+
import { SearchStakeEvents } from "./searchStakeEvents.js";
|
|
3
|
+
import { SearchStakes } from "./searchStakes.js";
|
|
4
4
|
import { createController } from "../../common/controller.js";
|
|
5
5
|
export const StakesController = createController({
|
|
6
6
|
build: (factory) => factory
|
|
7
7
|
.createApp()
|
|
8
|
-
.route("/searchStakes",
|
|
9
|
-
.route("/searchStakeEvents",
|
|
10
|
-
.route("/getStake",
|
|
8
|
+
.route("/searchStakes", SearchStakes.build(factory))
|
|
9
|
+
.route("/searchStakeEvents", SearchStakeEvents.build(factory))
|
|
10
|
+
.route("/getStake", GetStake.build(factory)),
|
|
11
11
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
2
|
+
export declare const SearchStakeEventsResponse: z.ZodArray<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
chainId: z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>;
|
|
5
|
+
platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
7
|
+
owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
+
stakeId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
9
|
+
createdAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
10
|
+
txHash: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
export declare const SearchStakeEventsQuery: z.ZodObject<{
|
|
13
|
+
skip: z.ZodNumber;
|
|
14
|
+
limit: z.ZodNumber;
|
|
15
|
+
chainId: z.ZodOptional<z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>>;
|
|
16
|
+
owner: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
17
|
+
platform: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
18
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const SearchStakeEvents: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context").AppContext, {
|
|
21
|
+
"/": {
|
|
22
|
+
$get: {
|
|
23
|
+
input: {
|
|
24
|
+
query: {
|
|
25
|
+
skip: string | string[];
|
|
26
|
+
limit: string | string[];
|
|
27
|
+
chainId?: string | string[] | undefined;
|
|
28
|
+
owner?: string | string[] | undefined;
|
|
29
|
+
platform?: string | string[] | undefined;
|
|
30
|
+
poolId?: string | string[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
output: {
|
|
34
|
+
id: string;
|
|
35
|
+
chainId: "31337" | "11155111" | "84532";
|
|
36
|
+
platform: `0x${string}`;
|
|
37
|
+
owner: `0x${string}`;
|
|
38
|
+
stakeId: string & z.core.$brand<"Int256">;
|
|
39
|
+
createdAt: string & z.core.$brand<"IsoDateString">;
|
|
40
|
+
txHash: `0x${string}`;
|
|
41
|
+
poolId?: (string & z.core.$brand<"Int256">) | undefined;
|
|
42
|
+
}[];
|
|
43
|
+
outputFormat: "json";
|
|
44
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, "/", "/">>;
|
|
48
|
+
//# sourceMappingURL=searchStakeEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchStakeEvents.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/searchStakeEvents.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAaxD,eAAO,MAAM,yBAAyB;;;;;;;;;kBAAiE,CAAC;AAExG,eAAO,MAAM,sBAAsB;;;;;;;iBASC,CAAC;AAErC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8C5B,CAAC"}
|
package/dist/staking/stakes/{searchStakeEvents/v0/searchStakeEvents.js → searchStakeEvents.js}
RENAMED
|
@@ -5,15 +5,26 @@ import { unixToDate } from "@evergonlabs/tmi-protocol-utils/date";
|
|
|
5
5
|
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
6
6
|
import { toISOJson } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
7
7
|
import { toInt256Json } from "@evergonlabs/tmi-utils/models";
|
|
8
|
-
import { createController } from "
|
|
9
|
-
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "
|
|
10
|
-
import { indexerSchemas } from "
|
|
11
|
-
import { PageSchema } from "
|
|
12
|
-
import { createTag } from "
|
|
13
|
-
import { StakeEventSchema } from "
|
|
8
|
+
import { createController } from "../../common/controller.js";
|
|
9
|
+
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../common/index.js";
|
|
10
|
+
import { indexerSchemas } from "../../common/indexer/schemas.js";
|
|
11
|
+
import { PageSchema } from "../../common/models/page.js";
|
|
12
|
+
import { createTag } from "../../common/tag.js";
|
|
13
|
+
import { StakeEventSchema } from "../../staking/stakes/common/stakeEvent.js";
|
|
14
14
|
const tag = createTag("Stakes");
|
|
15
|
-
export const
|
|
16
|
-
|
|
15
|
+
export const SearchStakeEventsResponse = z.array(StakeEventSchema).openapi("SearchStakeEventsResponse");
|
|
16
|
+
export const SearchStakeEventsQuery = z
|
|
17
|
+
.object({
|
|
18
|
+
skip: PageSchema.shape.skip.openapi({ param: { name: "skip", in: "query" } }),
|
|
19
|
+
limit: PageSchema.shape.limit.openapi({ param: { name: "limit", in: "query" } }),
|
|
20
|
+
chainId: StakingChainId.optional().openapi({ param: { name: "chainId", in: "query" } }),
|
|
21
|
+
owner: AddressSchema.optional().openapi({ param: { name: "owner", in: "query" } }),
|
|
22
|
+
platform: PlatformContractAddress.optional().openapi({ param: { name: "platform", in: "query" } }),
|
|
23
|
+
poolId: PoolIdSchema.optional().openapi({ param: { name: "poolId", in: "query" } }),
|
|
24
|
+
})
|
|
25
|
+
.openapi("SearchStakeEventsQuery");
|
|
26
|
+
export const SearchStakeEvents = createController({
|
|
27
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
17
28
|
summary: "Search stake events",
|
|
18
29
|
description: "Search stake events by users, platforms and pools",
|
|
19
30
|
tags: [tag.tag],
|
|
@@ -22,21 +33,15 @@ export const SearchStakeEventsV0 = createController({
|
|
|
22
33
|
description: "Returns list of stakes events within specified platforms and pools",
|
|
23
34
|
content: {
|
|
24
35
|
"application/json": {
|
|
25
|
-
schema: resolver(
|
|
36
|
+
schema: resolver(SearchStakeEventsResponse),
|
|
26
37
|
},
|
|
27
38
|
},
|
|
28
39
|
},
|
|
29
40
|
},
|
|
30
|
-
}), validator("
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
owner: AddressSchema.optional(),
|
|
35
|
-
platform: PlatformContractAddress.optional(),
|
|
36
|
-
poolId: PoolIdSchema.optional(),
|
|
37
|
-
}),
|
|
38
|
-
})), async (c) => {
|
|
39
|
-
const { page, filter } = c.req.valid("json");
|
|
41
|
+
}), validator("query", SearchStakeEventsQuery), async (c) => {
|
|
42
|
+
const { skip, limit, chainId, owner, platform, poolId } = c.req.valid("query");
|
|
43
|
+
const page = { skip, limit };
|
|
44
|
+
const filter = { chainId, owner, platform, poolId };
|
|
40
45
|
const result = await c
|
|
41
46
|
.get("indexerClient")
|
|
42
47
|
.db.select()
|
|
@@ -47,7 +52,7 @@ export const SearchStakeEventsV0 = createController({
|
|
|
47
52
|
.where(and(filter.chainId ? eq(indexerSchemas.stakeEvents.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.stakeEvents.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.stakeEvents.diamondAddress, filter.platform) : undefined, typeof filter.poolId === "number"
|
|
48
53
|
? eq(indexerSchemas.stakeEvents.poolId, BigInt(filter.poolId))
|
|
49
54
|
: undefined));
|
|
50
|
-
return c.json(result.map((x) => toStakeEvent(x))
|
|
55
|
+
return c.json(result.map((x) => toStakeEvent(x)));
|
|
51
56
|
}),
|
|
52
57
|
});
|
|
53
58
|
function toStakeEvent(raw) {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
2
|
+
export declare const SearchStakesResponse: z.ZodArray<z.ZodObject<{
|
|
3
|
+
chainId: z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>;
|
|
4
|
+
platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
6
|
+
owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
7
|
+
stakeId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
8
|
+
activePackets: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
9
|
+
rewardsClaimed: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
10
|
+
isActive: z.ZodBoolean;
|
|
11
|
+
unlockTimestamp: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
12
|
+
startTimestamp: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
13
|
+
createdAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
14
|
+
updatedAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
export declare const SearchStakesQuery: z.ZodObject<{
|
|
17
|
+
skip: z.ZodNumber;
|
|
18
|
+
limit: z.ZodNumber;
|
|
19
|
+
chainId: z.ZodOptional<z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>>;
|
|
20
|
+
owner: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
21
|
+
platform: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
22
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const SearchStakes: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context").AppContext, {
|
|
25
|
+
"/": {
|
|
26
|
+
$get: {
|
|
27
|
+
input: {
|
|
28
|
+
query: {
|
|
29
|
+
skip: string | string[];
|
|
30
|
+
limit: string | string[];
|
|
31
|
+
chainId?: string | string[] | undefined;
|
|
32
|
+
owner?: string | string[] | undefined;
|
|
33
|
+
platform?: string | string[] | undefined;
|
|
34
|
+
poolId?: string | string[] | undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
output: {
|
|
38
|
+
chainId: "31337" | "11155111" | "84532";
|
|
39
|
+
platform: string;
|
|
40
|
+
owner: string;
|
|
41
|
+
stakeId: string;
|
|
42
|
+
activePackets: string;
|
|
43
|
+
rewardsClaimed: string;
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
unlockTimestamp: string;
|
|
46
|
+
startTimestamp: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
poolId?: string | undefined;
|
|
50
|
+
}[];
|
|
51
|
+
outputFormat: "json";
|
|
52
|
+
status: 200;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, "/", "/">>;
|
|
56
|
+
//# sourceMappingURL=searchStakes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchStakes.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/searchStakes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAWxD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;kBAAuD,CAAC;AAEzF,eAAO,MAAM,iBAAiB;;;;;;;iBASC,CAAC;AAEhC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2CvB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { and, eq } from "@ponder/client";
|
|
2
|
+
import { describeRoute } from "hono-openapi";
|
|
3
|
+
import { resolver, validator } from "hono-openapi";
|
|
4
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
5
|
+
import { createController } from "../../common/controller.js";
|
|
6
|
+
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../common/index.js";
|
|
7
|
+
import { indexerSchemas } from "../../common/indexer/schemas.js";
|
|
8
|
+
import { PageSchema } from "../../common/models/page.js";
|
|
9
|
+
import { createTag } from "../../common/tag.js";
|
|
10
|
+
import { mapToStake, StakeSchema } from "../../staking/stakes/common/stake.js";
|
|
11
|
+
const tag = createTag("Stakes");
|
|
12
|
+
export const SearchStakesResponse = z.array(StakeSchema).openapi("SearchStakesResponse");
|
|
13
|
+
export const SearchStakesQuery = z
|
|
14
|
+
.object({
|
|
15
|
+
skip: PageSchema.shape.skip.openapi({ param: { name: "skip", in: "query" } }),
|
|
16
|
+
limit: PageSchema.shape.limit.openapi({ param: { name: "limit", in: "query" } }),
|
|
17
|
+
chainId: StakingChainId.optional().openapi({ param: { name: "chainId", in: "query" } }),
|
|
18
|
+
owner: AddressSchema.optional().openapi({ param: { name: "owner", in: "query" } }),
|
|
19
|
+
platform: PlatformContractAddress.optional().openapi({ param: { name: "platform", in: "query" } }),
|
|
20
|
+
poolId: PoolIdSchema.optional().openapi({ param: { name: "poolId", in: "query" } }),
|
|
21
|
+
})
|
|
22
|
+
.openapi("SearchStakesQuery");
|
|
23
|
+
export const SearchStakes = createController({
|
|
24
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
25
|
+
summary: "Search stakes",
|
|
26
|
+
description: "Search stakes by users, platforms and pools",
|
|
27
|
+
tags: [tag.tag],
|
|
28
|
+
responses: {
|
|
29
|
+
200: {
|
|
30
|
+
description: "Returns list of stakes within specified platforms and pools",
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": {
|
|
33
|
+
schema: resolver(SearchStakesResponse),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}), validator("query", SearchStakesQuery), async (c) => {
|
|
39
|
+
const { skip, limit, chainId, owner, platform, poolId } = c.req.valid("query");
|
|
40
|
+
const page = { skip, limit };
|
|
41
|
+
const filter = { chainId, owner, platform, poolId };
|
|
42
|
+
const result = await c
|
|
43
|
+
.get("indexerClient")
|
|
44
|
+
.db.select()
|
|
45
|
+
.from(indexerSchemas.stakes)
|
|
46
|
+
.limit(page.limit)
|
|
47
|
+
.offset(page.skip)
|
|
48
|
+
.orderBy(indexerSchemas.stakes.createdAt)
|
|
49
|
+
.where(and(filter.chainId ? eq(indexerSchemas.stakes.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.stakes.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.stakes.diamondAddress, filter.platform) : undefined, typeof filter.poolId === "number" ? eq(indexerSchemas.stakes.poolId, BigInt(filter.poolId)) : undefined));
|
|
50
|
+
return c.json(result.map((x) => mapToStake(x)), 200);
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const StakingTemplatesApi: import("../common/controller.js").IApi<import("hono/hono-base").HonoBase<import("../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<
|
|
1
|
+
export declare const StakingTemplatesApi: import("../common/controller.js").IApi<import("hono/hono-base").HonoBase<import("../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
2
|
"/": {
|
|
3
3
|
$get: {
|
|
4
4
|
input: {
|
|
@@ -12,7 +12,7 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
12
12
|
admin: `0x${string}`;
|
|
13
13
|
};
|
|
14
14
|
outputFormat: "json";
|
|
15
|
-
status:
|
|
15
|
+
status: 200;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
}, "/getPlatformDeployEvent"> | import("hono/types").MergeSchemaPath<{
|
|
@@ -25,13 +25,13 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
output: {
|
|
28
|
-
poolId:
|
|
29
|
-
stakeId:
|
|
28
|
+
poolId: string;
|
|
29
|
+
stakeId: string;
|
|
30
30
|
operator: `0x${string}`;
|
|
31
31
|
owner: `0x${string}`;
|
|
32
|
-
inputPacketsStaked:
|
|
33
|
-
stakeStartActiveTimestamp:
|
|
34
|
-
unlockTimestamp:
|
|
32
|
+
inputPacketsStaked: string;
|
|
33
|
+
stakeStartActiveTimestamp: string;
|
|
34
|
+
unlockTimestamp: string;
|
|
35
35
|
};
|
|
36
36
|
outputFormat: "json";
|
|
37
37
|
status: 200;
|
|
@@ -47,9 +47,9 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
output: {
|
|
50
|
-
poolId:
|
|
51
|
-
inputAssetKeeper: `0x${string}`;
|
|
50
|
+
poolId: string & import("zod").$brand<"Int256">;
|
|
52
51
|
rewardAssetHandler: `0x${string}`;
|
|
52
|
+
inputAssetKeeper: `0x${string}`;
|
|
53
53
|
};
|
|
54
54
|
outputFormat: "json";
|
|
55
55
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -239,7 +239,7 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
239
239
|
status: 200;
|
|
240
240
|
};
|
|
241
241
|
};
|
|
242
|
-
}, "/createPlatform">, "/
|
|
242
|
+
}, "/createPlatform">, "/reputation"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
243
243
|
"/": {
|
|
244
244
|
$get: {
|
|
245
245
|
input: {
|
|
@@ -253,7 +253,7 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
253
253
|
admin: `0x${string}`;
|
|
254
254
|
};
|
|
255
255
|
outputFormat: "json";
|
|
256
|
-
status:
|
|
256
|
+
status: 200;
|
|
257
257
|
};
|
|
258
258
|
};
|
|
259
259
|
}, "/getPlatformDeployEvent"> | import("hono/types").MergeSchemaPath<{
|
|
@@ -266,13 +266,13 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
268
|
output: {
|
|
269
|
-
poolId:
|
|
270
|
-
stakeId:
|
|
269
|
+
poolId: string;
|
|
270
|
+
stakeId: string;
|
|
271
271
|
operator: `0x${string}`;
|
|
272
272
|
owner: `0x${string}`;
|
|
273
|
-
inputPacketsStaked:
|
|
274
|
-
stakeStartActiveTimestamp:
|
|
275
|
-
unlockTimestamp:
|
|
273
|
+
inputPacketsStaked: string;
|
|
274
|
+
stakeStartActiveTimestamp: string;
|
|
275
|
+
unlockTimestamp: string;
|
|
276
276
|
};
|
|
277
277
|
outputFormat: "json";
|
|
278
278
|
status: 200;
|
|
@@ -288,9 +288,9 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
290
|
output: {
|
|
291
|
-
poolId:
|
|
292
|
-
inputAssetKeeper: `0x${string}`;
|
|
291
|
+
poolId: string & import("zod").$brand<"Int256">;
|
|
293
292
|
rewardAssetHandler: `0x${string}`;
|
|
293
|
+
inputAssetKeeper: `0x${string}`;
|
|
294
294
|
};
|
|
295
295
|
outputFormat: "json";
|
|
296
296
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -491,7 +491,7 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
491
491
|
status: 200;
|
|
492
492
|
};
|
|
493
493
|
};
|
|
494
|
-
}, "/createPlatform">, "/
|
|
494
|
+
}, "/createPlatform">, "/reputationLock"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
495
495
|
"/": {
|
|
496
496
|
$get: {
|
|
497
497
|
input: {
|
|
@@ -505,7 +505,7 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
505
505
|
admin: `0x${string}`;
|
|
506
506
|
};
|
|
507
507
|
outputFormat: "json";
|
|
508
|
-
status:
|
|
508
|
+
status: 200;
|
|
509
509
|
};
|
|
510
510
|
};
|
|
511
511
|
}, "/getPlatformDeployEvent"> | import("hono/types").MergeSchemaPath<{
|
|
@@ -518,13 +518,13 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
518
518
|
};
|
|
519
519
|
};
|
|
520
520
|
output: {
|
|
521
|
-
poolId:
|
|
522
|
-
stakeId:
|
|
521
|
+
poolId: string;
|
|
522
|
+
stakeId: string;
|
|
523
523
|
operator: `0x${string}`;
|
|
524
524
|
owner: `0x${string}`;
|
|
525
|
-
inputPacketsStaked:
|
|
526
|
-
stakeStartActiveTimestamp:
|
|
527
|
-
unlockTimestamp:
|
|
525
|
+
inputPacketsStaked: string;
|
|
526
|
+
stakeStartActiveTimestamp: string;
|
|
527
|
+
unlockTimestamp: string;
|
|
528
528
|
};
|
|
529
529
|
outputFormat: "json";
|
|
530
530
|
status: 200;
|
|
@@ -540,9 +540,9 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
540
540
|
};
|
|
541
541
|
};
|
|
542
542
|
output: {
|
|
543
|
-
poolId:
|
|
544
|
-
inputAssetKeeper: `0x${string}`;
|
|
543
|
+
poolId: string & import("zod").$brand<"Int256">;
|
|
545
544
|
rewardAssetHandler: `0x${string}`;
|
|
545
|
+
inputAssetKeeper: `0x${string}`;
|
|
546
546
|
};
|
|
547
547
|
outputFormat: "json";
|
|
548
548
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -755,5 +755,5 @@ export declare const StakingTemplatesApi: import("../common/controller.js").IApi
|
|
|
755
755
|
status: 200;
|
|
756
756
|
};
|
|
757
757
|
};
|
|
758
|
-
}, "/distributeRewards">, "/
|
|
758
|
+
}, "/distributeRewards">, "/rwa">, "/", "/">>;
|
|
759
759
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stakingTemplates/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stakingTemplates/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAS9B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createApi } from "../common/controller.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ReputationTemplate } from "./templates/reputation/index.js";
|
|
3
|
+
import { ReputationLockTemplate } from "./templates/reputationLock/index.js";
|
|
4
|
+
import { RwaTemplate } from "./templates/rwa/index.js";
|
|
5
5
|
export const StakingTemplatesApi = createApi({
|
|
6
6
|
title: "Staking Templates API",
|
|
7
7
|
description: "Staking Templates API for Decentralized finance",
|
|
8
8
|
build: (factory) => factory
|
|
9
9
|
.createApp()
|
|
10
|
-
.route("/reputation",
|
|
11
|
-
.route("/reputationLock",
|
|
12
|
-
.route("/rwa",
|
|
10
|
+
.route("/reputation", ReputationTemplate.build(factory))
|
|
11
|
+
.route("/reputationLock", ReputationLockTemplate.build(factory))
|
|
12
|
+
.route("/rwa", RwaTemplate.build(factory)),
|
|
13
13
|
});
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
1
2
|
import { ITemplateHelper } from "./templates.js";
|
|
3
|
+
export declare const GetCreatePoolEventResponse: z.ZodObject<{
|
|
4
|
+
poolId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
5
|
+
rewardAssetHandler: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
|
+
inputAssetKeeper: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
2
8
|
export declare function createGetCreatePoolEventController(template: ITemplateHelper): import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
3
9
|
"/": {
|
|
4
10
|
$get: {
|
|
@@ -9,9 +15,9 @@ export declare function createGetCreatePoolEventController(template: ITemplateHe
|
|
|
9
15
|
};
|
|
10
16
|
};
|
|
11
17
|
output: {
|
|
12
|
-
poolId:
|
|
13
|
-
inputAssetKeeper: `0x${string}`;
|
|
18
|
+
poolId: string & z.core.$brand<"Int256">;
|
|
14
19
|
rewardAssetHandler: `0x${string}`;
|
|
20
|
+
inputAssetKeeper: `0x${string}`;
|
|
15
21
|
};
|
|
16
22
|
outputFormat: "json";
|
|
17
23
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCreatePoolEvent.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getCreatePoolEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCreatePoolEvent.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getCreatePoolEvent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAOjD,eAAO,MAAM,0BAA0B;;;;iBAMC,CAAC;AAEzC,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,eAAe;;;;;;;;;;;;;;;;;;cAyC3E"}
|
|
@@ -3,11 +3,18 @@ import { resolver, validator } from "hono-openapi";
|
|
|
3
3
|
import { waitForTransactionReceipt } from "viem/actions";
|
|
4
4
|
import { parseAssetManagersDeployEvent } from "@evergonlabs/tmi-protocol-staking-sdk";
|
|
5
5
|
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
6
|
-
import { Int256Json } from "@evergonlabs/tmi-utils/models";
|
|
6
|
+
import { Int256Json, toInt256Json } from "@evergonlabs/tmi-utils/models";
|
|
7
7
|
import { getPublicClient } from "../../../common/blockchain.js";
|
|
8
8
|
import { createController } from "../../../common/controller.js";
|
|
9
9
|
import { HttpError } from "../../../common/http-error.js";
|
|
10
10
|
import { AddressSchema, SentTransactionParamsSchema } from "../../../common/index.js";
|
|
11
|
+
export const GetCreatePoolEventResponse = z
|
|
12
|
+
.object({
|
|
13
|
+
poolId: Int256Json.openapi({ description: "Id of a Pool", example: "1" }),
|
|
14
|
+
rewardAssetHandler: AddressSchema,
|
|
15
|
+
inputAssetKeeper: AddressSchema,
|
|
16
|
+
})
|
|
17
|
+
.openapi("GetCreatePoolEventResponse");
|
|
11
18
|
export function createGetCreatePoolEventController(template) {
|
|
12
19
|
return createController({
|
|
13
20
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
@@ -19,11 +26,7 @@ export function createGetCreatePoolEventController(template) {
|
|
|
19
26
|
description: "Details of the created pool",
|
|
20
27
|
content: {
|
|
21
28
|
"application/json": {
|
|
22
|
-
schema: resolver(
|
|
23
|
-
poolId: Int256Json.openapi({ description: "Id of a Pool", example: "1" }),
|
|
24
|
-
rewardAssetHandler: AddressSchema,
|
|
25
|
-
inputAssetKeeper: AddressSchema,
|
|
26
|
-
})),
|
|
29
|
+
schema: resolver(GetCreatePoolEventResponse),
|
|
27
30
|
},
|
|
28
31
|
},
|
|
29
32
|
},
|
|
@@ -35,17 +38,16 @@ export function createGetCreatePoolEventController(template) {
|
|
|
35
38
|
});
|
|
36
39
|
const result = parseAssetManagersDeployEvent(template.template, receipt.logs);
|
|
37
40
|
if (!result) {
|
|
38
|
-
throw new
|
|
41
|
+
throw new HttpError(500, {
|
|
42
|
+
message: `Can't parse pool create transaction. Make sure you're passing transaction that is generated by \`createPool\` action`,
|
|
43
|
+
name: "UnableParseCreatePoolEvent",
|
|
44
|
+
});
|
|
39
45
|
}
|
|
40
|
-
return c.json(
|
|
46
|
+
return c.json({
|
|
47
|
+
poolId: toInt256Json(result.poolId),
|
|
48
|
+
rewardAssetHandler: result.rewardAssetHandler,
|
|
49
|
+
inputAssetKeeper: result.inputAssetKeeper,
|
|
50
|
+
});
|
|
41
51
|
}),
|
|
42
52
|
});
|
|
43
53
|
}
|
|
44
|
-
class UnableParseCreatePoolEvent extends HttpError {
|
|
45
|
-
constructor() {
|
|
46
|
-
super(500, {
|
|
47
|
-
message: `Can't parse pool create transaction. Make sure you're passing transaction that is generated by \`createPool\` action`,
|
|
48
|
-
name: "UnableParseCreatePoolEvent",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
1
2
|
import { ITemplateHelper } from "./templates.js";
|
|
3
|
+
export declare const GetPlatformDeployEventResponse: z.ZodObject<{
|
|
4
|
+
diamondAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
+
admin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
2
7
|
export declare function createGetPlatformDeployEventController(template: ITemplateHelper): import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
3
8
|
"/": {
|
|
4
9
|
$get: {
|
|
@@ -13,7 +18,7 @@ export declare function createGetPlatformDeployEventController(template: ITempla
|
|
|
13
18
|
admin: `0x${string}`;
|
|
14
19
|
};
|
|
15
20
|
outputFormat: "json";
|
|
16
|
-
status:
|
|
21
|
+
status: 200;
|
|
17
22
|
};
|
|
18
23
|
};
|
|
19
24
|
}, "/", "/">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPlatformDeployEvent.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getPlatformDeployEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getPlatformDeployEvent.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getPlatformDeployEvent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAOjD,eAAO,MAAM,8BAA8B;;;iBAKC,CAAC;AAE7C,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,eAAe;;;;;;;;;;;;;;;;;cAkC/E"}
|
|
@@ -7,6 +7,12 @@ import { getPublicClient } from "../../../common/blockchain.js";
|
|
|
7
7
|
import { createController } from "../../../common/controller.js";
|
|
8
8
|
import { HttpError } from "../../../common/http-error.js";
|
|
9
9
|
import { AddressSchema, SentTransactionParamsSchema } from "../../../common/index.js";
|
|
10
|
+
export const GetPlatformDeployEventResponse = z
|
|
11
|
+
.object({
|
|
12
|
+
diamondAddress: AddressSchema,
|
|
13
|
+
admin: AddressSchema,
|
|
14
|
+
})
|
|
15
|
+
.openapi("GetPlatformDeployEventResponse");
|
|
10
16
|
export function createGetPlatformDeployEventController(template) {
|
|
11
17
|
return createController({
|
|
12
18
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
@@ -18,10 +24,7 @@ export function createGetPlatformDeployEventController(template) {
|
|
|
18
24
|
description: "Returns estimated gas or estimation error",
|
|
19
25
|
content: {
|
|
20
26
|
"application/json": {
|
|
21
|
-
schema: resolver(
|
|
22
|
-
diamondAddress: AddressSchema,
|
|
23
|
-
admin: AddressSchema,
|
|
24
|
-
})),
|
|
27
|
+
schema: resolver(GetPlatformDeployEventResponse),
|
|
25
28
|
},
|
|
26
29
|
},
|
|
27
30
|
},
|
|
@@ -35,7 +38,7 @@ export function createGetPlatformDeployEventController(template) {
|
|
|
35
38
|
if (!result) {
|
|
36
39
|
throw new UnableParsePlatformDeployEvent();
|
|
37
40
|
}
|
|
38
|
-
return c.json(result);
|
|
41
|
+
return c.json(result, 200);
|
|
39
42
|
}),
|
|
40
43
|
});
|
|
41
44
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
1
2
|
import { ITemplateHelper } from "./templates.js";
|
|
3
|
+
export declare const GetRewardRequest: z.ZodObject<{
|
|
4
|
+
platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
+
stakeId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
6
|
+
}, z.core.$strip>;
|
|
2
7
|
export declare function createGetRewardController(template: ITemplateHelper): import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
3
8
|
"/": {
|
|
4
9
|
$post: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getReward.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getReward.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getReward.d.ts","sourceRoot":"","sources":["../../../../src/stakingTemplates/templates/common/getReward.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKjD,eAAO,MAAM,gBAAgB;;;iBAKC,CAAC;AAE/B,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;cAiClE"}
|
|
@@ -5,6 +5,12 @@ import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
|
5
5
|
import { toInt256Json } from "@evergonlabs/tmi-utils/models";
|
|
6
6
|
import { createController } from "../../../common/controller.js";
|
|
7
7
|
import { PlatformContractAddress, StakeIdSchema, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
8
|
+
export const GetRewardRequest = z
|
|
9
|
+
.object({
|
|
10
|
+
platform: PlatformContractAddress,
|
|
11
|
+
stakeId: StakeIdSchema,
|
|
12
|
+
})
|
|
13
|
+
.openapi("GetRewardRequest");
|
|
8
14
|
export function createGetRewardController(template) {
|
|
9
15
|
return createController({
|
|
10
16
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
@@ -21,10 +27,7 @@ export function createGetRewardController(template) {
|
|
|
21
27
|
},
|
|
22
28
|
},
|
|
23
29
|
},
|
|
24
|
-
}), validator("json",
|
|
25
|
-
platform: PlatformContractAddress,
|
|
26
|
-
stakeId: StakeIdSchema,
|
|
27
|
-
})), async (c) => {
|
|
30
|
+
}), validator("json", GetRewardRequest), async (c) => {
|
|
28
31
|
const { platform, stakeId } = c.req.valid("json");
|
|
29
32
|
const deployed = getReward(template.template, {
|
|
30
33
|
platform: platform,
|