@evergonlabs/tmi-protocol-api 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +452 -152
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +4 -0
- package/dist/client.d.ts +500 -151
- package/dist/client.d.ts.map +1 -1
- package/dist/common/abis/erc20Whitelisted.d.ts +27 -12
- package/dist/common/abis/erc20Whitelisted.d.ts.map +1 -1
- package/dist/common/abis/erc20Whitelisted.js +192 -1
- package/dist/common/blockchain.d.ts +20 -26
- package/dist/common/blockchain.d.ts.map +1 -1
- package/dist/common/blockchain.js +22 -19
- package/dist/common/config.d.ts +43 -1
- package/dist/common/config.d.ts.map +1 -1
- package/dist/common/config.js +47 -25
- package/dist/common/context.d.ts +11 -0
- package/dist/common/context.d.ts.map +1 -0
- package/dist/common/context.js +0 -0
- package/dist/common/indexer/client.d.ts +3 -2
- package/dist/common/indexer/client.d.ts.map +1 -1
- package/dist/common/indexer/schemas.d.ts +1 -1
- package/dist/common/indexer/schemas.d.ts.map +1 -1
- package/dist/common/middleware/indexer.d.ts +3 -0
- package/dist/common/middleware/indexer.d.ts.map +1 -0
- package/dist/common/middleware/indexer.js +7 -0
- package/dist/common/models/asset.d.ts +4 -4
- package/dist/common/models/chainId.d.ts +3 -0
- package/dist/common/models/chainId.d.ts.map +1 -1
- package/dist/common/models/chainId.js +6 -14
- package/dist/common/models/numOrStr.d.ts +7 -0
- package/dist/common/models/numOrStr.d.ts.map +1 -0
- package/dist/common/models/numOrStr.js +11 -0
- package/dist/common/models/platform.d.ts +1 -1
- package/dist/common/models/platform.d.ts.map +1 -1
- package/dist/common/models/platform.js +1 -1
- package/dist/common/models/routes.d.ts +2 -2
- package/dist/common/models/transaction.d.ts +8 -8
- package/dist/common/models/transaction.d.ts.map +1 -1
- package/dist/common/models/transaction.js +1 -1
- package/dist/fractions/activity/searchActivity.route.d.ts +17 -17
- package/dist/fractions/activity/searchActivity.route.d.ts.map +1 -1
- package/dist/fractions/activity/searchActivity.route.js +1 -2
- package/dist/fractions/activity/utils.d.ts +8 -8
- package/dist/fractions/approveSale/v0/approveSale.route.d.ts +3 -3
- package/dist/fractions/approveWrapper/v0/approveWrapper.route.d.ts +9 -9
- package/dist/fractions/completeSale/v0/completeSale.route.d.ts +3 -3
- package/dist/fractions/createFractions/v0/createFractions.route.d.ts +19 -19
- package/dist/fractions/createFractions/v0/createFractions.schema.d.ts +20 -20
- package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts +25 -12
- package/dist/fractions/deployMarket/v0/deployMarket.routes.d.ts.map +1 -1
- package/dist/fractions/deployMarket/v0/deployMarket.routes.js +3 -2
- package/dist/fractions/deployMarket/v0/index.d.ts +3 -0
- package/dist/fractions/deployMarket/v0/index.d.ts.map +1 -0
- package/dist/fractions/deployMarket/v0/index.js +2 -0
- package/dist/fractions/deployMarket/v0/initNid.route.d.ts +3 -3
- package/dist/fractions/grantRole/v0/grantRole.route.d.ts +3 -3
- package/dist/fractions/index.d.ts +141 -77
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/index.js +5 -3
- package/dist/fractions/markets/common/platform.d.ts +11 -11
- package/dist/fractions/markets/getMarket/index.d.ts +19 -19
- package/dist/fractions/markets/getMarket/index.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/v0/getMarket.d.ts +17 -17
- package/dist/fractions/markets/getMarket/v0/getMarket.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/v0/getMarket.js +1 -2
- package/dist/fractions/markets/index.d.ts +22 -22
- package/dist/fractions/markets/index.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/index.d.ts +5 -5
- package/dist/fractions/markets/searchMarkets/index.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts +13 -13
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/v0/searchMarkets.js +1 -2
- package/dist/fractions/purchase/v0/purchase.route.d.ts +3 -3
- package/dist/fractions/purchase/v0/statistics.route.d.ts +15 -15
- package/dist/fractions/purchase/v0/statistics.route.d.ts.map +1 -1
- package/dist/fractions/purchase/v0/statistics.route.js +3 -3
- package/dist/fractions/sales/common/fractionsSale.d.ts +40 -40
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +13 -13
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.js +3 -3
- package/dist/fractions/sales/getVaultAddress.d.ts +4 -4
- package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
- package/dist/fractions/sales/getVaultAddress.js +3 -3
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +6 -6
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +3 -3
- package/dist/fractions/sales/recoverFractions.d.ts +3 -3
- package/dist/fractions/sales/rejectFractions.d.ts +3 -3
- package/dist/fractions/sales/searchSales/v0/searchSales.d.ts +32 -32
- package/dist/fractions/sales/searchSales/v0/searchSales.d.ts.map +1 -1
- package/dist/fractions/sales/searchSales/v0/searchSales.js +1 -2
- package/dist/fractions/sales/searchWithdrawal.route.d.ts +7 -7
- package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +1 -1
- package/dist/fractions/sales/searchWithdrawal.route.js +1 -2
- package/dist/fractions/sales/setFeeCapLimit.d.ts +3 -3
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts +3 -3
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts +17 -17
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/v0/claimStatistics.route.js +6 -5
- package/dist/fractions/sales/vesting/v0/claimVestedTokens.route.d.ts +9 -9
- package/dist/fractions/sales/vesting/v0/editCliff.route.d.ts +3 -3
- package/dist/fractions/withdraw/v0/withdraw.route.d.ts +3 -3
- package/dist/general/balanceClient.d.ts +6 -6
- package/dist/general/common.d.ts +6 -6
- package/dist/general/estimateGas.d.ts +8 -8
- package/dist/general/getBalance.d.ts +4 -4
- package/dist/general/getBalancesBatch.d.ts +4 -4
- package/dist/general/index.d.ts +5 -5
- package/dist/general/searchBalances.d.ts +4 -4
- package/dist/general/utils/tokenBalance/tokenBalance.d.ts +3 -3
- package/dist/issuance/approve.d.ts +3 -3
- package/dist/issuance/burn.d.ts +3 -3
- package/dist/issuance/deploy.d.ts +7 -0
- package/dist/issuance/deploy.d.ts.map +1 -1
- package/dist/issuance/deploy.js +34 -0
- package/dist/issuance/grantRole.d.ts +9 -9
- package/dist/issuance/index.d.ts +47 -10
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/issuance/index.js +4 -1
- package/dist/issuance/mint.d.ts +3 -3
- package/dist/issuance/recover.d.ts +82 -0
- package/dist/issuance/recover.d.ts.map +1 -0
- package/dist/issuance/recover.js +38 -0
- package/dist/issuance/renounceRole.d.ts +9 -9
- package/dist/issuance/transfer.d.ts +9 -9
- package/dist/issuance/upgrade.d.ts +3 -3
- package/dist/staking/index.d.ts +10 -10
- package/dist/staking/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/index.d.ts +3 -3
- package/dist/staking/platforms/getPlatform/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +8 -8
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.js +3 -3
- package/dist/staking/platforms/index.d.ts +3 -3
- package/dist/staking/platforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/index.d.ts +2 -2
- package/dist/staking/platforms/searchPlatforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +4 -4
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.js +3 -3
- package/dist/staking/pools/common/pool.d.ts +4 -4
- package/dist/staking/pools/getPool/index.d.ts +3 -3
- package/dist/staking/pools/getPool/index.d.ts.map +1 -1
- package/dist/staking/pools/getPool/v0/getPool.d.ts +7 -7
- package/dist/staking/pools/getPool/v0/getPool.d.ts.map +1 -1
- package/dist/staking/pools/getPool/v0/getPool.js +3 -3
- package/dist/staking/pools/index.d.ts +3 -3
- package/dist/staking/pools/index.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/index.d.ts +2 -2
- package/dist/staking/pools/searchPools/index.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +3 -3
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.js +3 -3
- package/dist/staking/roles/common/roleAssignment.d.ts +2 -2
- package/dist/staking/roles/common/roleEvent.d.ts +4 -4
- package/dist/staking/roles/grantRole/index.d.ts +1 -1
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts +3 -3
- package/dist/staking/roles/index.d.ts +5 -5
- package/dist/staking/roles/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/index.d.ts +3 -3
- package/dist/staking/roles/searchRoleEvents/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +7 -7
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.js +3 -3
- package/dist/staking/roles/searchRoles/index.d.ts +3 -3
- package/dist/staking/roles/searchRoles/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +7 -7
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.js +3 -3
- package/dist/staking/stakes/common/stake.d.ts +2 -2
- package/dist/staking/stakes/common/stakeEvent.d.ts +4 -4
- package/dist/staking/stakes/getStake/index.d.ts +3 -3
- package/dist/staking/stakes/getStake/index.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/v0/getStake.d.ts +7 -7
- package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/v0/getStake.js +3 -3
- package/dist/staking/stakes/index.d.ts +5 -5
- package/dist/staking/stakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +3 -3
- package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +7 -7
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.js +3 -3
- package/dist/staking/stakes/searchStakes/index.d.ts +3 -3
- package/dist/staking/stakes/searchStakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +7 -7
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/v0/searchStakes.js +3 -3
- package/dist/staking-templates/index.d.ts +42 -42
- package/dist/staking-templates/templates/common/getReward.d.ts +7 -7
- package/dist/staking-templates/templates/common/partialUnstake.d.ts +7 -7
- package/dist/staking-templates/templates/common/rewardDistribution.js +2 -2
- package/dist/staking-templates/templates/common/unstake.d.ts +7 -7
- package/dist/staking-templates/templates/reputation/index.d.ts +13 -13
- package/dist/staking-templates/templates/reputation/v0/createPlatform.d.ts +3 -3
- package/dist/staking-templates/templates/reputation/v0/createPool.d.ts +7 -7
- package/dist/staking-templates/templates/reputation/v0/index.d.ts +13 -13
- package/dist/staking-templates/templates/reputation/v0/restake.d.ts +7 -7
- package/dist/staking-templates/templates/reputation/v0/stake.d.ts +7 -7
- package/dist/staking-templates/templates/reputationLock/index.d.ts +13 -13
- package/dist/staking-templates/templates/reputationLock/v0/createPlatform.d.ts +3 -3
- package/dist/staking-templates/templates/reputationLock/v0/createPool.d.ts +7 -7
- package/dist/staking-templates/templates/reputationLock/v0/index.d.ts +13 -13
- package/dist/staking-templates/templates/reputationLock/v0/restake.d.ts +7 -7
- package/dist/staking-templates/templates/reputationLock/v0/stake.d.ts +7 -7
- package/dist/staking-templates/templates/rwa/index.d.ts +16 -16
- package/dist/staking-templates/templates/rwa/v0/createPlatform.d.ts +3 -3
- package/dist/staking-templates/templates/rwa/v0/createPool.d.ts +7 -7
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts +61 -0
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.d.ts.map +1 -0
- package/dist/staking-templates/templates/rwa/v0/distributeRewards.js +41 -0
- package/dist/staking-templates/templates/rwa/v0/index.d.ts +16 -16
- package/dist/staking-templates/templates/rwa/v0/index.js +2 -2
- package/dist/staking-templates/templates/rwa/v0/restake.d.ts +7 -7
- package/dist/staking-templates/templates/rwa/v0/stake.d.ts +7 -7
- package/dist/v0/fractions/index.d.ts +68 -0
- package/dist/v0/fractions/index.d.ts.map +1 -0
- package/dist/v0/fractions/index.js +9 -0
- package/dist/v0/fractions/networkStatistics.route.d.ts +176 -0
- package/dist/v0/fractions/networkStatistics.route.d.ts.map +1 -0
- package/dist/v0/fractions/networkStatistics.route.js +354 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts +65 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/buyback/buyback.routes.js +27 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts +19 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.d.ts.map +1 -0
- package/dist/v1/fractions/lending/buyback/buyback.schema.js +12 -0
- package/dist/v1/fractions/lending/createLendingSale.d.ts +585 -0
- package/dist/v1/fractions/lending/createLendingSale.d.ts.map +1 -0
- package/dist/v1/fractions/lending/createLendingSale.js +81 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts +117 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/deployMarket/lending.routes.js +35 -0
- package/dist/v1/fractions/lending/index.d.ts +209 -0
- package/dist/v1/fractions/lending/index.d.ts.map +1 -0
- package/dist/v1/fractions/lending/index.js +22 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts +82 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -0
- package/dist/v1/fractions/lending/purchase/directPurchase.route.js +34 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +61 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.routes.js +27 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts +16 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.d.ts.map +1 -0
- package/dist/v1/fractions/lending/setCollateralPrice/setCollateralPrice.schema.js +10 -0
- package/dist/v1/fractions/schemas.d.ts +108 -0
- package/dist/v1/fractions/schemas.d.ts.map +1 -0
- package/dist/v1/fractions/schemas.js +35 -0
- package/package.json +10 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { describeRoute } from "hono-openapi";
|
|
2
2
|
import { resolver, validator } from "hono-openapi/zod";
|
|
3
3
|
import { and, eq } from "@ponder/client";
|
|
4
|
-
import { indexerClient } from "../../../../common/indexer/index.js";
|
|
5
4
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
6
5
|
import { PageSchema } from "../../../../common/models/page.js";
|
|
7
6
|
import { AddressSchema, StakingChainId } from "../../../../common/index.js";
|
|
@@ -30,8 +29,9 @@ export function createSearchPlatformsV0App(factory, tag) {
|
|
|
30
29
|
}),
|
|
31
30
|
})), async (c) => {
|
|
32
31
|
const { page, filter } = c.req.valid("json");
|
|
33
|
-
const result = await
|
|
34
|
-
.
|
|
32
|
+
const result = await c
|
|
33
|
+
.get("indexerClient")
|
|
34
|
+
.db.select()
|
|
35
35
|
.from(indexerSchemas.diamonds)
|
|
36
36
|
.limit(page.limit)
|
|
37
37
|
.offset(page.skip)
|
|
@@ -9,20 +9,20 @@ export declare const PoolSchema: z.ZodObject<{
|
|
|
9
9
|
poolId: z.ZodPipeline<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodBigInt>;
|
|
10
10
|
createdAt: z.ZodString;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
chainId: "11155111" | "31337";
|
|
13
|
-
platform: `0x${string}`;
|
|
14
12
|
poolId: bigint;
|
|
13
|
+
chainId: "11155111" | "31337";
|
|
15
14
|
rewardsHandler: `0x${string}`;
|
|
16
15
|
txHash: `0x${string}`;
|
|
17
16
|
createdAt: string;
|
|
17
|
+
platform: `0x${string}`;
|
|
18
18
|
assetHandler: `0x${string}`;
|
|
19
19
|
}, {
|
|
20
|
-
chainId: "11155111" | "31337";
|
|
21
|
-
platform: `0x${string}`;
|
|
22
20
|
poolId: string | number | bigint;
|
|
21
|
+
chainId: "11155111" | "31337";
|
|
23
22
|
rewardsHandler: `0x${string}`;
|
|
24
23
|
txHash: `0x${string}`;
|
|
25
24
|
createdAt: string;
|
|
25
|
+
platform: `0x${string}`;
|
|
26
26
|
assetHandler: `0x${string}`;
|
|
27
27
|
}>;
|
|
28
28
|
export declare function mapToPool(raw: typeof indexerSchemas.pools.$inferSelect): z.output<typeof PoolSchema>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppContext } from "../../../common/context.js";
|
|
2
2
|
import { Factory } from "hono/factory";
|
|
3
3
|
import { ITag } from "../../../common/tag.js";
|
|
4
|
-
export declare function createGetPoolApp
|
|
4
|
+
export declare function createGetPoolApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
|
|
5
5
|
"/v0": {
|
|
6
6
|
$get: {
|
|
7
7
|
input: {
|
|
8
8
|
query: {
|
|
9
|
+
poolId: string | string[];
|
|
9
10
|
chainId: string | string[];
|
|
10
11
|
platform: string | string[];
|
|
11
|
-
poolId: string | string[];
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
output: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/pools/getPool/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/pools/getPool/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;QAEvE"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { Factory } from "hono/factory";
|
|
2
|
-
import { Env } from "hono";
|
|
3
2
|
import { ITag } from "../../../../common/tag.js";
|
|
4
|
-
|
|
3
|
+
import { AppContext } from "../../../../common/context.js";
|
|
4
|
+
export declare function createGetPoolV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
|
|
5
5
|
in: {
|
|
6
6
|
query: {
|
|
7
|
+
poolId: string | string[];
|
|
7
8
|
chainId: string | string[];
|
|
8
9
|
platform: string | string[];
|
|
9
|
-
poolId: string | string[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
out: {
|
|
13
13
|
query: {
|
|
14
|
+
poolId: bigint;
|
|
14
15
|
chainId: "11155111" | "31337";
|
|
15
16
|
platform: `0x${string}`;
|
|
16
|
-
poolId: bigint;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<
|
|
19
|
+
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<AppContext, string, {
|
|
20
20
|
in: {
|
|
21
21
|
query: {
|
|
22
|
+
poolId: string | string[];
|
|
22
23
|
chainId: string | string[];
|
|
23
24
|
platform: string | string[];
|
|
24
|
-
poolId: string | string[];
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
out: {
|
|
28
28
|
query: {
|
|
29
|
+
poolId: bigint;
|
|
29
30
|
chainId: "11155111" | "31337";
|
|
30
31
|
platform: `0x${string}`;
|
|
31
|
-
poolId: bigint;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPool.d.ts","sourceRoot":"","sources":["../../../../../src/staking/pools/getPool/v0/getPool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"getPool.d.ts","sourceRoot":"","sources":["../../../../../src/staking/pools/getPool/v0/getPool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAsEzE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { and, eq } from "@ponder/client";
|
|
2
2
|
import { describeRoute } from "hono-openapi";
|
|
3
3
|
import { resolver, validator } from "hono-openapi/zod";
|
|
4
|
-
import { indexerClient } from "../../../../common/indexer/index.js";
|
|
5
4
|
import { z } from "../../../../common/zod.js";
|
|
6
5
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
7
6
|
import { ErrorSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../../../common/index.js";
|
|
@@ -51,8 +50,9 @@ export function createGetPoolV0App(factory, tag) {
|
|
|
51
50
|
}),
|
|
52
51
|
})), async (c) => {
|
|
53
52
|
const { chainId, platform, poolId } = c.req.valid("query");
|
|
54
|
-
const [pool] = await
|
|
55
|
-
.
|
|
53
|
+
const [pool] = await c
|
|
54
|
+
.get("indexerClient")
|
|
55
|
+
.db.select()
|
|
56
56
|
.from(indexerSchemas.pools)
|
|
57
57
|
.limit(1)
|
|
58
58
|
.where(and(eq(indexerSchemas.pools.chainId, Number(chainId)), eq(indexerSchemas.pools.diamondAddress, platform), eq(indexerSchemas.pools.poolId, poolId)));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
|
-
|
|
2
|
+
import { AppContext } from "../../common/context.js";
|
|
3
|
+
export declare function createPoolsApp(factory: Factory<AppContext>): import("hono/hono-base").HonoBase<AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
4
4
|
"/v0": {
|
|
5
5
|
$post: {
|
|
6
6
|
input: {
|
|
@@ -25,9 +25,9 @@ export declare function createPoolsApp<E extends Env>(factory: Factory<E>): impo
|
|
|
25
25
|
$get: {
|
|
26
26
|
input: {
|
|
27
27
|
query: {
|
|
28
|
+
poolId: string | string[];
|
|
28
29
|
chainId: string | string[];
|
|
29
30
|
platform: string | string[];
|
|
30
|
-
poolId: string | string[];
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
output: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/pools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/pools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAM1D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
2
|
import { ITag } from "../../../common/tag.js";
|
|
4
|
-
|
|
3
|
+
import { AppContext } from "../../../common/context.js";
|
|
4
|
+
export declare function createSearchPoolsApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
|
|
5
5
|
"/v0": {
|
|
6
6
|
$post: {
|
|
7
7
|
input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/pools/searchPools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/pools/searchPools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;QAE3E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
2
|
import { ITag } from "../../../../common/tag.js";
|
|
4
|
-
|
|
3
|
+
import { AppContext } from "../../../../common/context.js";
|
|
4
|
+
export declare function createSearchPoolsV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
|
|
5
5
|
in: {
|
|
6
6
|
json: {
|
|
7
7
|
filter: {
|
|
@@ -26,7 +26,7 @@ export declare function createSearchPoolsV0App<E extends Env>(factory: Factory<E
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<
|
|
29
|
+
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<AppContext, string, {
|
|
30
30
|
in: {
|
|
31
31
|
json: {
|
|
32
32
|
filter: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchPools.d.ts","sourceRoot":"","sources":["../../../../../src/staking/pools/searchPools/v0/searchPools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"searchPools.d.ts","sourceRoot":"","sources":["../../../../../src/staking/pools/searchPools/v0/searchPools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAiD7E"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { describeRoute } from "hono-openapi";
|
|
2
2
|
import { resolver, validator } from "hono-openapi/zod";
|
|
3
3
|
import { and, eq } from "@ponder/client";
|
|
4
|
-
import { indexerClient } from "../../../../common/indexer/index.js";
|
|
5
4
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
6
5
|
import { PageSchema } from "../../../../common/models/page.js";
|
|
7
6
|
import { PlatformContractAddress, StakingChainId } from "../../../../common/index.js";
|
|
@@ -30,8 +29,9 @@ export function createSearchPoolsV0App(factory, tag) {
|
|
|
30
29
|
}),
|
|
31
30
|
})), async (c) => {
|
|
32
31
|
const { page, filter } = c.req.valid("json");
|
|
33
|
-
const result = await
|
|
34
|
-
.
|
|
32
|
+
const result = await c
|
|
33
|
+
.get("indexerClient")
|
|
34
|
+
.db.select()
|
|
35
35
|
.from(indexerSchemas.pools)
|
|
36
36
|
.limit(page.limit)
|
|
37
37
|
.offset(page.skip)
|
|
@@ -9,18 +9,18 @@ export declare const RoleAssignmentSchema: z.ZodObject<{
|
|
|
9
9
|
updatedAt: z.ZodString;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
chainId: "11155111" | "31337";
|
|
12
|
-
platform: `0x${string}`;
|
|
13
12
|
createdAt: string;
|
|
14
13
|
updatedAt: string;
|
|
15
14
|
roleId: `0x${string}`;
|
|
15
|
+
platform: `0x${string}`;
|
|
16
16
|
owner: `0x${string}`;
|
|
17
17
|
poolId?: bigint | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
chainId: "11155111" | "31337";
|
|
20
|
-
platform: `0x${string}`;
|
|
21
20
|
createdAt: string;
|
|
22
21
|
updatedAt: string;
|
|
23
22
|
roleId: `0x${string}`;
|
|
23
|
+
platform: `0x${string}`;
|
|
24
24
|
owner: `0x${string}`;
|
|
25
25
|
poolId?: string | number | bigint | undefined;
|
|
26
26
|
}>;
|
|
@@ -10,20 +10,20 @@ export declare const RoleEventSchema: z.ZodObject<{
|
|
|
10
10
|
isRevoked: z.ZodBoolean;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
chainId: "11155111" | "31337";
|
|
13
|
-
platform: `0x${string}`;
|
|
14
|
-
id: string;
|
|
15
13
|
txHash: `0x${string}`;
|
|
16
14
|
roleId: `0x${string}`;
|
|
15
|
+
id: string;
|
|
17
16
|
isRevoked: boolean;
|
|
17
|
+
platform: `0x${string}`;
|
|
18
18
|
owner: `0x${string}`;
|
|
19
19
|
poolId?: bigint | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
chainId: "11155111" | "31337";
|
|
22
|
-
platform: `0x${string}`;
|
|
23
|
-
id: string;
|
|
24
22
|
txHash: `0x${string}`;
|
|
25
23
|
roleId: `0x${string}`;
|
|
24
|
+
id: string;
|
|
26
25
|
isRevoked: boolean;
|
|
26
|
+
platform: `0x${string}`;
|
|
27
27
|
owner: `0x${string}`;
|
|
28
28
|
poolId?: string | number | bigint | undefined;
|
|
29
29
|
}>;
|
|
@@ -6,8 +6,8 @@ export declare function createGrantRoleV0App<E extends Env>(factory: Factory<E>,
|
|
|
6
6
|
data: `0x${string}`;
|
|
7
7
|
to: `0x${string}`;
|
|
8
8
|
details: {
|
|
9
|
-
functionName: string;
|
|
10
9
|
address: `0x${string}`;
|
|
10
|
+
functionName: string;
|
|
11
11
|
abi: any[];
|
|
12
12
|
args: any[];
|
|
13
13
|
};
|
|
@@ -30,8 +30,8 @@ export declare function createGrantRoleV0App<E extends Env>(factory: Factory<E>,
|
|
|
30
30
|
data: `0x${string}`;
|
|
31
31
|
to: `0x${string}`;
|
|
32
32
|
details: {
|
|
33
|
-
functionName: string;
|
|
34
33
|
address: `0x${string}`;
|
|
34
|
+
functionName: string;
|
|
35
35
|
abi: any[];
|
|
36
36
|
args: any[];
|
|
37
37
|
};
|
|
@@ -54,8 +54,8 @@ export declare function createGrantRoleV0App<E extends Env>(factory: Factory<E>,
|
|
|
54
54
|
data: `0x${string}`;
|
|
55
55
|
to: `0x${string}`;
|
|
56
56
|
details: {
|
|
57
|
-
functionName: string;
|
|
58
57
|
address: `0x${string}`;
|
|
58
|
+
functionName: string;
|
|
59
59
|
abi: any[];
|
|
60
60
|
args: any[];
|
|
61
61
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
|
-
|
|
2
|
+
import { AppContext } from "../../common/context.js";
|
|
3
|
+
export declare function createRolesApp(factory: Factory<AppContext>): import("hono/hono-base").HonoBase<AppContext, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
4
4
|
"/v0": {
|
|
5
5
|
$get: {
|
|
6
6
|
input: {};
|
|
@@ -35,8 +35,8 @@ export declare function createRolesApp<E extends Env>(factory: Factory<E>): impo
|
|
|
35
35
|
data: `0x${string}`;
|
|
36
36
|
to: `0x${string}`;
|
|
37
37
|
details: {
|
|
38
|
-
functionName: string;
|
|
39
38
|
address: `0x${string}`;
|
|
39
|
+
functionName: string;
|
|
40
40
|
abi: any[];
|
|
41
41
|
args: any[];
|
|
42
42
|
};
|
|
@@ -51,9 +51,9 @@ export declare function createRolesApp<E extends Env>(factory: Factory<E>): impo
|
|
|
51
51
|
input: {
|
|
52
52
|
json: {
|
|
53
53
|
filter: {
|
|
54
|
+
poolId?: string | number | bigint | undefined;
|
|
54
55
|
chainId?: "11155111" | "31337" | undefined;
|
|
55
56
|
platform?: `0x${string}` | undefined;
|
|
56
|
-
poolId?: string | number | bigint | undefined;
|
|
57
57
|
owner?: `0x${string}` | undefined;
|
|
58
58
|
};
|
|
59
59
|
page: {
|
|
@@ -73,9 +73,9 @@ export declare function createRolesApp<E extends Env>(factory: Factory<E>): impo
|
|
|
73
73
|
input: {
|
|
74
74
|
json: {
|
|
75
75
|
filter: {
|
|
76
|
+
poolId?: string | number | bigint | undefined;
|
|
76
77
|
chainId?: "11155111" | "31337" | undefined;
|
|
77
78
|
platform?: `0x${string}` | undefined;
|
|
78
|
-
poolId?: string | number | bigint | undefined;
|
|
79
79
|
owner?: `0x${string}` | undefined;
|
|
80
80
|
};
|
|
81
81
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/staking/roles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAOrD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAQ1D"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Factory } from "hono/factory";
|
|
2
|
-
import {
|
|
2
|
+
import { AppContext } from "../../../common/context.js";
|
|
3
3
|
import { ITag } from "../../../common/tag.js";
|
|
4
|
-
export declare function createSearchRoleEventsApp
|
|
4
|
+
export declare function createSearchRoleEventsApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
|
|
5
5
|
"/v0": {
|
|
6
6
|
$post: {
|
|
7
7
|
input: {
|
|
8
8
|
json: {
|
|
9
9
|
filter: {
|
|
10
|
+
poolId?: string | number | bigint | undefined;
|
|
10
11
|
chainId?: "11155111" | "31337" | undefined;
|
|
11
12
|
platform?: `0x${string}` | undefined;
|
|
12
|
-
poolId?: string | number | bigint | undefined;
|
|
13
13
|
owner?: `0x${string}` | undefined;
|
|
14
14
|
};
|
|
15
15
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/roles/searchRoleEvents/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/roles/searchRoleEvents/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;QAEhF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
2
|
import { ITag } from "../../../../common/tag.js";
|
|
4
|
-
|
|
3
|
+
import { AppContext } from "../../../../common/context.js";
|
|
4
|
+
export declare function createSearchRoleEventsV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
|
|
5
5
|
in: {
|
|
6
6
|
json: {
|
|
7
7
|
filter: {
|
|
8
|
+
poolId?: string | number | bigint | undefined;
|
|
8
9
|
chainId?: "11155111" | "31337" | undefined;
|
|
9
10
|
platform?: `0x${string}` | undefined;
|
|
10
|
-
poolId?: string | number | bigint | undefined;
|
|
11
11
|
owner?: `0x${string}` | undefined;
|
|
12
12
|
};
|
|
13
13
|
page: {
|
|
@@ -19,9 +19,9 @@ export declare function createSearchRoleEventsV0App<E extends Env>(factory: Fact
|
|
|
19
19
|
out: {
|
|
20
20
|
json: {
|
|
21
21
|
filter: {
|
|
22
|
+
poolId?: bigint | undefined;
|
|
22
23
|
chainId?: "11155111" | "31337" | undefined;
|
|
23
24
|
platform?: `0x${string}` | undefined;
|
|
24
|
-
poolId?: bigint | undefined;
|
|
25
25
|
owner?: `0x${string}` | undefined;
|
|
26
26
|
};
|
|
27
27
|
page: {
|
|
@@ -30,13 +30,13 @@ export declare function createSearchRoleEventsV0App<E extends Env>(factory: Fact
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<
|
|
33
|
+
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<AppContext, string, {
|
|
34
34
|
in: {
|
|
35
35
|
json: {
|
|
36
36
|
filter: {
|
|
37
|
+
poolId?: string | number | bigint | undefined;
|
|
37
38
|
chainId?: "11155111" | "31337" | undefined;
|
|
38
39
|
platform?: `0x${string}` | undefined;
|
|
39
|
-
poolId?: string | number | bigint | undefined;
|
|
40
40
|
owner?: `0x${string}` | undefined;
|
|
41
41
|
};
|
|
42
42
|
page: {
|
|
@@ -48,9 +48,9 @@ export declare function createSearchRoleEventsV0App<E extends Env>(factory: Fact
|
|
|
48
48
|
out: {
|
|
49
49
|
json: {
|
|
50
50
|
filter: {
|
|
51
|
+
poolId?: bigint | undefined;
|
|
51
52
|
chainId?: "11155111" | "31337" | undefined;
|
|
52
53
|
platform?: `0x${string}` | undefined;
|
|
53
|
-
poolId?: bigint | undefined;
|
|
54
54
|
owner?: `0x${string}` | undefined;
|
|
55
55
|
};
|
|
56
56
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchRoleEvents.d.ts","sourceRoot":"","sources":["../../../../../src/staking/roles/searchRoleEvents/v0/searchRoleEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"searchRoleEvents.d.ts","sourceRoot":"","sources":["../../../../../src/staking/roles/searchRoleEvents/v0/searchRoleEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAOjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAuDlF"}
|
|
@@ -2,7 +2,6 @@ import { describeRoute } from "hono-openapi";
|
|
|
2
2
|
import { resolver, validator } from "hono-openapi/zod";
|
|
3
3
|
import { and, eq } from "@ponder/client";
|
|
4
4
|
import { z } from "../../../../common/zod.js";
|
|
5
|
-
import { indexerClient } from "../../../../common/indexer/index.js";
|
|
6
5
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
7
6
|
import { PageSchema } from "../../../../common/models/page.js";
|
|
8
7
|
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../../../common/index.js";
|
|
@@ -32,8 +31,9 @@ export function createSearchRoleEventsV0App(factory, tag) {
|
|
|
32
31
|
}),
|
|
33
32
|
})), async (c) => {
|
|
34
33
|
const { page, filter } = c.req.valid("json");
|
|
35
|
-
const result = await
|
|
36
|
-
.
|
|
34
|
+
const result = await c
|
|
35
|
+
.get("indexerClient")
|
|
36
|
+
.db.select()
|
|
37
37
|
.from(indexerSchemas.roleEvents)
|
|
38
38
|
.limit(page.limit)
|
|
39
39
|
.offset(page.skip)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Factory } from "hono/factory";
|
|
2
|
-
import {
|
|
2
|
+
import { AppContext } from "../../../common/context.js";
|
|
3
3
|
import { ITag } from "../../../common/tag.js";
|
|
4
|
-
export declare function createSearchRolesApp
|
|
4
|
+
export declare function createSearchRolesApp(factory: Factory<AppContext>, tag: ITag): import("hono/hono-base").HonoBase<AppContext, {
|
|
5
5
|
"/v0": {
|
|
6
6
|
$post: {
|
|
7
7
|
input: {
|
|
8
8
|
json: {
|
|
9
9
|
filter: {
|
|
10
|
+
poolId?: string | number | bigint | undefined;
|
|
10
11
|
chainId?: "11155111" | "31337" | undefined;
|
|
11
12
|
platform?: `0x${string}` | undefined;
|
|
12
|
-
poolId?: string | number | bigint | undefined;
|
|
13
13
|
owner?: `0x${string}` | undefined;
|
|
14
14
|
};
|
|
15
15
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/roles/searchRoles/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/staking/roles/searchRoles/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;QAE3E"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Env } from "hono";
|
|
2
1
|
import { Factory } from "hono/factory";
|
|
3
2
|
import { ITag } from "../../../../common/tag.js";
|
|
4
|
-
|
|
3
|
+
import { AppContext } from "../../../../common/context.js";
|
|
4
|
+
export declare function createSearchRolesV0App(factory: Factory<AppContext>, tag: ITag): [import("hono/types").H<any, string, {}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<import("hono").Env, string, {
|
|
5
5
|
in: {
|
|
6
6
|
json: {
|
|
7
7
|
filter: {
|
|
8
|
+
poolId?: string | number | bigint | undefined;
|
|
8
9
|
chainId?: "11155111" | "31337" | undefined;
|
|
9
10
|
platform?: `0x${string}` | undefined;
|
|
10
|
-
poolId?: string | number | bigint | undefined;
|
|
11
11
|
owner?: `0x${string}` | undefined;
|
|
12
12
|
};
|
|
13
13
|
page: {
|
|
@@ -19,9 +19,9 @@ export declare function createSearchRolesV0App<E extends Env>(factory: Factory<E
|
|
|
19
19
|
out: {
|
|
20
20
|
json: {
|
|
21
21
|
filter: {
|
|
22
|
+
poolId?: bigint | undefined;
|
|
22
23
|
chainId?: "11155111" | "31337" | undefined;
|
|
23
24
|
platform?: `0x${string}` | undefined;
|
|
24
|
-
poolId?: bigint | undefined;
|
|
25
25
|
owner?: `0x${string}` | undefined;
|
|
26
26
|
};
|
|
27
27
|
page: {
|
|
@@ -30,13 +30,13 @@ export declare function createSearchRolesV0App<E extends Env>(factory: Factory<E
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<
|
|
33
|
+
}, Promise<Response & import("hono").TypedResponse<never, 200, "json">>>, import("hono/types").H<AppContext, string, {
|
|
34
34
|
in: {
|
|
35
35
|
json: {
|
|
36
36
|
filter: {
|
|
37
|
+
poolId?: string | number | bigint | undefined;
|
|
37
38
|
chainId?: "11155111" | "31337" | undefined;
|
|
38
39
|
platform?: `0x${string}` | undefined;
|
|
39
|
-
poolId?: string | number | bigint | undefined;
|
|
40
40
|
owner?: `0x${string}` | undefined;
|
|
41
41
|
};
|
|
42
42
|
page: {
|
|
@@ -48,9 +48,9 @@ export declare function createSearchRolesV0App<E extends Env>(factory: Factory<E
|
|
|
48
48
|
out: {
|
|
49
49
|
json: {
|
|
50
50
|
filter: {
|
|
51
|
+
poolId?: bigint | undefined;
|
|
51
52
|
chainId?: "11155111" | "31337" | undefined;
|
|
52
53
|
platform?: `0x${string}` | undefined;
|
|
53
|
-
poolId?: bigint | undefined;
|
|
54
54
|
owner?: `0x${string}` | undefined;
|
|
55
55
|
};
|
|
56
56
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchRoles.d.ts","sourceRoot":"","sources":["../../../../../src/staking/roles/searchRoles/v0/searchRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"searchRoles.d.ts","sourceRoot":"","sources":["../../../../../src/staking/roles/searchRoles/v0/searchRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAKvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAOjD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAqD7E"}
|
|
@@ -3,7 +3,6 @@ import { resolver, validator } from "hono-openapi/zod";
|
|
|
3
3
|
import { unixToDate } from "@evergonlabs/tmi-protocol-utils/date";
|
|
4
4
|
import { and, eq } from "@ponder/client";
|
|
5
5
|
import { z } from "../../../../common/zod.js";
|
|
6
|
-
import { indexerClient } from "../../../../common/indexer/index.js";
|
|
7
6
|
import { indexerSchemas } from "../../../../common/indexer/schemas.js";
|
|
8
7
|
import { PageSchema } from "../../../../common/models/page.js";
|
|
9
8
|
import { AddressSchema, PlatformContractAddress, PoolIdSchema, StakingChainId } from "../../../../common/index.js";
|
|
@@ -33,8 +32,9 @@ export function createSearchRolesV0App(factory, tag) {
|
|
|
33
32
|
}),
|
|
34
33
|
})), async (c) => {
|
|
35
34
|
const { page, filter } = c.req.valid("json");
|
|
36
|
-
const result = await
|
|
37
|
-
.
|
|
35
|
+
const result = await c
|
|
36
|
+
.get("indexerClient")
|
|
37
|
+
.db.select()
|
|
38
38
|
.from(indexerSchemas.roles)
|
|
39
39
|
.limit(page.limit)
|
|
40
40
|
.offset(page.skip)
|
|
@@ -15,7 +15,6 @@ export declare const StakeSchema: z.ZodObject<{
|
|
|
15
15
|
updatedAt: z.ZodString;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
chainId: "11155111" | "31337";
|
|
18
|
-
platform: `0x${string}`;
|
|
19
18
|
createdAt: string;
|
|
20
19
|
updatedAt: string;
|
|
21
20
|
stakeId: bigint;
|
|
@@ -24,11 +23,11 @@ export declare const StakeSchema: z.ZodObject<{
|
|
|
24
23
|
isActive: boolean;
|
|
25
24
|
unlockTimestamp: string;
|
|
26
25
|
startTimestamp: string;
|
|
26
|
+
platform: `0x${string}`;
|
|
27
27
|
owner: `0x${string}`;
|
|
28
28
|
poolId?: bigint | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
chainId: "11155111" | "31337";
|
|
31
|
-
platform: `0x${string}`;
|
|
32
31
|
createdAt: string;
|
|
33
32
|
updatedAt: string;
|
|
34
33
|
stakeId: string | number | bigint;
|
|
@@ -37,6 +36,7 @@ export declare const StakeSchema: z.ZodObject<{
|
|
|
37
36
|
isActive: boolean;
|
|
38
37
|
unlockTimestamp: string;
|
|
39
38
|
startTimestamp: string;
|
|
39
|
+
platform: `0x${string}`;
|
|
40
40
|
owner: `0x${string}`;
|
|
41
41
|
poolId?: string | number | bigint | undefined;
|
|
42
42
|
}>;
|