@evergonlabs/tmi-protocol-api 0.1.2 → 0.1.4
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 +42 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/client.d.ts +60 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/common/abis/erc20Whitelisted.d.ts +14 -7
- package/dist/common/abis/erc20Whitelisted.d.ts.map +1 -1
- package/dist/common/abis/erc20Whitelisted.js +8 -3
- package/dist/common/indexer/client.d.ts +140 -0
- package/dist/common/indexer/client.d.ts.map +1 -1
- package/dist/common/indexer/index.d.ts +140 -0
- package/dist/common/indexer/index.d.ts.map +1 -1
- package/dist/common/indexer/schemas.d.ts +70 -0
- package/dist/common/indexer/schemas.d.ts.map +1 -1
- package/dist/fractions/activity/searchActivity.route.d.ts.map +1 -1
- package/dist/fractions/activity/searchActivity.route.js +1 -3
- package/dist/fractions/index.d.ts +41 -0
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/index.js +4 -0
- package/dist/fractions/purchase/v0/statistics.route.d.ts +65 -0
- package/dist/fractions/purchase/v0/statistics.route.d.ts.map +1 -0
- package/dist/fractions/purchase/v0/statistics.route.js +52 -0
- package/dist/fractions/sales/searchActivity.route.js +2 -2
- package/dist/{src/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts → fractions/sales/searchClaim.route.d.ts} +14 -15
- package/dist/fractions/sales/searchClaim.route.d.ts.map +1 -0
- package/dist/fractions/sales/searchClaim.route.js +47 -0
- package/dist/fractions/sales/searchPurchase.route.d.ts +120 -0
- package/dist/fractions/sales/searchPurchase.route.d.ts.map +1 -0
- package/dist/fractions/sales/searchPurchase.route.js +70 -0
- package/dist/fractions/sales/searchSaleEvents/v0/searchSaleEvents.js +6 -6
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts +92 -0
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts.map +1 -0
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.js +89 -0
- package/dist/general/balanceClient.d.ts +16 -41
- package/dist/general/balanceClient.d.ts.map +1 -1
- package/dist/general/balanceClient.js +8 -19
- package/dist/general/index.d.ts +1 -1
- package/dist/general/searchBalances.d.ts +3 -3
- package/dist/general/searchBalances.js +2 -2
- package/dist/general/utils/tokenBalance/tokenBalance.d.ts +28 -0
- package/dist/general/utils/tokenBalance/tokenBalance.d.ts.map +1 -0
- package/dist/general/utils/tokenBalance/tokenBalance.js +20 -0
- package/package.json +8 -8
- package/dist/package.json +0 -78
- package/dist/src/app.d.ts +0 -2194
- package/dist/src/app.d.ts.map +0 -1
- package/dist/src/app.js +0 -18
- package/dist/src/client.d.ts +0 -2690
- package/dist/src/client.d.ts.map +0 -1
- package/dist/src/client.js +0 -4
- package/dist/src/common/abis/erc20Whitelisted.d.ts +0 -4
- package/dist/src/common/abis/erc20Whitelisted.d.ts.map +0 -1
- package/dist/src/common/abis/erc20Whitelisted.js +0 -4
- package/dist/src/common/app.d.ts +0 -9
- package/dist/src/common/app.d.ts.map +0 -1
- package/dist/src/common/app.js +0 -3
- package/dist/src/common/blockchain.d.ts +0 -9528
- package/dist/src/common/blockchain.d.ts.map +0 -1
- package/dist/src/common/blockchain.js +0 -40
- package/dist/src/common/config.d.ts +0 -21
- package/dist/src/common/config.d.ts.map +0 -1
- package/dist/src/common/config.js +0 -33
- package/dist/src/common/http-error.d.ts +0 -7
- package/dist/src/common/http-error.d.ts.map +0 -1
- package/dist/src/common/http-error.js +0 -7
- package/dist/src/common/index.d.ts +0 -2
- package/dist/src/common/index.d.ts.map +0 -1
- package/dist/src/common/index.js +0 -1
- package/dist/src/common/indexer/client.d.ts +0 -1191
- package/dist/src/common/indexer/client.d.ts.map +0 -1
- package/dist/src/common/indexer/client.js +0 -7
- package/dist/src/common/indexer/index.d.ts +0 -1191
- package/dist/src/common/indexer/index.d.ts.map +0 -1
- package/dist/src/common/indexer/index.js +0 -3
- package/dist/src/common/indexer/schemas.d.ts +0 -1191
- package/dist/src/common/indexer/schemas.d.ts.map +0 -1
- package/dist/src/common/indexer/schemas.js +0 -14
- package/dist/src/common/models/chainId.d.ts +0 -5
- package/dist/src/common/models/chainId.d.ts.map +0 -1
- package/dist/src/common/models/chainId.js +0 -23
- package/dist/src/common/models/date.d.ts +0 -3
- package/dist/src/common/models/date.d.ts.map +0 -1
- package/dist/src/common/models/date.js +0 -5
- package/dist/src/common/models/erc721.d.ts +0 -15
- package/dist/src/common/models/erc721.d.ts.map +0 -1
- package/dist/src/common/models/erc721.js +0 -21
- package/dist/src/common/models/index.d.ts +0 -7
- package/dist/src/common/models/index.d.ts.map +0 -1
- package/dist/src/common/models/index.js +0 -6
- package/dist/src/common/models/page.d.ts +0 -12
- package/dist/src/common/models/page.d.ts.map +0 -1
- package/dist/src/common/models/page.js +0 -15
- package/dist/src/common/models/percent.d.ts +0 -3
- package/dist/src/common/models/percent.d.ts.map +0 -1
- package/dist/src/common/models/percent.js +0 -6
- package/dist/src/common/models/platform.d.ts +0 -4
- package/dist/src/common/models/platform.d.ts.map +0 -1
- package/dist/src/common/models/platform.js +0 -13
- package/dist/src/common/models/routes.d.ts +0 -16
- package/dist/src/common/models/routes.d.ts.map +0 -1
- package/dist/src/common/models/routes.js +0 -13
- package/dist/src/common/models/saleId.d.ts +0 -12
- package/dist/src/common/models/saleId.d.ts.map +0 -1
- package/dist/src/common/models/saleId.js +0 -6
- package/dist/src/common/models/transaction.d.ts +0 -90
- package/dist/src/common/models/transaction.d.ts.map +0 -1
- package/dist/src/common/models/transaction.js +0 -57
- package/dist/src/common/models/viem.d.ts +0 -4
- package/dist/src/common/models/viem.d.ts.map +0 -1
- package/dist/src/common/models/viem.js +0 -15
- package/dist/src/common/openapi.d.ts +0 -4
- package/dist/src/common/openapi.d.ts.map +0 -1
- package/dist/src/common/openapi.js +0 -40
- package/dist/src/common/tag.d.ts +0 -7
- package/dist/src/common/tag.d.ts.map +0 -1
- package/dist/src/common/tag.js +0 -5
- package/dist/src/common/version.d.ts +0 -2
- package/dist/src/common/version.d.ts.map +0 -1
- package/dist/src/common/version.js +0 -2
- package/dist/src/common/zod.d.ts +0 -3
- package/dist/src/common/zod.d.ts.map +0 -1
- package/dist/src/common/zod.js +0 -2
- package/dist/src/error.d.ts +0 -3
- package/dist/src/error.d.ts.map +0 -1
- package/dist/src/error.js +0 -16
- package/dist/src/fractions/approveSale/v0/approveSale.route.d.ts +0 -68
- package/dist/src/fractions/approveSale/v0/approveSale.route.d.ts.map +0 -1
- package/dist/src/fractions/approveSale/v0/approveSale.route.js +0 -31
- package/dist/src/fractions/approveWrapper/v0/approveWrapper.route.d.ts +0 -203
- package/dist/src/fractions/approveWrapper/v0/approveWrapper.route.d.ts.map +0 -1
- package/dist/src/fractions/approveWrapper/v0/approveWrapper.route.js +0 -84
- package/dist/src/fractions/completeSale/v0/completeSale.route.d.ts +0 -68
- package/dist/src/fractions/completeSale/v0/completeSale.route.d.ts.map +0 -1
- package/dist/src/fractions/completeSale/v0/completeSale.route.js +0 -31
- package/dist/src/fractions/createFractions/v0/createFractions.route.d.ts +0 -305
- package/dist/src/fractions/createFractions/v0/createFractions.route.d.ts.map +0 -1
- package/dist/src/fractions/createFractions/v0/createFractions.route.js +0 -61
- package/dist/src/fractions/createFractions/v0/createFractions.schema.d.ts +0 -416
- package/dist/src/fractions/createFractions/v0/createFractions.schema.d.ts.map +0 -1
- package/dist/src/fractions/createFractions/v0/createFractions.schema.js +0 -67
- package/dist/src/fractions/createFractions/v0/parseFractionsCreatedEvent.d.ts +0 -51
- package/dist/src/fractions/createFractions/v0/parseFractionsCreatedEvent.d.ts.map +0 -1
- package/dist/src/fractions/createFractions/v0/parseFractionsCreatedEvent.js +0 -59
- package/dist/src/fractions/deployMarket/v0/deployMarket.routes.d.ts +0 -297
- package/dist/src/fractions/deployMarket/v0/deployMarket.routes.d.ts.map +0 -1
- package/dist/src/fractions/deployMarket/v0/deployMarket.routes.js +0 -98
- package/dist/src/fractions/deployMarket/v0/deployMarket.schema.d.ts +0 -96
- package/dist/src/fractions/deployMarket/v0/deployMarket.schema.d.ts.map +0 -1
- package/dist/src/fractions/deployMarket/v0/deployMarket.schema.js +0 -21
- package/dist/src/fractions/gating/index.d.ts +0 -2
- package/dist/src/fractions/gating/index.d.ts.map +0 -1
- package/dist/src/fractions/gating/index.js +0 -0
- package/dist/src/fractions/gating/v0/getAuthData.d.ts +0 -86
- package/dist/src/fractions/gating/v0/getAuthData.d.ts.map +0 -1
- package/dist/src/fractions/gating/v0/getAuthData.js +0 -48
- package/dist/src/fractions/gating/v0/getNonce.route.d.ts +0 -54
- package/dist/src/fractions/gating/v0/getNonce.route.d.ts.map +0 -1
- package/dist/src/fractions/gating/v0/getNonce.route.js +0 -40
- package/dist/src/fractions/grantRole/v0/grantRole.route.d.ts +0 -65
- package/dist/src/fractions/grantRole/v0/grantRole.route.d.ts.map +0 -1
- package/dist/src/fractions/grantRole/v0/grantRole.route.js +0 -31
- package/dist/src/fractions/grantRole/v0/grantRole.schema.d.ts +0 -26
- package/dist/src/fractions/grantRole/v0/grantRole.schema.d.ts.map +0 -1
- package/dist/src/fractions/grantRole/v0/grantRole.schema.js +0 -14
- package/dist/src/fractions/index.d.ts +0 -968
- package/dist/src/fractions/index.d.ts.map +0 -1
- package/dist/src/fractions/index.js +0 -91
- package/dist/src/fractions/markets/common/platform.d.ts +0 -26
- package/dist/src/fractions/markets/common/platform.d.ts.map +0 -1
- package/dist/src/fractions/markets/common/platform.js +0 -26
- package/dist/src/fractions/markets/getDeployEvent.d.ts +0 -42
- package/dist/src/fractions/markets/getDeployEvent.d.ts.map +0 -1
- package/dist/src/fractions/markets/getDeployEvent.js +0 -47
- package/dist/src/fractions/markets/getMarket/index.d.ts +0 -40
- package/dist/src/fractions/markets/getMarket/index.d.ts.map +0 -1
- package/dist/src/fractions/markets/getMarket/index.js +0 -4
- package/dist/src/fractions/markets/getMarket/v0/getMarket.d.ts +0 -64
- package/dist/src/fractions/markets/getMarket/v0/getMarket.d.ts.map +0 -1
- package/dist/src/fractions/markets/getMarket/v0/getMarket.js +0 -63
- package/dist/src/fractions/markets/index.d.ts +0 -84
- package/dist/src/fractions/markets/index.d.ts.map +0 -1
- package/dist/src/fractions/markets/index.js +0 -12
- package/dist/src/fractions/markets/searchMarkets/index.d.ts +0 -32
- package/dist/src/fractions/markets/searchMarkets/index.d.ts.map +0 -1
- package/dist/src/fractions/markets/searchMarkets/index.js +0 -4
- package/dist/src/fractions/markets/searchMarkets/v0/searchMarkets.d.ts +0 -76
- package/dist/src/fractions/markets/searchMarkets/v0/searchMarkets.d.ts.map +0 -1
- package/dist/src/fractions/markets/searchMarkets/v0/searchMarkets.js +0 -42
- package/dist/src/fractions/purchase/v0/purchase.route.d.ts +0 -89
- package/dist/src/fractions/purchase/v0/purchase.route.d.ts.map +0 -1
- package/dist/src/fractions/purchase/v0/purchase.route.js +0 -41
- package/dist/src/fractions/roles/getRoles/v0/getRoles.d.ts +0 -28
- package/dist/src/fractions/roles/getRoles/v0/getRoles.d.ts.map +0 -1
- package/dist/src/fractions/roles/getRoles/v0/getRoles.js +0 -41
- package/dist/src/fractions/sales/getVaultAddress.d.ts +0 -52
- package/dist/src/fractions/sales/getVaultAddress.d.ts.map +0 -1
- package/dist/src/fractions/sales/getVaultAddress.js +0 -61
- package/dist/src/fractions/sales/getWithdrawEvent.d.ts +0 -42
- package/dist/src/fractions/sales/getWithdrawEvent.d.ts.map +0 -1
- package/dist/src/fractions/sales/getWithdrawEvent.js +0 -52
- package/dist/src/fractions/sales/index.d.ts +0 -10
- package/dist/src/fractions/sales/index.d.ts.map +0 -1
- package/dist/src/fractions/sales/index.js +0 -10
- package/dist/src/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +0 -144
- package/dist/src/fractions/sales/receiveFundsAfterNonFunded.route.d.ts.map +0 -1
- package/dist/src/fractions/sales/receiveFundsAfterNonFunded.route.js +0 -59
- package/dist/src/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +0 -57
- package/dist/src/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts.map +0 -1
- package/dist/src/fractions/sales/receiveNonPurchasedWrappedAssets.route.js +0 -27
- package/dist/src/fractions/sales/recoverFractions.d.ts +0 -108
- package/dist/src/fractions/sales/recoverFractions.d.ts.map +0 -1
- package/dist/src/fractions/sales/recoverFractions.js +0 -45
- package/dist/src/fractions/sales/rejectFractions.d.ts +0 -80
- package/dist/src/fractions/sales/rejectFractions.d.ts.map +0 -1
- package/dist/src/fractions/sales/rejectFractions.js +0 -39
- package/dist/src/fractions/sales/searchSaleEvents/index.d.ts +0 -2
- package/dist/src/fractions/sales/searchSaleEvents/index.d.ts.map +0 -1
- package/dist/src/fractions/sales/searchSaleEvents/index.js +0 -0
- package/dist/src/fractions/sales/searchSaleEvents/v0/searchSaleEvents.d.ts +0 -89
- package/dist/src/fractions/sales/searchSaleEvents/v0/searchSaleEvents.d.ts.map +0 -1
- package/dist/src/fractions/sales/searchSaleEvents/v0/searchSaleEvents.js +0 -82
- package/dist/src/fractions/sales/setFeeCapLimit.d.ts +0 -75
- package/dist/src/fractions/sales/setFeeCapLimit.d.ts.map +0 -1
- package/dist/src/fractions/sales/setFeeCapLimit.js +0 -32
- package/dist/src/fractions/sales/unlockWrappedAssets.route.d.ts +0 -68
- package/dist/src/fractions/sales/unlockWrappedAssets.route.d.ts.map +0 -1
- package/dist/src/fractions/sales/unlockWrappedAssets.route.js +0 -31
- package/dist/src/fractions/sales/vesting/index.d.ts +0 -2
- package/dist/src/fractions/sales/vesting/index.d.ts.map +0 -1
- package/dist/src/fractions/sales/vesting/index.js +0 -0
- package/dist/src/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts +0 -94
- package/dist/src/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts.map +0 -1
- package/dist/src/fractions/sales/vesting/v0/claimVestedTokens.route.js +0 -41
- package/dist/src/fractions/sales/vesting/v0/editCliff.route.d.ts +0 -87
- package/dist/src/fractions/sales/vesting/v0/editCliff.route.d.ts.map +0 -1
- package/dist/src/fractions/sales/vesting/v0/editCliff.route.js +0 -40
- package/dist/src/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.d.ts +0 -48
- package/dist/src/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.d.ts.map +0 -1
- package/dist/src/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.js +0 -58
- package/dist/src/fractions/withdraw/v0/withdraw.route.d.ts +0 -68
- package/dist/src/fractions/withdraw/v0/withdraw.route.d.ts.map +0 -1
- package/dist/src/fractions/withdraw/v0/withdraw.route.js +0 -31
- package/dist/src/general/balance-client.d.ts +0 -13
- package/dist/src/general/balance-client.d.ts.map +0 -1
- package/dist/src/general/balance-client.js +0 -26
- package/dist/src/general/common.d.ts +0 -94
- package/dist/src/general/common.d.ts.map +0 -1
- package/dist/src/general/common.js +0 -35
- package/dist/src/general/estimateGas.d.ts +0 -52
- package/dist/src/general/estimateGas.d.ts.map +0 -1
- package/dist/src/general/estimateGas.js +0 -64
- package/dist/src/general/getBalance.d.ts +0 -44
- package/dist/src/general/getBalance.d.ts.map +0 -1
- package/dist/src/general/getBalance.js +0 -43
- package/dist/src/general/getBalancesBatch.d.ts +0 -59
- package/dist/src/general/getBalancesBatch.d.ts.map +0 -1
- package/dist/src/general/getBalancesBatch.js +0 -34
- package/dist/src/general/index.d.ts +0 -100
- package/dist/src/general/index.d.ts.map +0 -1
- package/dist/src/general/index.js +0 -20
- package/dist/src/general/searchBalances.d.ts +0 -78
- package/dist/src/general/searchBalances.d.ts.map +0 -1
- package/dist/src/general/searchBalances.js +0 -49
- package/dist/src/issuance/approve.d.ts +0 -75
- package/dist/src/issuance/approve.d.ts.map +0 -1
- package/dist/src/issuance/approve.js +0 -36
- package/dist/src/issuance/burn.d.ts +0 -75
- package/dist/src/issuance/burn.d.ts.map +0 -1
- package/dist/src/issuance/burn.js +0 -36
- package/dist/src/issuance/deploy.d.ts +0 -88
- package/dist/src/issuance/deploy.d.ts.map +0 -1
- package/dist/src/issuance/deploy.js +0 -91
- package/dist/src/issuance/grantRole.d.ts +0 -78
- package/dist/src/issuance/grantRole.d.ts.map +0 -1
- package/dist/src/issuance/grantRole.js +0 -50
- package/dist/src/issuance/index.d.ts +0 -165
- package/dist/src/issuance/index.d.ts.map +0 -1
- package/dist/src/issuance/index.js +0 -23
- package/dist/src/issuance/mint.d.ts +0 -75
- package/dist/src/issuance/mint.d.ts.map +0 -1
- package/dist/src/issuance/mint.js +0 -36
- package/dist/src/issuance/transfer.d.ts +0 -75
- package/dist/src/issuance/transfer.d.ts.map +0 -1
- package/dist/src/issuance/transfer.js +0 -36
- package/dist/src/serve.d.ts +0 -2
- package/dist/src/serve.d.ts.map +0 -1
- package/dist/src/serve.js +0 -33
- package/dist/src/staking/index.d.ts +0 -242
- package/dist/src/staking/index.d.ts.map +0 -1
- package/dist/src/staking/index.js +0 -20
- package/dist/src/staking/platforms/common/platform.d.ts +0 -26
- package/dist/src/staking/platforms/common/platform.d.ts.map +0 -1
- package/dist/src/staking/platforms/common/platform.js +0 -26
- package/dist/src/staking/platforms/common/platformNotFound.d.ts +0 -9
- package/dist/src/staking/platforms/common/platformNotFound.d.ts.map +0 -1
- package/dist/src/staking/platforms/common/platformNotFound.js +0 -13
- package/dist/src/staking/platforms/getPlatform/index.d.ts +0 -26
- package/dist/src/staking/platforms/getPlatform/index.d.ts.map +0 -1
- package/dist/src/staking/platforms/getPlatform/index.js +0 -4
- package/dist/src/staking/platforms/getPlatform/v0/getPlatform.d.ts +0 -52
- package/dist/src/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +0 -1
- package/dist/src/staking/platforms/getPlatform/v0/getPlatform.js +0 -58
- package/dist/src/staking/platforms/index.d.ts +0 -52
- package/dist/src/staking/platforms/index.d.ts.map +0 -1
- package/dist/src/staking/platforms/index.js +0 -10
- package/dist/src/staking/platforms/searchPlatforms/index.d.ts +0 -32
- package/dist/src/staking/platforms/searchPlatforms/index.d.ts.map +0 -1
- package/dist/src/staking/platforms/searchPlatforms/index.js +0 -4
- package/dist/src/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +0 -76
- package/dist/src/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +0 -1
- package/dist/src/staking/platforms/searchPlatforms/v0/searchPlatforms.js +0 -42
- package/dist/src/staking/pools/common/pool.d.ts +0 -29
- package/dist/src/staking/pools/common/pool.d.ts.map +0 -1
- package/dist/src/staking/pools/common/pool.js +0 -28
- package/dist/src/staking/pools/common/poolNotFound.d.ts +0 -10
- package/dist/src/staking/pools/common/poolNotFound.d.ts.map +0 -1
- package/dist/src/staking/pools/common/poolNotFound.js +0 -14
- package/dist/src/staking/pools/getPool/index.d.ts +0 -20
- package/dist/src/staking/pools/getPool/index.d.ts.map +0 -1
- package/dist/src/staking/pools/getPool/index.js +0 -4
- package/dist/src/staking/pools/getPool/v0/getPool.d.ts +0 -35
- package/dist/src/staking/pools/getPool/v0/getPool.d.ts.map +0 -1
- package/dist/src/staking/pools/getPool/v0/getPool.js +0 -64
- package/dist/src/staking/pools/index.d.ts +0 -39
- package/dist/src/staking/pools/index.d.ts.map +0 -1
- package/dist/src/staking/pools/index.js +0 -10
- package/dist/src/staking/pools/searchPools/index.d.ts +0 -25
- package/dist/src/staking/pools/searchPools/index.d.ts.map +0 -1
- package/dist/src/staking/pools/searchPools/index.js +0 -4
- package/dist/src/staking/pools/searchPools/v0/searchPools.d.ts +0 -55
- package/dist/src/staking/pools/searchPools/v0/searchPools.d.ts.map +0 -1
- package/dist/src/staking/pools/searchPools/v0/searchPools.js +0 -42
- package/dist/src/staking/roles/common/role.d.ts +0 -13
- package/dist/src/staking/roles/common/role.d.ts.map +0 -1
- package/dist/src/staking/roles/common/role.js +0 -18
- package/dist/src/staking/roles/common/roleAssignment.d.ts +0 -27
- package/dist/src/staking/roles/common/roleAssignment.d.ts.map +0 -1
- package/dist/src/staking/roles/common/roleAssignment.js +0 -21
- package/dist/src/staking/roles/common/roleEvent.d.ts +0 -30
- package/dist/src/staking/roles/common/roleEvent.d.ts.map +0 -1
- package/dist/src/staking/roles/common/roleEvent.js +0 -23
- package/dist/src/staking/roles/getRoles/index.d.ts +0 -26
- package/dist/src/staking/roles/getRoles/index.d.ts.map +0 -1
- package/dist/src/staking/roles/getRoles/index.js +0 -4
- package/dist/src/staking/roles/getRoles/v0/getRoles.d.ts +0 -29
- package/dist/src/staking/roles/getRoles/v0/getRoles.d.ts.map +0 -1
- package/dist/src/staking/roles/getRoles/v0/getRoles.js +0 -41
- package/dist/src/staking/roles/grantRole/index.d.ts +0 -29
- package/dist/src/staking/roles/grantRole/index.d.ts.map +0 -1
- package/dist/src/staking/roles/grantRole/index.js +0 -4
- package/dist/src/staking/roles/grantRole/v0/grantRole.d.ts +0 -63
- package/dist/src/staking/roles/grantRole/v0/grantRole.d.ts.map +0 -1
- package/dist/src/staking/roles/grantRole/v0/grantRole.js +0 -40
- package/dist/src/staking/roles/index.d.ts +0 -93
- package/dist/src/staking/roles/index.d.ts.map +0 -1
- package/dist/src/staking/roles/index.js +0 -14
- package/dist/src/staking/roles/searchRoleEvents/index.d.ts +0 -27
- package/dist/src/staking/roles/searchRoleEvents/index.d.ts.map +0 -1
- package/dist/src/staking/roles/searchRoleEvents/index.js +0 -4
- package/dist/src/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +0 -63
- package/dist/src/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +0 -1
- package/dist/src/staking/roles/searchRoleEvents/v0/searchRoleEvents.js +0 -58
- package/dist/src/staking/roles/searchRoles/index.d.ts +0 -27
- package/dist/src/staking/roles/searchRoles/index.d.ts.map +0 -1
- package/dist/src/staking/roles/searchRoles/index.js +0 -4
- package/dist/src/staking/roles/searchRoles/v0/searchRoles.d.ts +0 -63
- package/dist/src/staking/roles/searchRoles/v0/searchRoles.d.ts.map +0 -1
- package/dist/src/staking/roles/searchRoles/v0/searchRoles.js +0 -56
- package/dist/src/staking/stakes/common/stake.d.ts +0 -44
- package/dist/src/staking/stakes/common/stake.d.ts.map +0 -1
- package/dist/src/staking/stakes/common/stake.js +0 -45
- package/dist/src/staking/stakes/common/stakeEvent.d.ts +0 -30
- package/dist/src/staking/stakes/common/stakeEvent.d.ts.map +0 -1
- package/dist/src/staking/stakes/common/stakeEvent.js +0 -24
- package/dist/src/staking/stakes/common/stakeNotFound.d.ts +0 -9
- package/dist/src/staking/stakes/common/stakeNotFound.d.ts.map +0 -1
- package/dist/src/staking/stakes/common/stakeNotFound.js +0 -13
- package/dist/src/staking/stakes/getStake/index.d.ts +0 -20
- package/dist/src/staking/stakes/getStake/index.d.ts.map +0 -1
- package/dist/src/staking/stakes/getStake/index.js +0 -4
- package/dist/src/staking/stakes/getStake/v0/getStake.d.ts +0 -35
- package/dist/src/staking/stakes/getStake/v0/getStake.d.ts.map +0 -1
- package/dist/src/staking/stakes/getStake/v0/getStake.js +0 -64
- package/dist/src/staking/stakes/index.d.ts +0 -63
- package/dist/src/staking/stakes/index.d.ts.map +0 -1
- package/dist/src/staking/stakes/index.js +0 -12
- package/dist/src/staking/stakes/searchStakeEvents/index.d.ts +0 -27
- package/dist/src/staking/stakes/searchStakeEvents/index.d.ts.map +0 -1
- package/dist/src/staking/stakes/searchStakeEvents/index.js +0 -4
- package/dist/src/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +0 -1
- package/dist/src/staking/stakes/searchStakeEvents/v0/searchStakeEvents.js +0 -59
- package/dist/src/staking/stakes/searchStakes/index.d.ts +0 -27
- package/dist/src/staking/stakes/searchStakes/index.d.ts.map +0 -1
- package/dist/src/staking/stakes/searchStakes/index.js +0 -4
- package/dist/src/staking/stakes/searchStakes/v0/searchStakes.d.ts +0 -63
- package/dist/src/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +0 -1
- package/dist/src/staking/stakes/searchStakes/v0/searchStakes.js +0 -61
- package/dist/src/staking-templates/index.d.ts +0 -732
- package/dist/src/staking-templates/index.d.ts.map +0 -1
- package/dist/src/staking-templates/index.js +0 -18
- package/dist/src/staking-templates/templates/common/amount.d.ts +0 -13
- package/dist/src/staking-templates/templates/common/amount.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/amount.js +0 -17
- package/dist/src/staking-templates/templates/common/amountMult.d.ts +0 -3
- package/dist/src/staking-templates/templates/common/amountMult.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/amountMult.js +0 -23
- package/dist/src/staking-templates/templates/common/erc20Input.d.ts +0 -12
- package/dist/src/staking-templates/templates/common/erc20Input.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/erc20Input.js +0 -16
- package/dist/src/staking-templates/templates/common/erc20Reward.d.ts +0 -12
- package/dist/src/staking-templates/templates/common/erc20Reward.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/erc20Reward.js +0 -16
- package/dist/src/staking-templates/templates/common/getCreatePoolEvent.d.ts +0 -31
- package/dist/src/staking-templates/templates/common/getCreatePoolEvent.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/getCreatePoolEvent.js +0 -47
- package/dist/src/staking-templates/templates/common/getPlatformDeployEvent.d.ts +0 -40
- package/dist/src/staking-templates/templates/common/getPlatformDeployEvent.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/getPlatformDeployEvent.js +0 -46
- package/dist/src/staking-templates/templates/common/getReward.d.ts +0 -58
- package/dist/src/staking-templates/templates/common/getReward.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/getReward.js +0 -34
- package/dist/src/staking-templates/templates/common/getStakeEvent.d.ts +0 -31
- package/dist/src/staking-templates/templates/common/getStakeEvent.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/getStakeEvent.js +0 -51
- package/dist/src/staking-templates/templates/common/lock.d.ts +0 -12
- package/dist/src/staking-templates/templates/common/lock.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/lock.js +0 -20
- package/dist/src/staking-templates/templates/common/lockMult.d.ts +0 -3
- package/dist/src/staking-templates/templates/common/lockMult.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/lockMult.js +0 -15
- package/dist/src/staking-templates/templates/common/partialUnstake.d.ts +0 -62
- package/dist/src/staking-templates/templates/common/partialUnstake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/partialUnstake.js +0 -39
- package/dist/src/staking-templates/templates/common/rewardDistribution.d.ts +0 -13
- package/dist/src/staking-templates/templates/common/rewardDistribution.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/rewardDistribution.js +0 -19
- package/dist/src/staking-templates/templates/common/templates.d.ts +0 -61
- package/dist/src/staking-templates/templates/common/templates.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/templates.js +0 -8
- package/dist/src/staking-templates/templates/common/time.d.ts +0 -2
- package/dist/src/staking-templates/templates/common/time.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/time.js +0 -4
- package/dist/src/staking-templates/templates/common/unstake.d.ts +0 -58
- package/dist/src/staking-templates/templates/common/unstake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/common/unstake.js +0 -34
- package/dist/src/staking-templates/templates/reputation/common.d.ts +0 -23
- package/dist/src/staking-templates/templates/reputation/common.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/common.js +0 -3
- package/dist/src/staking-templates/templates/reputation/index.d.ts +0 -233
- package/dist/src/staking-templates/templates/reputation/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/index.js +0 -4
- package/dist/src/staking-templates/templates/reputation/v0/createPlatform.d.ts +0 -81
- package/dist/src/staking-templates/templates/reputation/v0/createPlatform.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/v0/createPlatform.js +0 -56
- package/dist/src/staking-templates/templates/reputation/v0/createPool.d.ts +0 -113
- package/dist/src/staking-templates/templates/reputation/v0/createPool.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/v0/createPool.js +0 -85
- package/dist/src/staking-templates/templates/reputation/v0/index.d.ts +0 -233
- package/dist/src/staking-templates/templates/reputation/v0/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/v0/index.js +0 -25
- package/dist/src/staking-templates/templates/reputation/v0/restake.d.ts +0 -61
- package/dist/src/staking-templates/templates/reputation/v0/restake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/v0/restake.js +0 -40
- package/dist/src/staking-templates/templates/reputation/v0/stake.d.ts +0 -61
- package/dist/src/staking-templates/templates/reputation/v0/stake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputation/v0/stake.js +0 -45
- package/dist/src/staking-templates/templates/reputationLock/common.d.ts +0 -23
- package/dist/src/staking-templates/templates/reputationLock/common.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/common.js +0 -3
- package/dist/src/staking-templates/templates/reputationLock/index.d.ts +0 -244
- package/dist/src/staking-templates/templates/reputationLock/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/index.js +0 -4
- package/dist/src/staking-templates/templates/reputationLock/v0/createPlatform.d.ts +0 -81
- package/dist/src/staking-templates/templates/reputationLock/v0/createPlatform.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/v0/createPlatform.js +0 -56
- package/dist/src/staking-templates/templates/reputationLock/v0/createPool.d.ts +0 -149
- package/dist/src/staking-templates/templates/reputationLock/v0/createPool.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/v0/createPool.js +0 -99
- package/dist/src/staking-templates/templates/reputationLock/v0/index.d.ts +0 -244
- package/dist/src/staking-templates/templates/reputationLock/v0/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/v0/index.js +0 -25
- package/dist/src/staking-templates/templates/reputationLock/v0/restake.d.ts +0 -65
- package/dist/src/staking-templates/templates/reputationLock/v0/restake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/v0/restake.js +0 -44
- package/dist/src/staking-templates/templates/reputationLock/v0/stake.d.ts +0 -65
- package/dist/src/staking-templates/templates/reputationLock/v0/stake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/reputationLock/v0/stake.js +0 -46
- package/dist/src/staking-templates/templates/rwa/common.d.ts +0 -23
- package/dist/src/staking-templates/templates/rwa/common.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/common.js +0 -3
- package/dist/src/staking-templates/templates/rwa/index.d.ts +0 -256
- package/dist/src/staking-templates/templates/rwa/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/index.js +0 -4
- package/dist/src/staking-templates/templates/rwa/v0/createPlatform.d.ts +0 -81
- package/dist/src/staking-templates/templates/rwa/v0/createPlatform.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/createPlatform.js +0 -56
- package/dist/src/staking-templates/templates/rwa/v0/createPool.d.ts +0 -109
- package/dist/src/staking-templates/templates/rwa/v0/createPool.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/createPool.js +0 -79
- package/dist/src/staking-templates/templates/rwa/v0/index.d.ts +0 -256
- package/dist/src/staking-templates/templates/rwa/v0/index.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/index.js +0 -27
- package/dist/src/staking-templates/templates/rwa/v0/notifyRewards.d.ts +0 -61
- package/dist/src/staking-templates/templates/rwa/v0/notifyRewards.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/notifyRewards.js +0 -41
- package/dist/src/staking-templates/templates/rwa/v0/restake.d.ts +0 -61
- package/dist/src/staking-templates/templates/rwa/v0/restake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/restake.js +0 -40
- package/dist/src/staking-templates/templates/rwa/v0/stake.d.ts +0 -61
- package/dist/src/staking-templates/templates/rwa/v0/stake.d.ts.map +0 -1
- package/dist/src/staking-templates/templates/rwa/v0/stake.js +0 -45
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Factory } from "hono/factory";
|
|
2
|
-
import { Env } from "hono";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
export declare const SetFeeCapLimitRequestSchema: z.ZodObject<{
|
|
5
|
-
marketAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
|
|
6
|
-
campaignId: z.ZodBigInt;
|
|
7
|
-
packetsLimit: z.ZodBigInt;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
campaignId: bigint;
|
|
10
|
-
marketAddress: `0x${string}`;
|
|
11
|
-
packetsLimit: bigint;
|
|
12
|
-
}, {
|
|
13
|
-
campaignId: bigint;
|
|
14
|
-
marketAddress: `0x${string}`;
|
|
15
|
-
packetsLimit: bigint;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function createSetFeeCapLimitTransactionV0<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
|
|
18
|
-
data: `0x${string}`;
|
|
19
|
-
to: `0x${string}`;
|
|
20
|
-
details: {
|
|
21
|
-
functionName: string;
|
|
22
|
-
address: `0x${string}`;
|
|
23
|
-
abi: any[];
|
|
24
|
-
args: any[];
|
|
25
|
-
};
|
|
26
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<Env, string, {
|
|
27
|
-
in: {
|
|
28
|
-
json: {
|
|
29
|
-
campaignId: bigint;
|
|
30
|
-
marketAddress: `0x${string}`;
|
|
31
|
-
packetsLimit: bigint;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
out: {
|
|
35
|
-
json: {
|
|
36
|
-
campaignId: bigint;
|
|
37
|
-
marketAddress: `0x${string}`;
|
|
38
|
-
packetsLimit: bigint;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
42
|
-
data: `0x${string}`;
|
|
43
|
-
to: `0x${string}`;
|
|
44
|
-
details: {
|
|
45
|
-
functionName: string;
|
|
46
|
-
address: `0x${string}`;
|
|
47
|
-
abi: any[];
|
|
48
|
-
args: any[];
|
|
49
|
-
};
|
|
50
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
|
|
51
|
-
in: {
|
|
52
|
-
json: {
|
|
53
|
-
campaignId: bigint;
|
|
54
|
-
marketAddress: `0x${string}`;
|
|
55
|
-
packetsLimit: bigint;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
out: {
|
|
59
|
-
json: {
|
|
60
|
-
campaignId: bigint;
|
|
61
|
-
marketAddress: `0x${string}`;
|
|
62
|
-
packetsLimit: bigint;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
66
|
-
data: `0x${string}`;
|
|
67
|
-
to: `0x${string}`;
|
|
68
|
-
details: {
|
|
69
|
-
functionName: string;
|
|
70
|
-
address: `0x${string}`;
|
|
71
|
-
abi: any[];
|
|
72
|
-
args: any[];
|
|
73
|
-
};
|
|
74
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
|
|
75
|
-
//# sourceMappingURL=setFeeCapLimit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setFeeCapLimit.d.ts","sourceRoot":"","sources":["../../../../src/fractions/sales/setFeeCapLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAItC,CAAC;AAkBH,wBAAgB,iCAAiC,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAUnF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi/zod";
|
|
3
|
-
import { AddressSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { setFeeCapLimit } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
6
|
-
export const SetFeeCapLimitRequestSchema = z.object({
|
|
7
|
-
marketAddress: AddressSchema,
|
|
8
|
-
campaignId: z.coerce.bigint().nonnegative(),
|
|
9
|
-
packetsLimit: z.coerce.bigint().nonnegative(),
|
|
10
|
-
});
|
|
11
|
-
const route = describeRoute({
|
|
12
|
-
summary: "Set fee cap limit",
|
|
13
|
-
description: "Returns transaction data for setting the fee cap limit",
|
|
14
|
-
tags: ["Fractions"],
|
|
15
|
-
responses: {
|
|
16
|
-
200: {
|
|
17
|
-
description: "Returns transaction data for setting the fee cap limit",
|
|
18
|
-
content: {
|
|
19
|
-
"application/json": {
|
|
20
|
-
schema: resolver(TransactionSchema),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
export function createSetFeeCapLimitTransactionV0(factory) {
|
|
27
|
-
return factory.createHandlers(route, validator("json", SetFeeCapLimitRequestSchema.openapi({ ref: "SetFeeCapLimitRequestSchema" })), async (c) => {
|
|
28
|
-
const { marketAddress, campaignId, packetsLimit } = c.req.valid("json");
|
|
29
|
-
const tx = setFeeCapLimit(marketAddress, campaignId, packetsLimit);
|
|
30
|
-
return c.json(toTransaction(tx));
|
|
31
|
-
});
|
|
32
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
|
-
import { Factory } from "hono/factory";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
export declare const UnlockWrappedAssetsRequestSchema: z.ZodObject<{
|
|
5
|
-
market: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
|
|
6
|
-
campaignId: z.ZodBigInt;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
campaignId: bigint;
|
|
9
|
-
market: `0x${string}`;
|
|
10
|
-
}, {
|
|
11
|
-
campaignId: bigint;
|
|
12
|
-
market: `0x${string}`;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function createUnlockWrappedAssetsTransactionV0<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
|
|
15
|
-
data: `0x${string}`;
|
|
16
|
-
to: `0x${string}`;
|
|
17
|
-
details: {
|
|
18
|
-
functionName: string;
|
|
19
|
-
address: `0x${string}`;
|
|
20
|
-
abi: any[];
|
|
21
|
-
args: any[];
|
|
22
|
-
};
|
|
23
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<Env, string, {
|
|
24
|
-
in: {
|
|
25
|
-
json: {
|
|
26
|
-
campaignId: bigint;
|
|
27
|
-
market: `0x${string}`;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
out: {
|
|
31
|
-
json: {
|
|
32
|
-
campaignId: bigint;
|
|
33
|
-
market: `0x${string}`;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
37
|
-
data: `0x${string}`;
|
|
38
|
-
to: `0x${string}`;
|
|
39
|
-
details: {
|
|
40
|
-
functionName: string;
|
|
41
|
-
address: `0x${string}`;
|
|
42
|
-
abi: any[];
|
|
43
|
-
args: any[];
|
|
44
|
-
};
|
|
45
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
|
|
46
|
-
in: {
|
|
47
|
-
json: {
|
|
48
|
-
campaignId: bigint;
|
|
49
|
-
market: `0x${string}`;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
out: {
|
|
53
|
-
json: {
|
|
54
|
-
campaignId: bigint;
|
|
55
|
-
market: `0x${string}`;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
59
|
-
data: `0x${string}`;
|
|
60
|
-
to: `0x${string}`;
|
|
61
|
-
details: {
|
|
62
|
-
functionName: string;
|
|
63
|
-
address: `0x${string}`;
|
|
64
|
-
abi: any[];
|
|
65
|
-
args: any[];
|
|
66
|
-
};
|
|
67
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
|
|
68
|
-
//# sourceMappingURL=unlockWrappedAssets.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unlockWrappedAssets.route.d.ts","sourceRoot":"","sources":["../../../../src/fractions/sales/unlockWrappedAssets.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC;;;;;;;;;EAG3C,CAAC;AAkBH,wBAAgB,sCAAsC,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAUxF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi/zod";
|
|
3
|
-
import { unlockWrappedAssets } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
4
|
-
import { AddressSchema, toTransaction, TransactionSchema } from "../../common/index.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
export const UnlockWrappedAssetsRequestSchema = z.object({
|
|
7
|
-
market: AddressSchema,
|
|
8
|
-
campaignId: z.coerce.bigint(),
|
|
9
|
-
});
|
|
10
|
-
const route = describeRoute({
|
|
11
|
-
summary: "Unlock wrapped assets from a non-funded sale",
|
|
12
|
-
description: "Returns transaction to unlock wrapped assets from a non-funded sale",
|
|
13
|
-
tags: ["Fractions"],
|
|
14
|
-
responses: {
|
|
15
|
-
200: {
|
|
16
|
-
description: "Returns transaction to unlock wrapped assets from a non-funded sale",
|
|
17
|
-
content: {
|
|
18
|
-
"application/json": {
|
|
19
|
-
schema: resolver(TransactionSchema),
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
export function createUnlockWrappedAssetsTransactionV0(factory) {
|
|
26
|
-
return factory.createHandlers(route, validator("json", UnlockWrappedAssetsRequestSchema.openapi({ ref: "UnlockWrappedAssetsRequestSchema" })), async (c) => {
|
|
27
|
-
const { market, campaignId } = c.req.valid("json");
|
|
28
|
-
const tx = unlockWrappedAssets(market, campaignId);
|
|
29
|
-
return c.json(toTransaction(tx));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/fractions/sales/vesting/index.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { Factory } from "hono/factory";
|
|
3
|
-
import { Env } from "hono";
|
|
4
|
-
export declare const ClaimVestedTokensRequestSchema: z.ZodObject<{
|
|
5
|
-
address: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
|
|
6
|
-
campaignId: z.ZodBigInt;
|
|
7
|
-
amountOfFractions: z.ZodBigInt;
|
|
8
|
-
itToBurn: z.ZodBigInt;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
address: `0x${string}`;
|
|
11
|
-
campaignId: bigint;
|
|
12
|
-
amountOfFractions: bigint;
|
|
13
|
-
itToBurn: bigint;
|
|
14
|
-
}, {
|
|
15
|
-
address: `0x${string}`;
|
|
16
|
-
campaignId: bigint;
|
|
17
|
-
amountOfFractions: bigint;
|
|
18
|
-
itToBurn: bigint;
|
|
19
|
-
}>;
|
|
20
|
-
export declare function createClaimVestedTokensTransaction<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<(Response & import("hono").TypedResponse<{
|
|
21
|
-
data: `0x${string}`;
|
|
22
|
-
to: `0x${string}`;
|
|
23
|
-
details: {
|
|
24
|
-
functionName: string;
|
|
25
|
-
address: `0x${string}`;
|
|
26
|
-
abi: any[];
|
|
27
|
-
args: any[];
|
|
28
|
-
};
|
|
29
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
30
|
-
error: string;
|
|
31
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
32
|
-
error: string;
|
|
33
|
-
}, 500, "json">)>>, import("hono/types").H<Env, string, {
|
|
34
|
-
in: {
|
|
35
|
-
json: {
|
|
36
|
-
address: `0x${string}`;
|
|
37
|
-
campaignId: bigint;
|
|
38
|
-
amountOfFractions: bigint;
|
|
39
|
-
itToBurn: bigint;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
out: {
|
|
43
|
-
json: {
|
|
44
|
-
address: `0x${string}`;
|
|
45
|
-
campaignId: bigint;
|
|
46
|
-
amountOfFractions: bigint;
|
|
47
|
-
itToBurn: bigint;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
}, Promise<(Response & import("hono").TypedResponse<{
|
|
51
|
-
data: `0x${string}`;
|
|
52
|
-
to: `0x${string}`;
|
|
53
|
-
details: {
|
|
54
|
-
functionName: string;
|
|
55
|
-
address: `0x${string}`;
|
|
56
|
-
abi: any[];
|
|
57
|
-
args: any[];
|
|
58
|
-
};
|
|
59
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
60
|
-
error: string;
|
|
61
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
62
|
-
error: string;
|
|
63
|
-
}, 500, "json">)>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
|
|
64
|
-
in: {
|
|
65
|
-
json: {
|
|
66
|
-
address: `0x${string}`;
|
|
67
|
-
campaignId: bigint;
|
|
68
|
-
amountOfFractions: bigint;
|
|
69
|
-
itToBurn: bigint;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
out: {
|
|
73
|
-
json: {
|
|
74
|
-
address: `0x${string}`;
|
|
75
|
-
campaignId: bigint;
|
|
76
|
-
amountOfFractions: bigint;
|
|
77
|
-
itToBurn: bigint;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}, Promise<(Response & import("hono").TypedResponse<{
|
|
81
|
-
data: `0x${string}`;
|
|
82
|
-
to: `0x${string}`;
|
|
83
|
-
details: {
|
|
84
|
-
functionName: string;
|
|
85
|
-
address: `0x${string}`;
|
|
86
|
-
abi: any[];
|
|
87
|
-
args: any[];
|
|
88
|
-
};
|
|
89
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
90
|
-
error: string;
|
|
91
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
92
|
-
error: string;
|
|
93
|
-
}, 500, "json">)>>];
|
|
94
|
-
//# sourceMappingURL=claimVestedTokens.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claimVestedTokens.route.d.ts","sourceRoot":"","sources":["../../../../../../src/fractions/sales/vesting/v0/claimVestedTokens.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAG3B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAKzC,CAAC;AAkBH,wBAAgB,kCAAkC,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkBpF"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AddressSchema, toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
3
|
-
import { describeRoute } from "hono-openapi";
|
|
4
|
-
import { resolver, validator } from "hono-openapi/zod";
|
|
5
|
-
import { claimVestedTokens } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
6
|
-
export const ClaimVestedTokensRequestSchema = z.object({
|
|
7
|
-
address: AddressSchema,
|
|
8
|
-
campaignId: z.coerce.bigint().positive(),
|
|
9
|
-
amountOfFractions: z.coerce.bigint().positive(),
|
|
10
|
-
itToBurn: z.coerce.bigint().nonnegative(),
|
|
11
|
-
});
|
|
12
|
-
const route = describeRoute({
|
|
13
|
-
summary: "Claim vested tokens",
|
|
14
|
-
description: "Returns transaction data for claiming vested tokens from a campaign",
|
|
15
|
-
tags: ["Fractions Vesting"],
|
|
16
|
-
responses: {
|
|
17
|
-
200: {
|
|
18
|
-
description: "Returns transaction data for claiming vested tokens",
|
|
19
|
-
content: {
|
|
20
|
-
"application/json": {
|
|
21
|
-
schema: resolver(TransactionSchema),
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
export function createClaimVestedTokensTransaction(factory) {
|
|
28
|
-
return factory.createHandlers(route, validator("json", ClaimVestedTokensRequestSchema.openapi({ ref: "ClaimVestedTokensRequestSchema" })), async (c) => {
|
|
29
|
-
const request = c.req.valid("json");
|
|
30
|
-
try {
|
|
31
|
-
const tx = claimVestedTokens(request);
|
|
32
|
-
return c.json(toTransaction(tx));
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
if (error instanceof Error) {
|
|
36
|
-
return c.json({ error: error.message }, 400);
|
|
37
|
-
}
|
|
38
|
-
return c.json({ error: "An unknown error occurred" }, 500);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Factory } from "hono/factory";
|
|
2
|
-
import { Env } from "hono";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
export declare const EditCliffRequestSchema: z.ZodObject<{
|
|
5
|
-
marketAddress: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>;
|
|
6
|
-
saleId: z.ZodBigInt;
|
|
7
|
-
newCliffDate: z.ZodDate;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
saleId: bigint;
|
|
10
|
-
marketAddress: `0x${string}`;
|
|
11
|
-
newCliffDate: Date;
|
|
12
|
-
}, {
|
|
13
|
-
saleId: bigint;
|
|
14
|
-
marketAddress: `0x${string}`;
|
|
15
|
-
newCliffDate: Date;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function createEditCliffTransactionApp<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<(Response & import("hono").TypedResponse<{
|
|
18
|
-
data: `0x${string}`;
|
|
19
|
-
to: `0x${string}`;
|
|
20
|
-
details: {
|
|
21
|
-
functionName: string;
|
|
22
|
-
address: `0x${string}`;
|
|
23
|
-
abi: any[];
|
|
24
|
-
args: any[];
|
|
25
|
-
};
|
|
26
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
27
|
-
error: string;
|
|
28
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
29
|
-
error: string;
|
|
30
|
-
}, 500, "json">)>>, import("hono/types").H<Env, string, {
|
|
31
|
-
in: {
|
|
32
|
-
json: {
|
|
33
|
-
saleId: bigint;
|
|
34
|
-
marketAddress: `0x${string}`;
|
|
35
|
-
newCliffDate: Date;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
out: {
|
|
39
|
-
json: {
|
|
40
|
-
saleId: bigint;
|
|
41
|
-
marketAddress: `0x${string}`;
|
|
42
|
-
newCliffDate: Date;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
}, Promise<(Response & import("hono").TypedResponse<{
|
|
46
|
-
data: `0x${string}`;
|
|
47
|
-
to: `0x${string}`;
|
|
48
|
-
details: {
|
|
49
|
-
functionName: string;
|
|
50
|
-
address: `0x${string}`;
|
|
51
|
-
abi: any[];
|
|
52
|
-
args: any[];
|
|
53
|
-
};
|
|
54
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
55
|
-
error: string;
|
|
56
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
57
|
-
error: string;
|
|
58
|
-
}, 500, "json">)>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
|
|
59
|
-
in: {
|
|
60
|
-
json: {
|
|
61
|
-
saleId: bigint;
|
|
62
|
-
marketAddress: `0x${string}`;
|
|
63
|
-
newCliffDate: Date;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
out: {
|
|
67
|
-
json: {
|
|
68
|
-
saleId: bigint;
|
|
69
|
-
marketAddress: `0x${string}`;
|
|
70
|
-
newCliffDate: Date;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
}, Promise<(Response & import("hono").TypedResponse<{
|
|
74
|
-
data: `0x${string}`;
|
|
75
|
-
to: `0x${string}`;
|
|
76
|
-
details: {
|
|
77
|
-
functionName: string;
|
|
78
|
-
address: `0x${string}`;
|
|
79
|
-
abi: any[];
|
|
80
|
-
args: any[];
|
|
81
|
-
};
|
|
82
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
83
|
-
error: string;
|
|
84
|
-
}, 400, "json">) | (Response & import("hono").TypedResponse<{
|
|
85
|
-
error: string;
|
|
86
|
-
}, 500, "json">)>>];
|
|
87
|
-
//# sourceMappingURL=editCliff.route.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editCliff.route.d.ts","sourceRoot":"","sources":["../../../../../../src/fractions/sales/vesting/v0/editCliff.route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAG3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAkBH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkB/E"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi/zod";
|
|
3
|
-
import { buildEditCliffTx } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
4
|
-
import { AddressSchema, toTransaction, TransactionSchema } from "../../../../common/index.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
export const EditCliffRequestSchema = z.object({
|
|
7
|
-
marketAddress: AddressSchema,
|
|
8
|
-
saleId: z.coerce.bigint().positive(),
|
|
9
|
-
newCliffDate: z.coerce.date(),
|
|
10
|
-
});
|
|
11
|
-
const route = describeRoute({
|
|
12
|
-
summary: "Edit the cliff of a vesting schedule",
|
|
13
|
-
description: "Returns transaction data for updating the cliff date in a vesting schedule",
|
|
14
|
-
tags: ["Fractions Vesting"],
|
|
15
|
-
responses: {
|
|
16
|
-
200: {
|
|
17
|
-
description: "Returns transaction data for editing the cliff date",
|
|
18
|
-
content: {
|
|
19
|
-
"application/json": {
|
|
20
|
-
schema: resolver(TransactionSchema),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
export function createEditCliffTransactionApp(factory) {
|
|
27
|
-
return factory.createHandlers(route, validator("json", EditCliffRequestSchema.openapi({ ref: "EditCliffRequestSchema" })), async (c) => {
|
|
28
|
-
const { marketAddress, saleId, newCliffDate } = c.req.valid("json");
|
|
29
|
-
try {
|
|
30
|
-
const tx = buildEditCliffTx(marketAddress, saleId, newCliffDate);
|
|
31
|
-
return c.json(toTransaction(tx));
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
if (error instanceof Error) {
|
|
35
|
-
return c.json({ error: error.message }, 400);
|
|
36
|
-
}
|
|
37
|
-
return c.json({ error: "An unknown error occurred" }, 500);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
|
-
import { Factory } from "hono/factory";
|
|
3
|
-
export declare function createGetClaimVestedTokensEventRoute<E extends Env>(factory: Factory<E>): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<{
|
|
4
|
-
campaignId: string;
|
|
5
|
-
receiver: `0x${string}`;
|
|
6
|
-
burnId: string;
|
|
7
|
-
nextBurnId: string | null;
|
|
8
|
-
amountOfFractionsBurnt: string;
|
|
9
|
-
}, 200, "json">>>, import("hono/types").H<Env, string, {
|
|
10
|
-
in: {
|
|
11
|
-
query: {
|
|
12
|
-
chainId: "11155111" | "31337";
|
|
13
|
-
hash: `0x${string}`;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
out: {
|
|
17
|
-
query: {
|
|
18
|
-
chainId: "11155111" | "31337";
|
|
19
|
-
hash: `0x${string}`;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
23
|
-
campaignId: string;
|
|
24
|
-
receiver: `0x${string}`;
|
|
25
|
-
burnId: string;
|
|
26
|
-
nextBurnId: string | null;
|
|
27
|
-
amountOfFractionsBurnt: string;
|
|
28
|
-
}, 200, "json">>>, import("hono/types").H<import("hono/utils/types").IfAnyThenEmptyObject<E extends Env ? Env extends E ? {} : E : E> & {}, string, {
|
|
29
|
-
in: {
|
|
30
|
-
query: {
|
|
31
|
-
chainId: "11155111" | "31337";
|
|
32
|
-
hash: `0x${string}`;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
out: {
|
|
36
|
-
query: {
|
|
37
|
-
chainId: "11155111" | "31337";
|
|
38
|
-
hash: `0x${string}`;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
42
|
-
campaignId: string;
|
|
43
|
-
receiver: `0x${string}`;
|
|
44
|
-
burnId: string;
|
|
45
|
-
nextBurnId: string | null;
|
|
46
|
-
amountOfFractionsBurnt: string;
|
|
47
|
-
}, 200, "json">>>];
|
|
48
|
-
//# sourceMappingURL=parseClaimVestedTokensEvent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseClaimVestedTokensEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/fractions/sales/vesting/v0/parseClaimVestedTokensEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAYvC,wBAAgB,oCAAoC,CAAC,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgDtF"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { describeRoute } from "hono-openapi";
|
|
2
|
-
import { resolver, validator } from "hono-openapi/zod";
|
|
3
|
-
import { waitForTransactionReceipt } from "viem/actions";
|
|
4
|
-
import { AddressSchema, SentTransactionParamsSchema } from "../../../../common/index.js";
|
|
5
|
-
import { getPublicClient } from "../../../../common/blockchain.js";
|
|
6
|
-
import { HttpError } from "../../../../common/http-error.js";
|
|
7
|
-
import { z } from "../../../../common/zod.js";
|
|
8
|
-
import { CampaignIdSchema } from "../../../sales/searchSaleEvents/v0/searchSaleEvents.js";
|
|
9
|
-
import { Int256Positive } from "@evergonlabs/tmi-utils/models";
|
|
10
|
-
import { parseClaimVestedTokensEvent } from "@evergonlabs/tmi-protocol-fractions-sdk";
|
|
11
|
-
export function createGetClaimVestedTokensEventRoute(factory) {
|
|
12
|
-
return factory.createHandlers(describeRoute({
|
|
13
|
-
summary: "Get ClaimVestedTokens Event",
|
|
14
|
-
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted with corresponding \`claimVestedTokens\` action`,
|
|
15
|
-
tags: ["Fractions Vesting"],
|
|
16
|
-
responses: {
|
|
17
|
-
200: {
|
|
18
|
-
description: "Returns parsed event log",
|
|
19
|
-
content: {
|
|
20
|
-
"application/json": {
|
|
21
|
-
schema: resolver(z.object({
|
|
22
|
-
campaignId: CampaignIdSchema,
|
|
23
|
-
receiver: AddressSchema,
|
|
24
|
-
burnId: Int256Positive,
|
|
25
|
-
nextBurnId: z.union([Int256Positive, z.null()]),
|
|
26
|
-
amountOfFractionsBurnt: Int256Positive,
|
|
27
|
-
})),
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
}), validator("query", SentTransactionParamsSchema), async (c) => {
|
|
33
|
-
const params = c.req.valid("query");
|
|
34
|
-
const receipt = await waitForTransactionReceipt(getPublicClient(params.chainId), {
|
|
35
|
-
hash: params.hash,
|
|
36
|
-
});
|
|
37
|
-
const result = parseClaimVestedTokensEvent(receipt.logs);
|
|
38
|
-
if (!result) {
|
|
39
|
-
throw new UnableParseClaimVestedTokensEvent();
|
|
40
|
-
}
|
|
41
|
-
const { campaignId, receiver, burnId, nextBurnId, amountOfFractionsBurnt } = result;
|
|
42
|
-
return c.json({
|
|
43
|
-
campaignId: campaignId.toString(),
|
|
44
|
-
receiver: receiver,
|
|
45
|
-
burnId: burnId.toString(),
|
|
46
|
-
nextBurnId: nextBurnId !== null ? nextBurnId.toString() : null,
|
|
47
|
-
amountOfFractionsBurnt: amountOfFractionsBurnt.toString(),
|
|
48
|
-
}, 200);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
class UnableParseClaimVestedTokensEvent extends HttpError {
|
|
52
|
-
constructor() {
|
|
53
|
-
super(500, {
|
|
54
|
-
message: `Can't parse ClaimVestedTokens transaction. Make sure you're passing transaction that is generated by \`claimVestedTokens\` action`,
|
|
55
|
-
name: "UnableParseClaimVestedTokensEvent",
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|