@h0ngcha0/zeta-backend 0.0.1-rc.17 → 0.0.1-rc.18
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/types/api/index.d.ts +3 -2
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/serializers.d.ts +2 -0
- package/dist/types/api/serializers.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +27 -6
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/api/utils.d.ts +6 -0
- package/dist/types/api/utils.d.ts.map +1 -0
- package/dist/types/app.d.ts +246 -2
- package/dist/types/app.d.ts.map +1 -1
- package/dist/types/cron.d.ts +54 -0
- package/dist/types/cron.d.ts.map +1 -0
- package/dist/types/database/clmmPositions.d.ts +28 -0
- package/dist/types/database/clmmPositions.d.ts.map +1 -0
- package/dist/types/database/cpmmPositions.d.ts +16 -0
- package/dist/types/database/cpmmPositions.d.ts.map +1 -0
- package/dist/types/database/mints.d.ts.map +1 -1
- package/dist/types/database/types.d.ts +14 -3
- package/dist/types/database/types.d.ts.map +1 -1
- package/dist/types/lib/error-codes.d.ts +12 -0
- package/dist/types/lib/error-codes.d.ts.map +1 -0
- package/dist/types/lib/errors.d.ts +22 -4
- package/dist/types/lib/errors.d.ts.map +1 -1
- package/dist/types/routes/addresses.d.ts +73 -0
- package/dist/types/routes/addresses.d.ts.map +1 -0
- package/dist/types/routes/compute.d.ts +8 -0
- package/dist/types/routes/compute.d.ts.map +1 -1
- package/dist/types/routes/ohlcv.d.ts +4 -0
- package/dist/types/routes/ohlcv.d.ts.map +1 -1
- package/dist/types/routes/pools.d.ts +36 -0
- package/dist/types/routes/pools.d.ts.map +1 -1
- package/dist/types/routes/response.d.ts +12 -0
- package/dist/types/routes/response.d.ts.map +1 -1
- package/dist/types/routes/stats.d.ts +45 -0
- package/dist/types/routes/stats.d.ts.map +1 -0
- package/dist/types/services/poolEventsSubscriptionService.d.ts.map +1 -1
- package/dist/types/services/poolService.d.ts +16 -5
- package/dist/types/services/poolService.d.ts.map +1 -1
- package/dist/types/services/priceService.d.ts +0 -1
- package/dist/types/services/priceService.d.ts.map +1 -1
- package/dist/types/utils/cacheUtil.d.ts +26 -0
- package/dist/types/utils/cacheUtil.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export type { App } from '../app';
|
|
2
|
-
export type { PoolType, PoolSortType, PoolWithStats, CpmmPoolWithStats, ClmmPoolWithStats, ClmmLiquidityRow, ApiClmmPoolWithStats, ApiCpmmPoolWithStats, ApiPoolWithStats, } from '../services/poolService';
|
|
2
|
+
export type { PoolType, PoolSortType, PoolWithStats, CpmmPoolWithStats, ClmmPoolWithStats, ClmmLiquidityRow, ApiClmmPoolWithStats, ApiCpmmPoolWithStats, ApiPoolWithStats, ApiGlobalStats, } from '../services/poolService';
|
|
3
3
|
export type { TokenPrice } from '../services/priceService';
|
|
4
4
|
export type { LiquidityLineData, OHLVCResult, PeriodicalPoolStats, } from '../services/poolStatsService';
|
|
5
5
|
export type { SwapComputeResult } from '../services/computeService';
|
|
6
6
|
export type { PaginatedApiResponse } from '../routes/response';
|
|
7
7
|
export type { BadRequest, NotFound, ValidationError, InternalServerError } from '../lib/errors';
|
|
8
|
+
export type { ErrorCode, BadRequestErrorCode, NotFoundErrorCode, ValidationErrorCode, InternalErrorCode, } from '../lib/error-codes';
|
|
8
9
|
export type { ClmmLiquidityRowPayload, ClmmLiquidityLinePayload, ApiPoolListResponse, ApiPoolListFromIdsResponse, ApiPoolEventsResponse, TokenListResponse, ApiTokenPricesResponse, } from '../routes/pools';
|
|
9
|
-
export type { ApiClmmPosition } from '../api/types';
|
|
10
|
+
export type { ApiClmmPosition, ApiCpmmPosition, CpmmPosition } from '../api/types';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE/F,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ApiCpmmPosition, CpmmPosition } from '../api/types';
|
|
1
2
|
import type { ApiPoolEvent, PoolEvent } from '../database/types';
|
|
2
3
|
import type { ApiPoolWithStats, PoolWithStats } from '../services/poolService';
|
|
3
4
|
import type { ApiTokenPrice, TokenPrice } from '../services/priceService';
|
|
4
5
|
export declare const serializeTokenPrice: (p: TokenPrice) => ApiTokenPrice;
|
|
5
6
|
export declare const serializePoolWithStats: (p: PoolWithStats) => ApiPoolWithStats;
|
|
6
7
|
export declare const serializePoolEvent: (e: PoolEvent) => ApiPoolEvent;
|
|
8
|
+
export declare const serializeCpmmPosition: (p: CpmmPosition) => ApiCpmmPosition;
|
|
7
9
|
//# sourceMappingURL=serializers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializers.d.ts","sourceRoot":"","sources":["../../../src/api/serializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEzE,eAAO,MAAM,mBAAmB,GAAI,GAAG,UAAU,KAAG,aAMnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,GAAG,aAAa,KAAG,gBAoBzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,GAAG,SAAS,KAAG,YAKjD,CAAC"}
|
|
1
|
+
{"version":3,"file":"serializers.d.ts","sourceRoot":"","sources":["../../../src/api/serializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEzE,eAAO,MAAM,mBAAmB,GAAI,GAAG,UAAU,KAAG,aAMnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,GAAG,aAAa,KAAG,gBAoBzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,GAAG,SAAS,KAAG,YAKjD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,GAAG,YAAY,KAAG,eAYvD,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type { ClmmPoolContractState, ClmmPositionInfo } from '@h0ngcha0/typescript-sdk';
|
|
2
|
-
import type { ClmmPositionRow } from '../database/types';
|
|
3
1
|
import type { TokenInfo } from '@alephium/token-list';
|
|
2
|
+
import type Decimal from 'decimal.js';
|
|
4
3
|
export interface ApiClmmPosition {
|
|
5
4
|
id: string;
|
|
6
5
|
poolId: string;
|
|
7
6
|
configIndex: number;
|
|
8
|
-
txId: string;
|
|
9
7
|
createdAt: string;
|
|
10
|
-
blockHash: string;
|
|
11
8
|
sender: string;
|
|
12
9
|
owner: string;
|
|
13
10
|
token0Info: TokenInfo;
|
|
@@ -17,7 +14,6 @@ export interface ApiClmmPosition {
|
|
|
17
14
|
liquidity: string;
|
|
18
15
|
amount0: string;
|
|
19
16
|
amount1: string;
|
|
20
|
-
totalLiquidity: string;
|
|
21
17
|
sqrtPriceX96: string;
|
|
22
18
|
fee0: string;
|
|
23
19
|
fee1: string;
|
|
@@ -26,5 +22,30 @@ export interface ApiClmmPosition {
|
|
|
26
22
|
avgFees: string;
|
|
27
23
|
avgTime: string;
|
|
28
24
|
}
|
|
29
|
-
export
|
|
25
|
+
export type CpmmPosition = {
|
|
26
|
+
id: string;
|
|
27
|
+
poolId: string;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
contractAddress: string;
|
|
30
|
+
sender: string;
|
|
31
|
+
addedAmount0: Decimal;
|
|
32
|
+
addedAmount1: Decimal;
|
|
33
|
+
addedLiquidity: Decimal;
|
|
34
|
+
share: Decimal;
|
|
35
|
+
currentAmount0: Decimal;
|
|
36
|
+
currentAmount1: Decimal;
|
|
37
|
+
poolTotalSupply: bigint;
|
|
38
|
+
token0Info: TokenInfo;
|
|
39
|
+
token1Info: TokenInfo;
|
|
40
|
+
};
|
|
41
|
+
export interface ApiCpmmPosition extends Omit<CpmmPosition, 'createdAt' | 'addedAmount0' | 'addedAmount1' | 'addedLiquidity' | 'share' | 'currentAmount0' | 'currentAmount1' | 'poolTotalSupply'> {
|
|
42
|
+
createdAt: string;
|
|
43
|
+
addedAmount0: string;
|
|
44
|
+
addedAmount1: string;
|
|
45
|
+
addedLiquidity: string;
|
|
46
|
+
share: string;
|
|
47
|
+
currentAmount0: string;
|
|
48
|
+
currentAmount1: string;
|
|
49
|
+
poolTotalSupply: string;
|
|
50
|
+
}
|
|
30
51
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,YAAY,EACV,WAAW,GACX,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,OAAO,GACP,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,CACpB;IACC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApiClmmPosition, CpmmPosition } from '../api/types';
|
|
2
|
+
import type { ClmmPositionRow, CpmmPositionRow } from '../database/types';
|
|
3
|
+
import type { ClmmPoolContractState, ClmmPositionInfo, CpmmPoolContractState } from '@h0ngcha0/typescript-sdk';
|
|
4
|
+
export declare function buildApiClmmPosition(row: ClmmPositionRow, poolState: ClmmPoolContractState, positionInfo: ClmmPositionInfo): ApiClmmPosition;
|
|
5
|
+
export declare function buildCpmmPosition(row: CpmmPositionRow, poolState: CpmmPoolContractState): CpmmPosition;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/api/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,qBAAqB,EAChC,YAAY,EAAE,gBAAgB,GAC7B,eAAe,CAyBjB;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,qBAAqB,GAC/B,YAAY,CA6Bd"}
|