@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
|
@@ -2,12 +2,24 @@ import { describeRoute } from "hono-openapi";
|
|
|
2
2
|
import { resolver, validator } from "hono-openapi";
|
|
3
3
|
import { grantRole, StakingRole } from "@evergonlabs/tmi-protocol-staking-sdk";
|
|
4
4
|
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
5
|
-
import { createController } from "
|
|
6
|
-
import { AddressSchema, HexStringSchema, toTransaction, TransactionSchema } from "
|
|
7
|
-
import { PlatformContractAddress } from "
|
|
8
|
-
import { createTag } from "
|
|
5
|
+
import { createController } from "../../common/controller.js";
|
|
6
|
+
import { AddressSchema, HexStringSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
7
|
+
import { PlatformContractAddress } from "../../common/models/platform.js";
|
|
8
|
+
import { createTag } from "../../common/tag.js";
|
|
9
9
|
const tag = createTag("Roles");
|
|
10
|
-
export const
|
|
10
|
+
export const GrantRoleRequest = z
|
|
11
|
+
.object({
|
|
12
|
+
platform: PlatformContractAddress,
|
|
13
|
+
addresses: z.array(AddressSchema).openapi({
|
|
14
|
+
description: "List of address you want assign role to",
|
|
15
|
+
}),
|
|
16
|
+
role: z.union([z.enum(StakingRole), HexStringSchema]).openapi({
|
|
17
|
+
description: "Id of a role assign to",
|
|
18
|
+
example: StakingRole.Staker,
|
|
19
|
+
}),
|
|
20
|
+
})
|
|
21
|
+
.openapi("GrantRoleRequest");
|
|
22
|
+
export const GrantRole = createController({
|
|
11
23
|
build: (factory) => factory.createApp().post("/", describeRoute({
|
|
12
24
|
summary: "Grant role",
|
|
13
25
|
description: "Generates transaction for granting specified role to user addreses within the platform",
|
|
@@ -22,22 +34,13 @@ export const GrantRoleV0 = createController({
|
|
|
22
34
|
},
|
|
23
35
|
},
|
|
24
36
|
},
|
|
25
|
-
}), validator("json",
|
|
26
|
-
platform: PlatformContractAddress,
|
|
27
|
-
addresses: z.array(AddressSchema).openapi({
|
|
28
|
-
description: "List of address you want assign role to",
|
|
29
|
-
}),
|
|
30
|
-
role: z.union([z.nativeEnum(StakingRole), HexStringSchema]).openapi({
|
|
31
|
-
description: "Id of a role assign to",
|
|
32
|
-
example: StakingRole.Staker,
|
|
33
|
-
}),
|
|
34
|
-
})), async (c) => {
|
|
37
|
+
}), validator("json", GrantRoleRequest), async (c) => {
|
|
35
38
|
const { platform, role, addresses } = c.req.valid("json");
|
|
36
39
|
const deployed = grantRole({
|
|
37
40
|
platform: platform,
|
|
38
41
|
role: role,
|
|
39
42
|
addresses: addresses,
|
|
40
43
|
});
|
|
41
|
-
return c.json(toTransaction(deployed)
|
|
44
|
+
return c.json(toTransaction(deployed));
|
|
42
45
|
}),
|
|
43
46
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const RolesController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<
|
|
1
|
+
export declare const RolesController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
2
|
"/": {
|
|
3
3
|
$get: {
|
|
4
4
|
input: {};
|
|
@@ -19,7 +19,7 @@ export declare const RolesController: import("../../common/controller.js").ICont
|
|
|
19
19
|
status: 200;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
}, "/
|
|
22
|
+
}, "/getRoles"> | import("hono/types").MergeSchemaPath<{
|
|
23
23
|
"/": {
|
|
24
24
|
$post: {
|
|
25
25
|
input: {
|
|
@@ -40,24 +40,20 @@ export declare const RolesController: import("../../common/controller.js").ICont
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
outputFormat: "json";
|
|
43
|
-
status:
|
|
43
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
}, "/
|
|
46
|
+
}, "/grantRole"> | import("hono/types").MergeSchemaPath<{
|
|
47
47
|
"/": {
|
|
48
|
-
$
|
|
48
|
+
$get: {
|
|
49
49
|
input: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
owner?: string | undefined;
|
|
58
|
-
platform?: string | undefined;
|
|
59
|
-
poolId?: string | undefined;
|
|
60
|
-
};
|
|
50
|
+
query: {
|
|
51
|
+
skip: string | string[];
|
|
52
|
+
limit: string | string[];
|
|
53
|
+
chainId?: string | string[] | undefined;
|
|
54
|
+
owner?: string | string[] | undefined;
|
|
55
|
+
platform?: string | string[] | undefined;
|
|
56
|
+
poolId?: string | string[] | undefined;
|
|
61
57
|
};
|
|
62
58
|
};
|
|
63
59
|
output: {
|
|
@@ -73,21 +69,17 @@ export declare const RolesController: import("../../common/controller.js").ICont
|
|
|
73
69
|
status: 200;
|
|
74
70
|
};
|
|
75
71
|
};
|
|
76
|
-
}, "/
|
|
72
|
+
}, "/searchRoles"> | import("hono/types").MergeSchemaPath<{
|
|
77
73
|
"/": {
|
|
78
|
-
$
|
|
74
|
+
$get: {
|
|
79
75
|
input: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
owner?: string | undefined;
|
|
88
|
-
platform?: string | undefined;
|
|
89
|
-
poolId?: string | undefined;
|
|
90
|
-
};
|
|
76
|
+
query: {
|
|
77
|
+
skip: string | string[];
|
|
78
|
+
limit: string | string[];
|
|
79
|
+
chainId?: string | string[] | undefined;
|
|
80
|
+
owner?: string | string[] | undefined;
|
|
81
|
+
platform?: string | string[] | undefined;
|
|
82
|
+
poolId?: string | string[] | undefined;
|
|
91
83
|
};
|
|
92
84
|
};
|
|
93
85
|
output: {
|
|
@@ -101,8 +93,8 @@ export declare const RolesController: import("../../common/controller.js").ICont
|
|
|
101
93
|
poolId?: (string & import("zod").$brand<"Int256">) | undefined;
|
|
102
94
|
}[];
|
|
103
95
|
outputFormat: "json";
|
|
104
|
-
status:
|
|
96
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
105
97
|
};
|
|
106
98
|
};
|
|
107
|
-
}, "/
|
|
99
|
+
}, "/searchRoleEvents">, "/", "/">>;
|
|
108
100
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAQ1B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { GetRoles } from "./getRoles.js";
|
|
2
|
+
import { GrantRole } from "./grantRole.js";
|
|
3
|
+
import { SearchRoleEvents } from "./searchRoleEvents.js";
|
|
4
|
+
import { SearchRoles } from "./searchRoles.js";
|
|
5
5
|
import { createController } from "../../common/controller.js";
|
|
6
6
|
export const RolesController = createController({
|
|
7
7
|
build: (factory) => factory
|
|
8
8
|
.createApp()
|
|
9
|
-
.route("/getRoles",
|
|
10
|
-
.route("/grantRole",
|
|
11
|
-
.route("/searchRoles",
|
|
12
|
-
.route("/searchRoleEvents",
|
|
9
|
+
.route("/getRoles", GetRoles.build(factory))
|
|
10
|
+
.route("/grantRole", GrantRole.build(factory))
|
|
11
|
+
.route("/searchRoles", SearchRoles.build(factory))
|
|
12
|
+
.route("/searchRoleEvents", SearchRoleEvents.build(factory)),
|
|
13
13
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
2
|
+
export declare const SearchRoleEventsResponse: z.ZodArray<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
roleId: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
|
+
chainId: z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>;
|
|
6
|
+
platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
7
|
+
txHash: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
+
owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
9
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
10
|
+
isRevoked: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
export declare const SearchRoleEventsQuery: 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 SearchRoleEvents: 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
|
+
roleId: `0x${string}`;
|
|
36
|
+
chainId: "31337" | "11155111" | "84532";
|
|
37
|
+
platform: `0x${string}`;
|
|
38
|
+
txHash: `0x${string}`;
|
|
39
|
+
owner: `0x${string}`;
|
|
40
|
+
isRevoked: boolean;
|
|
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=searchRoleEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchRoleEvents.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/searchRoleEvents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAWxD,eAAO,MAAM,wBAAwB;;;;;;;;;kBAA+D,CAAC;AAErG,eAAO,MAAM,qBAAqB;;;;;;;iBASC,CAAC;AAEpC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8C3B,CAAC"}
|
|
@@ -2,15 +2,26 @@ import { and, eq } from "@ponder/client";
|
|
|
2
2
|
import { describeRoute } from "hono-openapi";
|
|
3
3
|
import { resolver, validator } from "hono-openapi";
|
|
4
4
|
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
5
|
-
import { createController } from "
|
|
6
|
-
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "
|
|
7
|
-
import { indexerSchemas } from "
|
|
8
|
-
import { PageSchema } from "
|
|
9
|
-
import { createTag } from "
|
|
10
|
-
import {
|
|
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 { RoleEventSchema } from "../../staking/roles/common/roleEvent.js";
|
|
11
11
|
const tag = createTag("Roles");
|
|
12
|
-
export const
|
|
13
|
-
|
|
12
|
+
export const SearchRoleEventsResponse = z.array(RoleEventSchema).openapi("SearchRoleEventsResponse");
|
|
13
|
+
export const SearchRoleEventsQuery = 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("SearchRoleEventsQuery");
|
|
23
|
+
export const SearchRoleEvents = createController({
|
|
24
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
25
|
summary: "Search role events",
|
|
15
26
|
description: "Search role events by platform, user and kind",
|
|
16
27
|
tags: [tag.tag],
|
|
@@ -19,21 +30,15 @@ export const SearchRoleEventsV0 = createController({
|
|
|
19
30
|
description: "Returns list of role events by some filter",
|
|
20
31
|
content: {
|
|
21
32
|
"application/json": {
|
|
22
|
-
schema: resolver(
|
|
33
|
+
schema: resolver(SearchRoleEventsResponse),
|
|
23
34
|
},
|
|
24
35
|
},
|
|
25
36
|
},
|
|
26
37
|
},
|
|
27
|
-
}), validator("
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
owner: AddressSchema.optional(),
|
|
32
|
-
platform: PlatformContractAddress.optional(),
|
|
33
|
-
poolId: PoolIdSchema.optional(),
|
|
34
|
-
}),
|
|
35
|
-
})), async (c) => {
|
|
36
|
-
const { page, filter } = c.req.valid("json");
|
|
38
|
+
}), validator("query", SearchRoleEventsQuery), 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 };
|
|
37
42
|
const result = await c
|
|
38
43
|
.get("indexerClient")
|
|
39
44
|
.db.select()
|
|
@@ -44,7 +49,7 @@ export const SearchRoleEventsV0 = createController({
|
|
|
44
49
|
.where(and(filter.chainId ? eq(indexerSchemas.roleEvents.chainId, Number(filter.chainId)) : undefined, filter.owner ? eq(indexerSchemas.roleEvents.walletAddress, filter.owner) : undefined, filter.platform ? eq(indexerSchemas.roleEvents.diamondAddress, filter.platform) : undefined, typeof filter.poolId === "number"
|
|
45
50
|
? eq(indexerSchemas.roleEvents.campaignId, BigInt(filter.poolId))
|
|
46
51
|
: undefined));
|
|
47
|
-
return c.json(result.map((x) => toRoleEvent(x))
|
|
52
|
+
return c.json(result.map((x) => toRoleEvent(x)));
|
|
48
53
|
}),
|
|
49
54
|
});
|
|
50
55
|
function toRoleEvent(raw) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
2
|
+
export declare const SearchRolesResponse: 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
|
+
roleId: 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
|
+
createdAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
9
|
+
updatedAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
export declare const SearchRolesQuery: z.ZodObject<{
|
|
12
|
+
skip: z.ZodNumber;
|
|
13
|
+
limit: z.ZodNumber;
|
|
14
|
+
chainId: z.ZodOptional<z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>>;
|
|
15
|
+
owner: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
16
|
+
platform: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
17
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const SearchRoles: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context").AppContext, {
|
|
20
|
+
"/": {
|
|
21
|
+
$get: {
|
|
22
|
+
input: {
|
|
23
|
+
query: {
|
|
24
|
+
skip: string | string[];
|
|
25
|
+
limit: string | string[];
|
|
26
|
+
chainId?: string | string[] | undefined;
|
|
27
|
+
owner?: string | string[] | undefined;
|
|
28
|
+
platform?: string | string[] | undefined;
|
|
29
|
+
poolId?: string | string[] | undefined;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
output: {
|
|
33
|
+
chainId: "31337" | "11155111" | "84532";
|
|
34
|
+
platform: `0x${string}`;
|
|
35
|
+
roleId: `0x${string}`;
|
|
36
|
+
owner: `0x${string}`;
|
|
37
|
+
createdAt: string & z.core.$brand<"IsoDateString">;
|
|
38
|
+
updatedAt: string & z.core.$brand<"IsoDateString">;
|
|
39
|
+
poolId?: (string & z.core.$brand<"Int256">) | undefined;
|
|
40
|
+
}[];
|
|
41
|
+
outputFormat: "json";
|
|
42
|
+
status: 200;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, "/", "/">>;
|
|
46
|
+
//# sourceMappingURL=searchRoles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchRoles.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/searchRoles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAYxD,eAAO,MAAM,mBAAmB;;;;;;;;kBAA+D,CAAC;AAEhG,eAAO,MAAM,gBAAgB;;;;;;;iBASC,CAAC;AAE/B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;aA6CtB,CAAC"}
|
|
@@ -4,15 +4,26 @@ import { resolver, validator } from "hono-openapi";
|
|
|
4
4
|
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
|
-
import { createController } from "
|
|
8
|
-
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "
|
|
9
|
-
import { indexerSchemas } from "
|
|
10
|
-
import { PageSchema } from "
|
|
11
|
-
import { createTag } from "
|
|
12
|
-
import { RoleAssignmentSchema } from "
|
|
7
|
+
import { createController } from "../../common/controller.js";
|
|
8
|
+
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../common/index.js";
|
|
9
|
+
import { indexerSchemas } from "../../common/indexer/schemas.js";
|
|
10
|
+
import { PageSchema } from "../../common/models/page.js";
|
|
11
|
+
import { createTag } from "../../common/tag.js";
|
|
12
|
+
import { RoleAssignmentSchema } from "../../staking/roles/common/roleAssignment.js";
|
|
13
13
|
const tag = createTag("Roles");
|
|
14
|
-
export const
|
|
15
|
-
|
|
14
|
+
export const SearchRolesResponse = z.array(RoleAssignmentSchema).openapi("SearchRolesResponse");
|
|
15
|
+
export const SearchRolesQuery = z
|
|
16
|
+
.object({
|
|
17
|
+
skip: PageSchema.shape.skip.openapi({ param: { name: "skip", in: "query" } }),
|
|
18
|
+
limit: PageSchema.shape.limit.openapi({ param: { name: "limit", in: "query" } }),
|
|
19
|
+
chainId: StakingChainId.optional().openapi({ param: { name: "chainId", in: "query" } }),
|
|
20
|
+
owner: AddressSchema.optional().openapi({ param: { name: "owner", in: "query" } }),
|
|
21
|
+
platform: PlatformContractAddress.optional().openapi({ param: { name: "platform", in: "query" } }),
|
|
22
|
+
poolId: PoolIdSchema.optional().openapi({ param: { name: "poolId", in: "query" } }),
|
|
23
|
+
})
|
|
24
|
+
.openapi("SearchRolesQuery");
|
|
25
|
+
export const SearchRoles = createController({
|
|
26
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
16
27
|
summary: "Search roles",
|
|
17
28
|
description: "Search roles by users, platforms and pools",
|
|
18
29
|
tags: [tag.tag],
|
|
@@ -21,21 +32,15 @@ export const SearchRolesV0 = createController({
|
|
|
21
32
|
description: "Returns list of assignments within specified platforms and pools",
|
|
22
33
|
content: {
|
|
23
34
|
"application/json": {
|
|
24
|
-
schema: resolver(
|
|
35
|
+
schema: resolver(SearchRolesResponse),
|
|
25
36
|
},
|
|
26
37
|
},
|
|
27
38
|
},
|
|
28
39
|
},
|
|
29
|
-
}), validator("
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
owner: AddressSchema.optional(),
|
|
34
|
-
platform: PlatformContractAddress.optional(),
|
|
35
|
-
poolId: PoolIdSchema.optional(),
|
|
36
|
-
}),
|
|
37
|
-
})), async (c) => {
|
|
38
|
-
const { page, filter } = c.req.valid("json");
|
|
40
|
+
}), validator("query", SearchRolesQuery), async (c) => {
|
|
41
|
+
const { skip, limit, chainId, owner, platform, poolId } = c.req.valid("query");
|
|
42
|
+
const page = { skip, limit };
|
|
43
|
+
const filter = { chainId, owner, platform, poolId };
|
|
39
44
|
const result = await c
|
|
40
45
|
.get("indexerClient")
|
|
41
46
|
.db.select()
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
2
|
+
export declare const GetStakeQuery: 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
|
+
stakeId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const GetStakeResponse: z.ZodObject<{
|
|
8
|
+
chainId: z.ZodUnion<z.ZodLiteral<"31337" | "11155111" | "84532">[]>;
|
|
9
|
+
platform: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
10
|
+
poolId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "Int256", "out">>;
|
|
11
|
+
owner: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
12
|
+
stakeId: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
13
|
+
activePackets: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
14
|
+
rewardsClaimed: z.core.$ZodBranded<z.ZodString, "Int256", "out">;
|
|
15
|
+
isActive: z.ZodBoolean;
|
|
16
|
+
unlockTimestamp: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
17
|
+
startTimestamp: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
18
|
+
createdAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
19
|
+
updatedAt: z.core.$ZodBranded<z.ZodString, "IsoDateString", "out">;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const GetStake: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context").AppContext, {
|
|
22
|
+
"/": {
|
|
23
|
+
$get: {
|
|
24
|
+
input: {
|
|
25
|
+
query: {
|
|
26
|
+
chainId: "31337" | "11155111" | "84532";
|
|
27
|
+
platform: string;
|
|
28
|
+
stakeId: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
output: {
|
|
32
|
+
chainId: "31337" | "11155111" | "84532";
|
|
33
|
+
platform: string;
|
|
34
|
+
owner: string;
|
|
35
|
+
stakeId: string;
|
|
36
|
+
activePackets: string;
|
|
37
|
+
rewardsClaimed: string;
|
|
38
|
+
isActive: boolean;
|
|
39
|
+
unlockTimestamp: string;
|
|
40
|
+
startTimestamp: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
poolId?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
outputFormat: "json";
|
|
46
|
+
status: 200;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}, "/", "/">>;
|
|
50
|
+
//# sourceMappingURL=getStake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStake.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/getStake.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,qCAAqC,CAAC;AAWxD,eAAO,MAAM,aAAa;;;;iBAqBC,CAAC;AAE5B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAAc,CAAC;AAE5C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAyDnB,CAAC"}
|
|
@@ -2,14 +2,37 @@ import { and, eq } from "@ponder/client";
|
|
|
2
2
|
import { describeRoute } from "hono-openapi";
|
|
3
3
|
import { resolver, validator } from "hono-openapi";
|
|
4
4
|
import { z } from "@evergonlabs/tmi-protocol-utils/zod";
|
|
5
|
-
import { createController } from "
|
|
6
|
-
import { HttpError } from "
|
|
7
|
-
import { ErrorSchema, PlatformContractAddress, StakeIdSchema, StakingChainId } from "
|
|
8
|
-
import { indexerSchemas } from "
|
|
9
|
-
import { createTag } from "
|
|
10
|
-
import { mapToStake, StakeSchema } from "
|
|
5
|
+
import { createController } from "../../common/controller.js";
|
|
6
|
+
import { HttpError } from "../../common/http-error.js";
|
|
7
|
+
import { ErrorSchema, PlatformContractAddress, StakeIdSchema, StakingChainId } from "../../common/index.js";
|
|
8
|
+
import { indexerSchemas } from "../../common/indexer/schemas.js";
|
|
9
|
+
import { createTag } from "../../common/tag.js";
|
|
10
|
+
import { mapToStake, StakeSchema } from "../../staking/stakes/common/stake.js";
|
|
11
11
|
const tag = createTag("Stakes");
|
|
12
|
-
export const
|
|
12
|
+
export const GetStakeQuery = z
|
|
13
|
+
.object({
|
|
14
|
+
chainId: StakingChainId.openapi({
|
|
15
|
+
param: {
|
|
16
|
+
name: "chainId",
|
|
17
|
+
in: "query",
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
platform: PlatformContractAddress.openapi({
|
|
21
|
+
param: {
|
|
22
|
+
name: "platform",
|
|
23
|
+
in: "query",
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
stakeId: StakeIdSchema.openapi({
|
|
27
|
+
param: {
|
|
28
|
+
name: "stakeId",
|
|
29
|
+
in: "query",
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
})
|
|
33
|
+
.openapi("GetStakeQuery");
|
|
34
|
+
export const GetStakeResponse = StakeSchema;
|
|
35
|
+
export const GetStake = createController({
|
|
13
36
|
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
14
37
|
summary: "Get stake",
|
|
15
38
|
description: "Retrieve details of a specified stake",
|
|
@@ -19,7 +42,7 @@ export const GetStakeV0 = createController({
|
|
|
19
42
|
description: "Stake details",
|
|
20
43
|
content: {
|
|
21
44
|
"application/json": {
|
|
22
|
-
schema: resolver(
|
|
45
|
+
schema: resolver(GetStakeResponse),
|
|
23
46
|
},
|
|
24
47
|
},
|
|
25
48
|
},
|
|
@@ -32,26 +55,7 @@ export const GetStakeV0 = createController({
|
|
|
32
55
|
},
|
|
33
56
|
},
|
|
34
57
|
},
|
|
35
|
-
}), validator("query",
|
|
36
|
-
chainId: StakingChainId.openapi({
|
|
37
|
-
param: {
|
|
38
|
-
name: "chainId",
|
|
39
|
-
in: "query",
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
platform: PlatformContractAddress.openapi({
|
|
43
|
-
param: {
|
|
44
|
-
name: "platform",
|
|
45
|
-
in: "query",
|
|
46
|
-
},
|
|
47
|
-
}),
|
|
48
|
-
stakeId: StakeIdSchema.openapi({
|
|
49
|
-
param: {
|
|
50
|
-
name: "stakeId",
|
|
51
|
-
in: "query",
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
})), async (c) => {
|
|
58
|
+
}), validator("query", GetStakeQuery), async (c) => {
|
|
55
59
|
const { chainId, platform, stakeId } = c.req.valid("query");
|
|
56
60
|
const [stake] = await c
|
|
57
61
|
.get("indexerClient")
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
export declare const StakesController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<
|
|
1
|
+
export declare const StakesController: import("../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../common/context.js").AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
2
2
|
"/": {
|
|
3
|
-
$
|
|
3
|
+
$get: {
|
|
4
4
|
input: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
owner?: string | undefined;
|
|
13
|
-
platform?: string | undefined;
|
|
14
|
-
poolId?: string | undefined;
|
|
15
|
-
};
|
|
5
|
+
query: {
|
|
6
|
+
skip: string | string[];
|
|
7
|
+
limit: string | string[];
|
|
8
|
+
chainId?: string | string[] | undefined;
|
|
9
|
+
owner?: string | string[] | undefined;
|
|
10
|
+
platform?: string | string[] | undefined;
|
|
11
|
+
poolId?: string | string[] | undefined;
|
|
16
12
|
};
|
|
17
13
|
};
|
|
18
14
|
output: {
|
|
@@ -33,21 +29,17 @@ export declare const StakesController: import("../../common/controller.js").ICon
|
|
|
33
29
|
status: 200;
|
|
34
30
|
};
|
|
35
31
|
};
|
|
36
|
-
}, "/
|
|
32
|
+
}, "/searchStakes"> | import("hono/types").MergeSchemaPath<{
|
|
37
33
|
"/": {
|
|
38
|
-
$
|
|
34
|
+
$get: {
|
|
39
35
|
input: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
owner?: string | undefined;
|
|
48
|
-
platform?: string | undefined;
|
|
49
|
-
poolId?: string | undefined;
|
|
50
|
-
};
|
|
36
|
+
query: {
|
|
37
|
+
skip: string | string[];
|
|
38
|
+
limit: string | string[];
|
|
39
|
+
chainId?: string | string[] | undefined;
|
|
40
|
+
owner?: string | string[] | undefined;
|
|
41
|
+
platform?: string | string[] | undefined;
|
|
42
|
+
poolId?: string | string[] | undefined;
|
|
51
43
|
};
|
|
52
44
|
};
|
|
53
45
|
output: {
|
|
@@ -61,10 +53,10 @@ export declare const StakesController: import("../../common/controller.js").ICon
|
|
|
61
53
|
poolId?: (string & import("zod").$brand<"Int256">) | undefined;
|
|
62
54
|
}[];
|
|
63
55
|
outputFormat: "json";
|
|
64
|
-
status:
|
|
56
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
65
57
|
};
|
|
66
58
|
};
|
|
67
|
-
}, "/
|
|
59
|
+
}, "/searchStakeEvents"> | import("hono/types").MergeSchemaPath<{
|
|
68
60
|
"/": {
|
|
69
61
|
$get: {
|
|
70
62
|
input: {
|
|
@@ -92,5 +84,5 @@ export declare const StakesController: import("../../common/controller.js").ICon
|
|
|
92
84
|
status: 200;
|
|
93
85
|
};
|
|
94
86
|
};
|
|
95
|
-
}, "/
|
|
87
|
+
}, "/getStake">, "/", "/">>;
|
|
96
88
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/stakes/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAO3B,CAAC"}
|