diff --git a/packages/indexer-nibi/src/heart-monitor.ts b/packages/indexer-nibi/src/heart-monitor.ts index eea5203c..a6fa6613 100644 --- a/packages/indexer-nibi/src/heart-monitor.ts +++ b/packages/indexer-nibi/src/heart-monitor.ts @@ -6,18 +6,12 @@ import { DistributionCommission, Governance, MarkPriceCandle, - PerpLeaderboard, PerpMarket, PerpPosition, QueryCommunityPoolArgs, QueryDelegationsArgs, QueryDistributionCommissionsArgs, QueryMarkPriceCandlesArgs, - QueryPerpLeaderboardArgs, - QueryPerpMarketArgs, - QueryPerpMarketsArgs, - QueryPerpPositionArgs, - QueryPerpPositionsArgs, QueryRedelegationsArgs, QuerySpotLpPositionsArgs, QuerySpotPoolCreatedArgs, @@ -70,25 +64,27 @@ import { unbondings, users, validators, -} from "./query" -import { + GqlOutPerp, + PerpFields, + QueryPerpArgs, + perp, + GqlOutStats, + QueryStatsArgs, + StatsFields, + stats, GqlOutGovernance, QueryGovernanceArgs, governance, -} from "./query/governance" -import { GqlOutMarkPriceCandles, markPriceCandles, -} from "./query/markPriceCandles" -import { GqlOutStats, QueryStatsArgs, StatsFields, stats } from "./query/stats" -import { markPriceCandlesSubscription } from "./subscription/markPriceCandlesSubscription" +} from "./query" import { + markPriceCandlesSubscription, GqlOutPerpMarket, perpMarketSubscription, -} from "./subscription/perpMarketSubscription" -import { perpPositionsSubscription } from "./subscription/perpPositionsSubscription" + perpPositionsSubscription, +} from "./subscription" import { queryBatchHandler } from "./batchHandlers/queryBatchHandler" -import { GqlOutPerp, PerpFields, QueryPerpArgs, perp } from "./query/perp" /** IHeartMonitor is an interface for a Heart Monitor GraphQL API. * Each of its methods corresponds to a query function. */ diff --git a/packages/indexer-nibi/src/query/index.ts b/packages/indexer-nibi/src/query/index.ts index 036aef1d..b6a2f0ea 100644 --- a/packages/indexer-nibi/src/query/index.ts +++ b/packages/indexer-nibi/src/query/index.ts @@ -1,10 +1,9 @@ export * from "./communityPool" export * from "./delegations" export * from "./distributionCommissions" -export * from "./perpMarket" -export * from "./perpMarkets" -export * from "./perpPosition" -export * from "./perpPositions" +export * from "./governance" +export * from "./markPriceCandles" +export * from "./perp" export * from "./redelegations" export * from "./spotLpPositions" export * from "./spotPoolCreated" @@ -12,6 +11,7 @@ export * from "./spotPoolExited" export * from "./spotPoolJoined" export * from "./spotPools" export * from "./spotPoolSwap" +export * from "./stats" export * from "./unbondings" export * from "./users" export * from "./validators" diff --git a/packages/indexer-nibi/src/subscription/index.ts b/packages/indexer-nibi/src/subscription/index.ts new file mode 100644 index 00000000..0419516b --- /dev/null +++ b/packages/indexer-nibi/src/subscription/index.ts @@ -0,0 +1,3 @@ +export * from "./markPriceCandlesSubscription" +export * from "./perpMarketSubscription" +export * from "./perpPositionsSubscription" diff --git a/packages/indexer-nibi/src/subscription/markPriceCandlesSubscription.ts b/packages/indexer-nibi/src/subscription/markPriceCandlesSubscription.ts index ae9fb4c8..93ad7d85 100644 --- a/packages/indexer-nibi/src/subscription/markPriceCandlesSubscription.ts +++ b/packages/indexer-nibi/src/subscription/markPriceCandlesSubscription.ts @@ -4,7 +4,7 @@ import { SubscriptionMarkPriceCandlesArgs, } from "../gql/generated" import { gqlQuery, convertObjectToPropertiesString } from "../gql" -import { GqlOutMarkPriceCandles } from "../query/markPriceCandles" +import { GqlOutMarkPriceCandles } from "../query" import { defaultMarkPriceCandles } from "../defaultObjects" export const markPriceCandlesSubscriptionQueryString = ( diff --git a/packages/nibijs/docs/classes/StableSwap.md b/packages/nibijs/docs/classes/StableSwap.md index 888f880d..df6a2ba2 100644 --- a/packages/nibijs/docs/classes/StableSwap.md +++ b/packages/nibijs/docs/classes/StableSwap.md @@ -178,7 +178,7 @@ y() Calculate x[j] if one makes x[i] = x Done by solving quadratic equation iteratively. -x*1**2 + x1 * (sum' - (A*n**n - 1) * D / (A _ n**n)) = D ** (n+1)/(n \*\* (2 _ n) \_ prod' \* A) +x*1\*\*2 + x1 * (sum' - (A*n\*\*n - 1) * D / (A _ n**n)) = D ** (n+1)/(n \*\* (2 _ n) \_ prod' \* A) x_1\*\*2 + b\*x_1 = c x_1 = (x_1\**2 + c) / (2*x_1 + b)