@sui-tracker/shared 1.0.63 → 1.0.65
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/interfaces/IBalanceChange.type.d.ts +3 -6
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/modules/grpc-services/data-center-grpc.service.d.ts +2 -1
- package/dist/modules/grpc-services/data-center-grpc.service.js +13 -0
- package/dist/modules/grpc-services/data-center-grpc.service.js.map +1 -1
- package/dist/modules/grpc-services/swap-order-grpc.service.d.ts +2 -1
- package/dist/modules/grpc-services/swap-order-grpc.service.js +13 -0
- package/dist/modules/grpc-services/swap-order-grpc.service.js.map +1 -1
- package/dist/modules/interfaces/sui-data-center.interface.d.ts +13 -0
- package/dist/modules/interfaces/swap-order.interface.d.ts +74 -41
- package/dist/modules/interfaces/swap-order.interface.js +1 -0
- package/dist/modules/interfaces/swap-order.interface.js.map +1 -1
- package/dist/protos/sui-data-center.proto +32 -10
- package/dist/protos/swap-order.proto +94 -47
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/.env +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Buffer } from
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
2
|
export interface ITokenTransferData {
|
|
3
3
|
coinType: string;
|
|
4
4
|
amount: bigint;
|
|
@@ -8,12 +8,9 @@ export interface ITokenTransferData {
|
|
|
8
8
|
hash: string;
|
|
9
9
|
}
|
|
10
10
|
export interface IBalanceChange {
|
|
11
|
-
amount:
|
|
11
|
+
amount: number;
|
|
12
12
|
coinType: string;
|
|
13
|
-
owner:
|
|
14
|
-
AddressOwner?: string;
|
|
15
|
-
ObjectOwner?: string;
|
|
16
|
-
};
|
|
13
|
+
owner: string;
|
|
17
14
|
tokenAccountHash: Buffer;
|
|
18
15
|
transactionHash: string;
|
|
19
16
|
}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ISwapOrder.type"), exports);
|
|
18
18
|
__exportStar(require("./IBalanceChange.type"), exports);
|
|
19
19
|
__exportStar(require("./IProxy"), exports);
|
|
20
|
+
__exportStar(require("../modules/interfaces/checkpoint.interface"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,2CAAyB;AACzB,6EAA2D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientGrpc } from "@nestjs/microservices";
|
|
2
|
-
import { IGetTopHoldersRequest, IGetTopHoldersResponse, IGetPortfolioRequest, IGetPortfolioResponse, IGetTokenBalanceRequest, IGetTokenBalanceResponse, IGetTotalHolderOfTokenRequest, IGetTotalHolderOfTokenResponse, IGetBubbleMapDataRequest, IGetBubbleMapDataResponse, IGetTokenTransfersResponse, IGetTokenTransfersRequest } from "../interfaces/sui-data-center.interface";
|
|
2
|
+
import { IGetTopHoldersRequest, IGetTopHoldersResponse, IGetPortfolioRequest, IGetPortfolioResponse, IGetTokenBalanceRequest, IGetTokenBalanceResponse, IGetTotalHolderOfTokenRequest, IGetTotalHolderOfTokenResponse, IGetBubbleMapDataRequest, IGetBubbleMapDataResponse, IGetTokenTransfersResponse, IGetTokenTransfersRequest, IGetBalanceOfAccountsRequest, IGetBalanceOfAccountsResponse } from "../interfaces/sui-data-center.interface";
|
|
3
3
|
export declare class DataCenterGrpcService {
|
|
4
4
|
private grpcClient;
|
|
5
5
|
constructor(grpcClient: ClientGrpc);
|
|
@@ -9,4 +9,5 @@ export declare class DataCenterGrpcService {
|
|
|
9
9
|
getTotalHolderOfToken(data: IGetTotalHolderOfTokenRequest): Promise<IGetTotalHolderOfTokenResponse>;
|
|
10
10
|
getBubbleMapData(data: IGetBubbleMapDataRequest): Promise<IGetBubbleMapDataResponse>;
|
|
11
11
|
getTokenTransfers(data: IGetTokenTransfersRequest): Promise<IGetTokenTransfersResponse>;
|
|
12
|
+
getBalanceOfAccounts(data: IGetBalanceOfAccountsRequest): Promise<IGetBalanceOfAccountsResponse>;
|
|
12
13
|
}
|
|
@@ -96,6 +96,19 @@ let DataCenterGrpcService = class DataCenterGrpcService {
|
|
|
96
96
|
}
|
|
97
97
|
return res;
|
|
98
98
|
}
|
|
99
|
+
async getBalanceOfAccounts(data) {
|
|
100
|
+
const dataCenterService = this.grpcClient.getService("DataCenterService");
|
|
101
|
+
const res = await new Promise((resolve, reject) => {
|
|
102
|
+
dataCenterService.getBalanceOfAccounts(data).subscribe({
|
|
103
|
+
next: (response) => resolve(response),
|
|
104
|
+
error: (error) => reject(error),
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
if (!res.success) {
|
|
108
|
+
throw new Error(res.message);
|
|
109
|
+
}
|
|
110
|
+
return res;
|
|
111
|
+
}
|
|
99
112
|
};
|
|
100
113
|
exports.DataCenterGrpcService = DataCenterGrpcService;
|
|
101
114
|
exports.DataCenterGrpcService = DataCenterGrpcService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-center-grpc.service.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/data-center-grpc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;
|
|
1
|
+
{"version":3,"file":"data-center-grpc.service.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/data-center-grpc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;AAqBrD,IAAM,qBAAqB,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jB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAkC;QAC3D,MAAM,iBAAiB,GACrB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAwB,mBAAmB,CAAC,CAAC;QAEzE,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAgC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/E,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC;gBACrD,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACrC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;aAChC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAzIY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;;GAD3B,qBAAqB,CAyIjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientGrpc } from "@nestjs/microservices";
|
|
2
|
-
import { GetNewPoolsRequest, GetNewPoolsResponse, GetPoolRequest, GetPoolResponse, GetCandleChartRequest, GetCandleChartResponse, GetLastSwapOrderResponse, GetLastSwapOrderRequest, GetListPoolsRequest, GetListPoolsResponse, GetPoolTraderStatsRequest, GetPoolTraderStatsResponse } from "../interfaces/swap-order.interface";
|
|
2
|
+
import { GetNewPoolsRequest, GetNewPoolsResponse, GetPoolRequest, GetPoolResponse, GetCandleChartRequest, GetCandleChartResponse, GetLastSwapOrderResponse, GetLastSwapOrderRequest, GetListPoolsRequest, GetListPoolsResponse, GetPoolTraderStatsRequest, GetPoolTraderStatsResponse, GetTopTradersByPoolResponse, GetTopTradersByPoolRequest } from "../interfaces/swap-order.interface";
|
|
3
3
|
export declare class SwapOrderGrpcService {
|
|
4
4
|
private grpcClient;
|
|
5
5
|
private readonly logger;
|
|
@@ -10,4 +10,5 @@ export declare class SwapOrderGrpcService {
|
|
|
10
10
|
getCandleChart(data: GetCandleChartRequest): Promise<GetCandleChartResponse>;
|
|
11
11
|
getLastSwapOrder(data: GetLastSwapOrderRequest): Promise<GetLastSwapOrderResponse>;
|
|
12
12
|
getPoolTraderStats(data: GetPoolTraderStatsRequest): Promise<GetPoolTraderStatsResponse>;
|
|
13
|
+
getTopTradersByPool(data: GetTopTradersByPoolRequest): Promise<GetTopTradersByPoolResponse>;
|
|
13
14
|
}
|
|
@@ -99,6 +99,19 @@ let SwapOrderGrpcService = SwapOrderGrpcService_1 = class SwapOrderGrpcService {
|
|
|
99
99
|
}
|
|
100
100
|
return res;
|
|
101
101
|
}
|
|
102
|
+
async getTopTradersByPool(data) {
|
|
103
|
+
const swapOrderService = this.grpcClient.getService("SwapOrderService");
|
|
104
|
+
const res = await new Promise((resolve, reject) => {
|
|
105
|
+
swapOrderService.getTopTradersByPool(data).subscribe({
|
|
106
|
+
next: (response) => resolve(response),
|
|
107
|
+
error: (error) => reject(error),
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
if (!res.success) {
|
|
111
|
+
throw new Error(res.message);
|
|
112
|
+
}
|
|
113
|
+
return res;
|
|
114
|
+
}
|
|
102
115
|
};
|
|
103
116
|
exports.SwapOrderGrpcService = SwapOrderGrpcService;
|
|
104
117
|
exports.SwapOrderGrpcService = SwapOrderGrpcService = SwapOrderGrpcService_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-order-grpc.service.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/swap-order-grpc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA0E;
|
|
1
|
+
{"version":3,"file":"swap-order-grpc.service.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/swap-order-grpc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA0E;AAsBnE,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAG/B,YAAkC,UAA8B;QAAtB,eAAU,GAAV,UAAU,CAAY;QAF/C,WAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEI,CAAC;IAGrE,KAAK,CAAC,YAAY,CAChB,IAAyB;QAEzB,MAAM,gBAAgB,GACpB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAmB,kBAAkB,CAAC,CAAC;QAEnE,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAC3B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClB,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC;gBAC5C,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACrC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;aAChC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAwB;QACxC,MAAM,gBAAgB,GACpB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAmB,kBAAkB,CAAC,CAAC;QAEnE,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrE,gBAAgB,CAAC,W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 @@ export interface IGetTokenTransfersRequest {
|
|
|
79
79
|
export interface IGetTokenTransfersResponse extends BaseResponse {
|
|
80
80
|
data: ILink[];
|
|
81
81
|
}
|
|
82
|
+
export interface IGetBalanceOfAccountsRequest {
|
|
83
|
+
tokenAddress: string;
|
|
84
|
+
accountAddress: string[];
|
|
85
|
+
}
|
|
86
|
+
export interface IGetBalanceOfAccountsResponse extends BaseResponse {
|
|
87
|
+
data: IBalanceOfAccount[];
|
|
88
|
+
}
|
|
89
|
+
export interface IBalanceOfAccount {
|
|
90
|
+
accountAddress: string;
|
|
91
|
+
balance: string;
|
|
92
|
+
tokenAddress: string;
|
|
93
|
+
}
|
|
82
94
|
export interface ISuiDataCenterService {
|
|
83
95
|
getTopHolders(request: IGetTopHoldersRequest): Observable<IGetTopHoldersResponse>;
|
|
84
96
|
getPortfolio(request: IGetPortfolioRequest): Observable<IGetPortfolioResponse>;
|
|
@@ -86,4 +98,5 @@ export interface ISuiDataCenterService {
|
|
|
86
98
|
getTotalHolderOfToken(request: IGetTotalHolderOfTokenRequest): Observable<IGetTotalHolderOfTokenResponse>;
|
|
87
99
|
getBubbleMapData(request: IGetBubbleMapDataRequest): Observable<IGetBubbleMapDataResponse>;
|
|
88
100
|
getTokenTransfers(request: IGetTokenTransfersRequest): Observable<IGetTokenTransfersResponse>;
|
|
101
|
+
getBalanceOfAccounts(request: IGetBalanceOfAccountsRequest): Observable<IGetBalanceOfAccountsResponse>;
|
|
89
102
|
}
|
|
@@ -28,33 +28,27 @@ export interface PoolData {
|
|
|
28
28
|
currentPrice: string;
|
|
29
29
|
}
|
|
30
30
|
export interface PoolDataDetail {
|
|
31
|
-
id: string;
|
|
32
|
-
tokenA: TokenData;
|
|
33
|
-
tokenB: TokenData;
|
|
34
|
-
aIsBase: boolean;
|
|
35
|
-
reserveA?: number;
|
|
36
|
-
reserveB?: number;
|
|
37
31
|
priceA: number;
|
|
38
32
|
priceB: number;
|
|
39
|
-
poolCreatedTime?: Date;
|
|
40
33
|
dex: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
poolCreatedTime: Date | null;
|
|
35
|
+
tokenA: TokenData;
|
|
36
|
+
tokenB: TokenData;
|
|
37
|
+
pool: string;
|
|
38
|
+
aIsBase: boolean;
|
|
39
|
+
totalVolume: number;
|
|
40
|
+
totalTx: number;
|
|
41
|
+
totalA2b: number;
|
|
42
|
+
totalB2a: number;
|
|
43
|
+
totalMaker: number;
|
|
44
|
+
makerA2b: number;
|
|
45
|
+
makerB2a: number;
|
|
46
|
+
totalVolumeA2b: number;
|
|
47
|
+
totalVolumeB2a: number;
|
|
48
|
+
price5mAgo: number;
|
|
49
|
+
price60mAgo: number;
|
|
50
|
+
price360mAgo: number;
|
|
51
|
+
price1440mAgo: number;
|
|
58
52
|
}
|
|
59
53
|
export interface CandleData {
|
|
60
54
|
t: string;
|
|
@@ -82,15 +76,41 @@ export interface GetPoolRequest {
|
|
|
82
76
|
export interface GetCandleChartRequest {
|
|
83
77
|
pool: string;
|
|
84
78
|
resolution: number;
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
fromTime: number;
|
|
80
|
+
endTime: number;
|
|
87
81
|
type?: 'usd' | 'token';
|
|
88
82
|
}
|
|
83
|
+
export interface ListPool {
|
|
84
|
+
pool: string;
|
|
85
|
+
totalVolume: number;
|
|
86
|
+
totalTx: number;
|
|
87
|
+
totalA2b: number;
|
|
88
|
+
totalB2a: number;
|
|
89
|
+
totalMaker: number;
|
|
90
|
+
makerA2b: number;
|
|
91
|
+
makerB2a: number;
|
|
92
|
+
lastVolume: number;
|
|
93
|
+
lastAmountA: number;
|
|
94
|
+
lastAmountB: number;
|
|
95
|
+
trendingScore: number;
|
|
96
|
+
id: string;
|
|
97
|
+
tokenA: TokenData;
|
|
98
|
+
tokenB: TokenData;
|
|
99
|
+
poolCreatedTime: null;
|
|
100
|
+
priceA: number;
|
|
101
|
+
priceB: number;
|
|
102
|
+
dex: string;
|
|
103
|
+
price5mAgo: number;
|
|
104
|
+
price60mAgo: number;
|
|
105
|
+
price360mAgo: number;
|
|
106
|
+
price1440mAgo: number;
|
|
107
|
+
aIsBase: boolean;
|
|
108
|
+
}
|
|
89
109
|
export interface GetListPoolsResponse extends BaseResponse {
|
|
90
|
-
data:
|
|
110
|
+
data: ListPool;
|
|
91
111
|
}
|
|
92
112
|
export interface GetNewPoolsResponse extends BaseResponse {
|
|
93
|
-
data:
|
|
113
|
+
data: ListPool;
|
|
94
114
|
}
|
|
95
115
|
export interface GetPoolResponse extends BaseResponse {
|
|
96
116
|
data: PoolDataDetail | null;
|
|
@@ -99,27 +119,31 @@ export interface GetCandleChartResponse extends BaseResponse {
|
|
|
99
119
|
data: CandleData[];
|
|
100
120
|
}
|
|
101
121
|
export interface SwapOrderData {
|
|
102
|
-
id: number;
|
|
103
|
-
pool: string;
|
|
104
122
|
trader: string;
|
|
123
|
+
pool: string;
|
|
124
|
+
usdVolume: string;
|
|
125
|
+
usdPrice: string;
|
|
126
|
+
price: string;
|
|
127
|
+
volume: string;
|
|
105
128
|
transactionHash: string;
|
|
129
|
+
swapAt: number;
|
|
130
|
+
type: 'swap' | 'createPool' | 'addLiquidity' | 'removeLiquidity';
|
|
131
|
+
a2b: 'A2B' | 'B2A';
|
|
106
132
|
amountA: string;
|
|
107
133
|
amountB: string;
|
|
108
|
-
|
|
109
|
-
usdPrice: string;
|
|
110
|
-
a2b: boolean;
|
|
111
|
-
type: TradeType;
|
|
112
|
-
liquidity?: string;
|
|
113
|
-
createdAt: string;
|
|
114
|
-
swapAt: string;
|
|
134
|
+
liquidity?: string | null;
|
|
115
135
|
}
|
|
116
136
|
export interface GetLastSwapOrderRequest {
|
|
117
137
|
poolAddress: string;
|
|
118
|
-
|
|
119
|
-
endTime: string;
|
|
138
|
+
toTime: number;
|
|
120
139
|
limit?: number;
|
|
121
|
-
type?:
|
|
122
|
-
|
|
140
|
+
type?: TradeType;
|
|
141
|
+
minAmountA?: number;
|
|
142
|
+
maxAmountA?: number;
|
|
143
|
+
minAmountB?: number;
|
|
144
|
+
maxAmountB?: number;
|
|
145
|
+
minUsdVolume?: number;
|
|
146
|
+
maxUsdVolume?: number;
|
|
123
147
|
}
|
|
124
148
|
export interface GetLastSwapOrderResponse extends BaseResponse {
|
|
125
149
|
data: SwapOrderData[];
|
|
@@ -170,6 +194,14 @@ export interface PoolTraderStatsData {
|
|
|
170
194
|
totalUsdA2b: number;
|
|
171
195
|
totalUsdB2a: number;
|
|
172
196
|
}
|
|
197
|
+
export interface GetTopTradersByPoolRequest {
|
|
198
|
+
pool: string;
|
|
199
|
+
limit: number;
|
|
200
|
+
page: number;
|
|
201
|
+
}
|
|
202
|
+
export interface GetTopTradersByPoolResponse extends BaseResponse {
|
|
203
|
+
data: PoolTraderStatsData[];
|
|
204
|
+
}
|
|
173
205
|
export interface SwapOrderService {
|
|
174
206
|
GetListPools(request: GetListPoolsRequest): Observable<GetListPoolsResponse>;
|
|
175
207
|
getNewPools(request: GetNewPoolsRequest): Observable<GetNewPoolsResponse>;
|
|
@@ -180,4 +212,5 @@ export interface SwapOrderService {
|
|
|
180
212
|
topVolumeTokens(request: GetTopVolumeTokensRequest): Observable<GetTopVolumeTokensResponse>;
|
|
181
213
|
getTokens(request: GetTokensRequest): Observable<GetTokensResponse>;
|
|
182
214
|
getPoolTraderStats(request: GetPoolTraderStatsRequest): Observable<GetPoolTraderStatsResponse>;
|
|
215
|
+
getTopTradersByPool(request: GetTopTradersByPoolRequest): Observable<GetTopTradersByPoolResponse>;
|
|
183
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-order.interface.js","sourceRoot":"","sources":["../../../src/modules/interfaces/swap-order.interface.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"swap-order.interface.js","sourceRoot":"","sources":["../../../src/modules/interfaces/swap-order.interface.ts"],"names":[],"mappings":";;AA4HC,EAAE,CAAA"}
|
|
@@ -16,13 +16,15 @@ service DataCenterService {
|
|
|
16
16
|
rpc GetBubbleMapData (GetBubbleMapDataRequest) returns (GetBubbleMapDataResponse);
|
|
17
17
|
// Gets token transfers for specific token and holders
|
|
18
18
|
rpc GetTokenTransfers (GetTokenTransfersRequest) returns (GetTokenTransfersResponse);
|
|
19
|
+
// Gets balance of multiple accounts for a specific token
|
|
20
|
+
rpc GetBalanceOfAccounts (GetBalanceOfAccountsRequest) returns (GetBalanceOfAccountsResponse);
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
// Request message for getting top holders
|
|
22
24
|
message GetTopHoldersRequest {
|
|
23
25
|
string tokenAddress = 1;
|
|
24
|
-
int32 limit = 2;
|
|
25
|
-
int32 page = 3;
|
|
26
|
+
optional int32 limit = 2;
|
|
27
|
+
optional int32 page = 3;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
// Response message for getting top holders
|
|
@@ -36,7 +38,7 @@ message TopHolder {
|
|
|
36
38
|
string accountAddress = 1;
|
|
37
39
|
string balance = 2;
|
|
38
40
|
string tokenAddress = 3;
|
|
39
|
-
int32 rank = 4;
|
|
41
|
+
optional int32 rank = 4;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
// Request message for getting portfolio
|
|
@@ -54,15 +56,15 @@ message GetPortfolioResponse {
|
|
|
54
56
|
message PortfolioData {
|
|
55
57
|
string accountAddress = 1;
|
|
56
58
|
repeated PortfolioToken portfolio = 2;
|
|
57
|
-
double totalUsdValue = 3;
|
|
59
|
+
optional double totalUsdValue = 3;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
message PortfolioToken {
|
|
61
63
|
string tokenAddress = 1;
|
|
62
64
|
string balance = 2;
|
|
63
|
-
string symbol = 3;
|
|
64
|
-
int32 decimals = 4;
|
|
65
|
-
double usdValue = 5;
|
|
65
|
+
optional string symbol = 3;
|
|
66
|
+
optional int32 decimals = 4;
|
|
67
|
+
optional double usdValue = 5;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
// Request message for getting token balance
|
|
@@ -82,9 +84,9 @@ message TokenBalanceData {
|
|
|
82
84
|
string accountAddress = 1;
|
|
83
85
|
string tokenAddress = 2;
|
|
84
86
|
string balance = 3;
|
|
85
|
-
string symbol = 4;
|
|
86
|
-
int32 decimals = 5;
|
|
87
|
-
double usdValue = 6;
|
|
87
|
+
optional string symbol = 4;
|
|
88
|
+
optional int32 decimals = 5;
|
|
89
|
+
optional double usdValue = 6;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
// Request message for getting total holders of a token
|
|
@@ -146,4 +148,24 @@ message GetTokenTransfersResponse {
|
|
|
146
148
|
bool success = 1;
|
|
147
149
|
string message = 2;
|
|
148
150
|
repeated Link data = 3;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Request message for getting balance of multiple accounts
|
|
154
|
+
message GetBalanceOfAccountsRequest {
|
|
155
|
+
string tokenAddress = 1;
|
|
156
|
+
repeated string accountAddress = 2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Response message for getting balance of multiple accounts
|
|
160
|
+
message GetBalanceOfAccountsResponse {
|
|
161
|
+
bool success = 1;
|
|
162
|
+
string message = 2;
|
|
163
|
+
repeated BalanceOfAccount data = 3;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Balance of account data structure
|
|
167
|
+
message BalanceOfAccount {
|
|
168
|
+
string accountAddress = 1;
|
|
169
|
+
string balance = 2;
|
|
170
|
+
string tokenAddress = 3;
|
|
149
171
|
}
|
|
@@ -13,6 +13,7 @@ service SwapOrderService {
|
|
|
13
13
|
rpc TopVolumeTokens (GetTopVolumeTokensRequest) returns (GetTopVolumeTokensResponse);
|
|
14
14
|
rpc GetTokens (GetTokensRequest) returns (GetTokensResponse);
|
|
15
15
|
rpc GetPoolTraderStats (GetPoolTraderStatsRequest) returns (GetPoolTraderStatsResponse);
|
|
16
|
+
rpc GetTopTradersByPool (GetTopTradersByPoolRequest) returns (GetTopTradersByPoolResponse);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
// Token data structure matching TokenData interface
|
|
@@ -31,14 +32,6 @@ message TokenData {
|
|
|
31
32
|
optional string creator = 12;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
// Stats data structure for PoolDataDetail
|
|
35
|
-
message StatsData {
|
|
36
|
-
map<string, string> volume = 1;
|
|
37
|
-
map<string, string> price = 2;
|
|
38
|
-
map<string, string> totalA2b = 3;
|
|
39
|
-
map<string, string> totalTx = 4;
|
|
40
|
-
map<string, string> totalMakers = 5;
|
|
41
|
-
}
|
|
42
35
|
|
|
43
36
|
// Pool data structure matching PoolData interface
|
|
44
37
|
message PoolData {
|
|
@@ -56,17 +49,55 @@ message PoolData {
|
|
|
56
49
|
|
|
57
50
|
// Pool data detail structure matching PoolDataDetail interface
|
|
58
51
|
message PoolDataDetail {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
52
|
+
double priceA = 1;
|
|
53
|
+
double priceB = 2;
|
|
54
|
+
string dex = 3;
|
|
55
|
+
optional string poolCreatedTime = 4;
|
|
56
|
+
TokenData tokenA = 5;
|
|
57
|
+
TokenData tokenB = 6;
|
|
58
|
+
string pool = 7;
|
|
59
|
+
bool aIsBase = 8;
|
|
60
|
+
double totalVolume = 9;
|
|
61
|
+
int32 totalTx = 10;
|
|
62
|
+
double totalA2b = 11;
|
|
63
|
+
double totalB2a = 12;
|
|
64
|
+
double totalMaker = 13;
|
|
65
|
+
double makerA2b = 14;
|
|
66
|
+
double makerB2a = 15;
|
|
67
|
+
double price5mAgo = 16;
|
|
68
|
+
double price60mAgo = 17;
|
|
69
|
+
double price360mAgo = 18;
|
|
70
|
+
double price1440mAgo = 19;
|
|
71
|
+
double totalVolumeA2b = 20;
|
|
72
|
+
double totalVolumeB2a = 21;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// List pool structure matching ListPool interface
|
|
76
|
+
message ListPool {
|
|
77
|
+
string pool = 1;
|
|
78
|
+
double totalVolume = 2;
|
|
79
|
+
int32 totalTx = 3;
|
|
80
|
+
double totalA2b = 4;
|
|
81
|
+
double totalB2a = 5;
|
|
82
|
+
double totalMaker = 6;
|
|
83
|
+
double makerA2b = 7;
|
|
84
|
+
double makerB2a = 8;
|
|
85
|
+
double lastVolume = 9;
|
|
86
|
+
double lastAmountA = 10;
|
|
87
|
+
double lastAmountB = 11;
|
|
88
|
+
double trendingScore = 12;
|
|
89
|
+
string id = 13;
|
|
90
|
+
TokenData tokenA = 14;
|
|
91
|
+
TokenData tokenB = 15;
|
|
92
|
+
optional string poolCreatedTime = 16;
|
|
93
|
+
double priceA = 17;
|
|
94
|
+
double priceB = 18;
|
|
95
|
+
string dex = 19;
|
|
96
|
+
double price5mAgo = 20;
|
|
97
|
+
double price60mAgo = 21;
|
|
98
|
+
double price360mAgo = 22;
|
|
99
|
+
double price1440mAgo = 23;
|
|
100
|
+
bool aIsBase = 24;
|
|
70
101
|
}
|
|
71
102
|
|
|
72
103
|
// Candle data structure matching CandleData interface
|
|
@@ -81,19 +112,19 @@ message CandleData {
|
|
|
81
112
|
|
|
82
113
|
// Swap order data structure matching SwapOrderData interface
|
|
83
114
|
message SwapOrderData {
|
|
84
|
-
|
|
85
|
-
string pool = 2;
|
|
86
|
-
string
|
|
87
|
-
string
|
|
88
|
-
string
|
|
89
|
-
string
|
|
90
|
-
string
|
|
91
|
-
string
|
|
92
|
-
|
|
93
|
-
string
|
|
94
|
-
|
|
95
|
-
string
|
|
96
|
-
string
|
|
115
|
+
string trader = 1; // LowCardinality(String)
|
|
116
|
+
string pool = 2; // LowCardinality(String)
|
|
117
|
+
string usdVolume = 3; // Decimal(18, 9)
|
|
118
|
+
string usdPrice = 4; // Decimal(18, 9)
|
|
119
|
+
string price = 5; // Decimal(18, 9)
|
|
120
|
+
string volume = 6; // Decimal(18, 9)
|
|
121
|
+
string transactionHash = 7; // FixedString(66)
|
|
122
|
+
string swapAt = 8; // DateTime (ISO string)
|
|
123
|
+
string type = 9; // Enum8: 'swap' | 'createPool' | 'addLiquidity' | 'removeLiquidity'
|
|
124
|
+
string a2b = 10; // Enum8: 'A2B' | 'B2A'
|
|
125
|
+
string amountA = 11; // UInt64
|
|
126
|
+
string amountB = 12; // UInt64
|
|
127
|
+
optional string liquidity = 13; // Nullable(UInt64)
|
|
97
128
|
}
|
|
98
129
|
|
|
99
130
|
// Trending token data structure
|
|
@@ -136,18 +167,22 @@ message GetPoolRequest {
|
|
|
136
167
|
message GetCandleChartRequest {
|
|
137
168
|
string pool = 1;
|
|
138
169
|
int32 resolution = 2;
|
|
139
|
-
|
|
140
|
-
|
|
170
|
+
int64 fromTime = 3;
|
|
171
|
+
int64 endTime = 4;
|
|
141
172
|
optional string type = 5; // 'usd' | 'token'
|
|
142
173
|
}
|
|
143
174
|
|
|
144
175
|
message GetLastSwapOrderRequest {
|
|
145
176
|
string poolAddress = 1;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
optional
|
|
149
|
-
optional
|
|
150
|
-
optional
|
|
177
|
+
int32 toTime = 2;
|
|
178
|
+
optional int32 limit = 3;
|
|
179
|
+
optional string type = 4;
|
|
180
|
+
optional double minAmountA = 5;
|
|
181
|
+
optional double maxAmountA = 6;
|
|
182
|
+
optional double minAmountB = 7;
|
|
183
|
+
optional double maxAmountB = 8;
|
|
184
|
+
optional double minUsdVolume = 9;
|
|
185
|
+
optional double maxUsdVolume = 10;
|
|
151
186
|
}
|
|
152
187
|
|
|
153
188
|
message GetTrendingTokensRequest {
|
|
@@ -167,32 +202,38 @@ message GetPoolTraderStatsRequest {
|
|
|
167
202
|
repeated string traders = 2;
|
|
168
203
|
}
|
|
169
204
|
|
|
205
|
+
message GetTopTradersByPoolRequest {
|
|
206
|
+
string pool = 1;
|
|
207
|
+
int32 limit = 2;
|
|
208
|
+
int32 page = 3;
|
|
209
|
+
}
|
|
210
|
+
|
|
170
211
|
// Pool trader stats data structure matching PoolTraderStatsData interface
|
|
171
212
|
message PoolTraderStatsData {
|
|
172
|
-
string trader =
|
|
173
|
-
double totalTxA2b =
|
|
174
|
-
double totalTxB2a =
|
|
175
|
-
double totalUsdA2b =
|
|
176
|
-
double totalUsdB2a =
|
|
213
|
+
string trader = 1;
|
|
214
|
+
double totalTxA2b = 2;
|
|
215
|
+
double totalTxB2a = 3;
|
|
216
|
+
double totalUsdA2b = 4;
|
|
217
|
+
double totalUsdB2a = 5;
|
|
177
218
|
}
|
|
178
219
|
|
|
179
220
|
// Response messages matching TypeScript interfaces with BaseResponse structure
|
|
180
221
|
message GetListPoolsResponse {
|
|
181
222
|
bool success = 1;
|
|
182
223
|
string message = 2;
|
|
183
|
-
repeated
|
|
224
|
+
repeated ListPool data = 3;
|
|
184
225
|
}
|
|
185
226
|
|
|
186
227
|
message GetNewPoolsResponse {
|
|
187
228
|
bool success = 1;
|
|
188
229
|
string message = 2;
|
|
189
|
-
repeated
|
|
230
|
+
repeated ListPool data = 3;
|
|
190
231
|
}
|
|
191
232
|
|
|
192
233
|
message GetPoolResponse {
|
|
193
234
|
bool success = 1;
|
|
194
235
|
string message = 2;
|
|
195
|
-
optional PoolDataDetail data = 3;
|
|
236
|
+
optional PoolDataDetail data = 3;
|
|
196
237
|
}
|
|
197
238
|
|
|
198
239
|
message GetCandleChartResponse {
|
|
@@ -229,4 +270,10 @@ message GetPoolTraderStatsResponse {
|
|
|
229
270
|
bool success = 1;
|
|
230
271
|
string message = 2;
|
|
231
272
|
repeated PoolTraderStatsData data = 3;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
message GetTopTradersByPoolResponse {
|
|
276
|
+
bool success = 1;
|
|
277
|
+
string message = 2;
|
|
278
|
+
repeated PoolTraderStatsData data = 3;
|
|
232
279
|
}
|