@sui-tracker/shared 1.0.55 → 1.0.57
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/modules/grpc-services/index.d.ts +1 -0
- package/dist/modules/grpc-services/index.js +1 -0
- package/dist/modules/grpc-services/index.js.map +1 -1
- package/dist/modules/grpc-services/token-grpc.service.d.ts +9 -0
- package/dist/modules/grpc-services/token-grpc.service.js +56 -0
- package/dist/modules/grpc-services/token-grpc.service.js.map +1 -0
- package/dist/modules/interfaces/swap-order.interface.d.ts +31 -0
- package/dist/modules/shared.module.js +2 -0
- package/dist/modules/shared.module.js.map +1 -1
- package/dist/protos/swap-order.proto +67 -25
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -20,4 +20,5 @@ __exportStar(require("./proxy-grpc.service"), exports);
|
|
|
20
20
|
__exportStar(require("./swap-order-grpc.service"), exports);
|
|
21
21
|
__exportStar(require("./price-grpc.service"), exports);
|
|
22
22
|
__exportStar(require("./data-center-grpc.service"), exports);
|
|
23
|
+
__exportStar(require("./token-grpc.service"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,4DAA0C;AAC1C,uDAAqC;AACrC,4DAA0C;AAC1C,uDAAqC;AACrC,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,4DAA0C;AAC1C,uDAAqC;AACrC,4DAA0C;AAC1C,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientGrpc } from "@nestjs/microservices";
|
|
2
|
+
import { GetTrendingTokensRequest, GetTrendingTokensResponse, GetTopVolumeTokensRequest, GetTopVolumeTokensResponse } from "../interfaces/swap-order.interface";
|
|
3
|
+
export declare class TokenGrpcService {
|
|
4
|
+
private grpcClient;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(grpcClient: ClientGrpc);
|
|
7
|
+
getTrendingTokens(data: GetTrendingTokensRequest): Promise<GetTrendingTokensResponse>;
|
|
8
|
+
getTopVolumeTokens(data: GetTopVolumeTokensRequest): Promise<GetTopVolumeTokensResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var TokenGrpcService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TokenGrpcService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
let TokenGrpcService = TokenGrpcService_1 = class TokenGrpcService {
|
|
19
|
+
constructor(grpcClient) {
|
|
20
|
+
this.grpcClient = grpcClient;
|
|
21
|
+
this.logger = new common_1.Logger(TokenGrpcService_1.name);
|
|
22
|
+
}
|
|
23
|
+
async getTrendingTokens(data) {
|
|
24
|
+
const swapOrderService = this.grpcClient.getService("SwapOrderService");
|
|
25
|
+
const res = await new Promise((resolve, reject) => {
|
|
26
|
+
swapOrderService.trendingTokens(data).subscribe({
|
|
27
|
+
next: (response) => resolve(response),
|
|
28
|
+
error: (error) => reject(error),
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
if (!res.success) {
|
|
32
|
+
throw new Error(res.message);
|
|
33
|
+
}
|
|
34
|
+
return res;
|
|
35
|
+
}
|
|
36
|
+
async getTopVolumeTokens(data) {
|
|
37
|
+
const swapOrderService = this.grpcClient.getService("SwapOrderService");
|
|
38
|
+
const res = await new Promise((resolve, reject) => {
|
|
39
|
+
swapOrderService.topVolumeTokens(data).subscribe({
|
|
40
|
+
next: (response) => resolve(response),
|
|
41
|
+
error: (error) => reject(error),
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
if (!res.success) {
|
|
45
|
+
throw new Error(res.message);
|
|
46
|
+
}
|
|
47
|
+
return res;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.TokenGrpcService = TokenGrpcService;
|
|
51
|
+
exports.TokenGrpcService = TokenGrpcService = TokenGrpcService_1 = __decorate([
|
|
52
|
+
(0, common_1.Injectable)(),
|
|
53
|
+
__param(0, (0, common_1.Inject)("SWAP_ORDER")),
|
|
54
|
+
__metadata("design:paramtypes", [Object])
|
|
55
|
+
], TokenGrpcService);
|
|
56
|
+
//# sourceMappingURL=token-grpc.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-grpc.service.js","sourceRoot":"","sources":["../../../src/modules/grpc-services/token-grpc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA0E;AAYnE,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAG3B,YAAkC,UAA8B;QAAtB,eAAU,GAAV,UAA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M,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAjDY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAIE,WAAA,IAAA,eAAM,EAAC,YAAY,CAAC,CAAA;;GAHtB,gBAAgB,CAiD5B"}
|
|
@@ -21,6 +21,8 @@ export interface PoolData {
|
|
|
21
21
|
volume: string;
|
|
22
22
|
oldPrice: string;
|
|
23
23
|
totalTx: string;
|
|
24
|
+
score: string;
|
|
25
|
+
currentPrice: string;
|
|
24
26
|
}
|
|
25
27
|
export interface CandleData {
|
|
26
28
|
timestamp: string;
|
|
@@ -43,6 +45,7 @@ export interface GetNewPoolsRequest {
|
|
|
43
45
|
}
|
|
44
46
|
export interface GetPoolRequest {
|
|
45
47
|
id: string;
|
|
48
|
+
label: number;
|
|
46
49
|
}
|
|
47
50
|
export interface GetCandleChartRequest {
|
|
48
51
|
pool: string;
|
|
@@ -87,10 +90,38 @@ export interface GetLastSwapOrderRequest {
|
|
|
87
90
|
export interface GetLastSwapOrderResponse extends BaseResponse {
|
|
88
91
|
data: SwapOrderData[];
|
|
89
92
|
}
|
|
93
|
+
export interface GetTrendingTokensRequest {
|
|
94
|
+
label: number;
|
|
95
|
+
}
|
|
96
|
+
export interface GetTrendingTokensResponse extends BaseResponse {
|
|
97
|
+
data: {
|
|
98
|
+
id: string;
|
|
99
|
+
name?: string | null;
|
|
100
|
+
symbol?: string | null;
|
|
101
|
+
address?: string | null;
|
|
102
|
+
decimals?: number | null;
|
|
103
|
+
iconUrl?: string | null;
|
|
104
|
+
isActive?: boolean | null;
|
|
105
|
+
totalSupply?: string | null;
|
|
106
|
+
description?: string | null;
|
|
107
|
+
volume: string;
|
|
108
|
+
txs: string;
|
|
109
|
+
currentPrice: string;
|
|
110
|
+
oldPrice: string;
|
|
111
|
+
score: string;
|
|
112
|
+
}[];
|
|
113
|
+
}
|
|
114
|
+
export interface GetTopVolumeTokensRequest {
|
|
115
|
+
label: number;
|
|
116
|
+
}
|
|
117
|
+
export interface GetTopVolumeTokensResponse extends GetTrendingTokensResponse {
|
|
118
|
+
}
|
|
90
119
|
export interface SwapOrderService {
|
|
91
120
|
getTrendingPools(request: GetTrendingPoolsRequest): Observable<GetTrendingPoolsResponse>;
|
|
92
121
|
getNewPools(request: GetNewPoolsRequest): Observable<GetNewPoolsResponse>;
|
|
93
122
|
getPool(request: GetPoolRequest): Observable<GetPoolResponse>;
|
|
94
123
|
getCandleChart(request: GetCandleChartRequest): Observable<GetCandleChartResponse>;
|
|
95
124
|
getLastSwapOrder(request: GetLastSwapOrderRequest): Observable<GetLastSwapOrderResponse>;
|
|
125
|
+
trendingTokens(request: GetTrendingTokensRequest): Observable<GetTrendingTokensResponse>;
|
|
126
|
+
topVolumeTokens(request: GetTopVolumeTokensRequest): Observable<GetTopVolumeTokensResponse>;
|
|
96
127
|
}
|
|
@@ -21,6 +21,7 @@ const dotenv_1 = require("dotenv");
|
|
|
21
21
|
const internal_token_service_1 = require("./common-service/internal-token.service");
|
|
22
22
|
const core_1 = require("@nestjs/core");
|
|
23
23
|
const grpc_metadata_service_1 = require("./grpc-services/grpc-metadata.service");
|
|
24
|
+
const grpc_services_1 = require("./grpc-services");
|
|
24
25
|
(0, dotenv_1.config)();
|
|
25
26
|
const providers = [
|
|
26
27
|
sui_client_service_1.SuiClientService,
|
|
@@ -33,6 +34,7 @@ const providers = [
|
|
|
33
34
|
internal_token_service_1.InternalTokenService,
|
|
34
35
|
core_1.Reflector,
|
|
35
36
|
grpc_metadata_service_1.GrpcMetadataService,
|
|
37
|
+
grpc_services_1.TokenGrpcService,
|
|
36
38
|
];
|
|
37
39
|
let SharedModule = class SharedModule {
|
|
38
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.module.js","sourceRoot":"","sources":["../../src/modules/shared.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AAEtD,6DAAuD;AACvD,+EAAyE;AACzE,2EAAqE;AACrE,qFAA+E;AAC/E,qFAA8E;AAC9E,yDAAgE;AAChE,+BAA2B;AAC3B,2EAAqE;AACrE,uFAAgF;AAChF,mCAAgC;AAChC,oFAA8E;AAC9E,uCAAwC;AACxC,iFAA2E;
|
|
1
|
+
{"version":3,"file":"shared.module.js","sourceRoot":"","sources":["../../src/modules/shared.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AAEtD,6DAAuD;AACvD,+EAAyE;AACzE,2EAAqE;AACrE,qFAA+E;AAC/E,qFAA8E;AAC9E,yDAAgE;AAChE,+BAA2B;AAC3B,2EAAqE;AACrE,uFAAgF;AAChF,mCAAgC;AAChC,oFAA8E;AAC9E,uCAAwC;AACxC,iFAA2E;AAC3E,mDAAkD;AAElD,IAAA,eAAM,GAAE,CAAC;AAET,MAAM,SAAS,GAAe;IAC5B,qCAAgB;IAChB,yCAAkB;IAClB,qCAAgB;IAChB,+CAAqB;IACrB,8CAAoB;IACpB,qCAAgB;IAChB,gDAAqB;IACrB,6CAAoB;IACpB,gBAAS;IACT,2CAAmB;IACnB,gCAAgB;CACjB,CAAA;AA+DM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAI,CAAA;AAAhB,oCAAY;uBAAZ,YAAY;IA7DxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,6BAAa,CAAC,QAAQ,CAAC;gBACrB;oBACE,IAAI,EAAE,OAAO;oBACb,SAAS,EAAE,yBAAS,CAAC,IAAI;oBACzB,OAAO,EAAE;wBACP,OAAO,EAAE,OAAO;wBAChB,SAAS,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC;wBACnD,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,iBAAiB;qBACxD;iBACF,EAAE;oBACD,IAAI,EAAE,iBAAiB;oBACvB,SAAS,EAAE,yBAAS,CAAC,IAAI;oBACzB,OAA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,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;KACxB,CAAC;GACW,YAAY,CAAI"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Updated proto file to match swap-order.interface.ts
|
|
2
|
-
|
|
3
1
|
syntax = "proto3";
|
|
4
2
|
|
|
5
3
|
package swap_order;
|
|
@@ -11,34 +9,38 @@ service SwapOrderService {
|
|
|
11
9
|
rpc GetPool (GetPoolRequest) returns (GetPoolResponse);
|
|
12
10
|
rpc GetCandleChart (GetCandleChartRequest) returns (GetCandleChartResponse);
|
|
13
11
|
rpc GetLastSwapOrder (GetLastSwapOrderRequest) returns (GetLastSwapOrderResponse);
|
|
12
|
+
rpc TrendingTokens (GetTrendingTokensRequest) returns (GetTrendingTokensResponse);
|
|
13
|
+
rpc TopVolumeTokens (GetTopVolumeTokensRequest) returns (GetTopVolumeTokensResponse);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// Token data structure
|
|
16
|
+
// Token data structure matching TokenData interface
|
|
17
17
|
message TokenData {
|
|
18
18
|
string id = 1;
|
|
19
|
-
string name = 2;
|
|
20
|
-
string symbol = 3;
|
|
21
|
-
string address = 4;
|
|
22
|
-
int32 decimals = 5;
|
|
23
|
-
string iconUrl = 6;
|
|
24
|
-
bool isActive = 7;
|
|
25
|
-
string totalSupply = 8;
|
|
26
|
-
string description = 9;
|
|
19
|
+
optional string name = 2;
|
|
20
|
+
optional string symbol = 3;
|
|
21
|
+
optional string address = 4;
|
|
22
|
+
optional int32 decimals = 5;
|
|
23
|
+
optional string iconUrl = 6;
|
|
24
|
+
optional bool isActive = 7;
|
|
25
|
+
optional string totalSupply = 8;
|
|
26
|
+
optional string description = 9;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// Pool data structure
|
|
29
|
+
// Pool data structure matching PoolData interface
|
|
30
30
|
message PoolData {
|
|
31
31
|
string id = 1;
|
|
32
|
-
TokenData tokenA = 2;
|
|
32
|
+
optional TokenData tokenA = 2;
|
|
33
33
|
TokenData tokenB = 3;
|
|
34
34
|
double reserveA = 4;
|
|
35
35
|
double reserveB = 5;
|
|
36
36
|
string volume = 6;
|
|
37
37
|
string oldPrice = 7;
|
|
38
38
|
string totalTx = 8;
|
|
39
|
+
string score = 9;
|
|
40
|
+
string currentPrice = 10;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
// Candle data structure
|
|
43
|
+
// Candle data structure matching CandleData interface
|
|
42
44
|
message CandleData {
|
|
43
45
|
string timestamp = 1;
|
|
44
46
|
string open = 2;
|
|
@@ -53,7 +55,7 @@ message CandleData {
|
|
|
53
55
|
string volumeUsd = 11;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
// Swap order data structure
|
|
58
|
+
// Swap order data structure matching SwapOrderData interface
|
|
57
59
|
message SwapOrderData {
|
|
58
60
|
int64 id = 1;
|
|
59
61
|
string pool = 2;
|
|
@@ -65,39 +67,67 @@ message SwapOrderData {
|
|
|
65
67
|
string usdPrice = 8;
|
|
66
68
|
bool a2b = 9;
|
|
67
69
|
string type = 10;
|
|
68
|
-
string liquidity = 11;
|
|
70
|
+
optional string liquidity = 11;
|
|
69
71
|
string createdAt = 12;
|
|
70
72
|
string swapAt = 13;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
//
|
|
75
|
+
// Trending token data structure
|
|
76
|
+
message TrendingTokenData {
|
|
77
|
+
string id = 1;
|
|
78
|
+
optional string name = 2;
|
|
79
|
+
optional string symbol = 3;
|
|
80
|
+
optional string address = 4;
|
|
81
|
+
optional int32 decimals = 5;
|
|
82
|
+
optional string iconUrl = 6;
|
|
83
|
+
optional bool isActive = 7;
|
|
84
|
+
optional string totalSupply = 8;
|
|
85
|
+
optional string description = 9;
|
|
86
|
+
string volume = 10;
|
|
87
|
+
string txs = 11;
|
|
88
|
+
string currentPrice = 12;
|
|
89
|
+
string oldPrice = 13;
|
|
90
|
+
string score = 14;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Request messages matching TypeScript interfaces
|
|
74
94
|
message GetTrendingPoolsRequest {
|
|
75
|
-
int32 label = 1;
|
|
95
|
+
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
76
96
|
}
|
|
77
97
|
|
|
78
98
|
message GetNewPoolsRequest {
|
|
79
|
-
int32 label = 1;
|
|
99
|
+
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
80
100
|
}
|
|
81
101
|
|
|
82
102
|
message GetPoolRequest {
|
|
83
103
|
string id = 1;
|
|
104
|
+
int32 label = 2; // 5 | 60 | 360 | 1440
|
|
84
105
|
}
|
|
85
106
|
|
|
86
107
|
message GetCandleChartRequest {
|
|
87
108
|
string pool = 1;
|
|
88
109
|
int32 resolution = 2;
|
|
89
110
|
int32 limit = 3;
|
|
90
|
-
string timestamp = 4;
|
|
111
|
+
optional string timestamp = 4;
|
|
91
112
|
}
|
|
92
113
|
|
|
93
114
|
message GetLastSwapOrderRequest {
|
|
94
115
|
string poolAddress = 1;
|
|
95
|
-
string time = 2;
|
|
96
|
-
int32 limit = 3;
|
|
97
|
-
string type = 4;
|
|
98
|
-
int32 page = 5;
|
|
116
|
+
optional string time = 2;
|
|
117
|
+
optional int32 limit = 3;
|
|
118
|
+
optional string type = 4;
|
|
119
|
+
optional int32 page = 5;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message GetTrendingTokensRequest {
|
|
123
|
+
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message GetTopVolumeTokensRequest {
|
|
127
|
+
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
99
128
|
}
|
|
100
129
|
|
|
130
|
+
// Response messages matching TypeScript interfaces with BaseResponse structure
|
|
101
131
|
message GetTrendingPoolsResponse {
|
|
102
132
|
bool success = 1;
|
|
103
133
|
string message = 2;
|
|
@@ -113,7 +143,7 @@ message GetNewPoolsResponse {
|
|
|
113
143
|
message GetPoolResponse {
|
|
114
144
|
bool success = 1;
|
|
115
145
|
string message = 2;
|
|
116
|
-
PoolData data = 3;
|
|
146
|
+
optional PoolData data = 3; // null in TypeScript becomes optional in proto
|
|
117
147
|
}
|
|
118
148
|
|
|
119
149
|
message GetCandleChartResponse {
|
|
@@ -126,4 +156,16 @@ message GetLastSwapOrderResponse {
|
|
|
126
156
|
bool success = 1;
|
|
127
157
|
string message = 2;
|
|
128
158
|
repeated SwapOrderData data = 3;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
message GetTrendingTokensResponse {
|
|
162
|
+
bool success = 1;
|
|
163
|
+
string message = 2;
|
|
164
|
+
repeated TrendingTokenData data = 3;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
message GetTopVolumeTokensResponse {
|
|
168
|
+
bool success = 1;
|
|
169
|
+
string message = 2;
|
|
170
|
+
repeated TrendingTokenData data = 3;
|
|
129
171
|
}
|