@sui-tracker/shared 1.0.54 → 1.0.56

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.
@@ -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;
@@ -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;
@@ -13,32 +11,35 @@ service SwapOrderService {
13
11
  rpc GetLastSwapOrder (GetLastSwapOrderRequest) returns (GetLastSwapOrderResponse);
14
12
  }
15
13
 
16
- // Token data structure.
14
+ // Token data structure matching TokenData interface
17
15
  message TokenData {
18
16
  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;
17
+ optional string name = 2;
18
+ optional string symbol = 3;
19
+ optional string address = 4;
20
+ optional int32 decimals = 5;
21
+ optional string iconUrl = 6;
22
+ optional bool isActive = 7;
23
+ optional string totalSupply = 8;
24
+ optional string description = 9;
27
25
  }
28
26
 
29
- // Pool data structure.
27
+ // Pool data structure matching PoolData interface
30
28
  message PoolData {
31
29
  string id = 1;
32
- TokenData tokenA = 2;
30
+ optional TokenData tokenA = 2;
33
31
  TokenData tokenB = 3;
34
32
  double reserveA = 4;
35
33
  double reserveB = 5;
36
34
  string volume = 6;
37
35
  string oldPrice = 7;
38
36
  string totalTx = 8;
37
+ string score = 9;
38
+ string currentPrice = 10;
39
+ string price = 11;
39
40
  }
40
41
 
41
- // Candle data structure.
42
+ // Candle data structure matching CandleData interface
42
43
  message CandleData {
43
44
  string timestamp = 1;
44
45
  string open = 2;
@@ -53,7 +54,7 @@ message CandleData {
53
54
  string volumeUsd = 11;
54
55
  }
55
56
 
56
- // Swap order data structure.
57
+ // Swap order data structure matching SwapOrderData interface
57
58
  message SwapOrderData {
58
59
  int64 id = 1;
59
60
  string pool = 2;
@@ -65,18 +66,18 @@ message SwapOrderData {
65
66
  string usdPrice = 8;
66
67
  bool a2b = 9;
67
68
  string type = 10;
68
- string liquidity = 11;
69
+ optional string liquidity = 11;
69
70
  string createdAt = 12;
70
71
  string swapAt = 13;
71
72
  }
72
73
 
73
- // Request/Response messages
74
+ // Request messages matching TypeScript interfaces
74
75
  message GetTrendingPoolsRequest {
75
- int32 label = 1;
76
+ int32 label = 1; // 5 | 60 | 360 | 1440
76
77
  }
77
78
 
78
79
  message GetNewPoolsRequest {
79
- int32 label = 1;
80
+ int32 label = 1; // 5 | 60 | 360 | 1440
80
81
  }
81
82
 
82
83
  message GetPoolRequest {
@@ -87,17 +88,18 @@ message GetCandleChartRequest {
87
88
  string pool = 1;
88
89
  int32 resolution = 2;
89
90
  int32 limit = 3;
90
- string timestamp = 4;
91
+ optional string timestamp = 4;
91
92
  }
92
93
 
93
94
  message GetLastSwapOrderRequest {
94
95
  string poolAddress = 1;
95
- string time = 2;
96
- int32 limit = 3;
97
- string type = 4;
98
- int32 page = 5;
96
+ optional string time = 2;
97
+ optional int32 limit = 3;
98
+ optional string type = 4;
99
+ optional int32 page = 5;
99
100
  }
100
101
 
102
+ // Response messages matching TypeScript interfaces with BaseResponse structure
101
103
  message GetTrendingPoolsResponse {
102
104
  bool success = 1;
103
105
  string message = 2;
@@ -113,7 +115,7 @@ message GetNewPoolsResponse {
113
115
  message GetPoolResponse {
114
116
  bool success = 1;
115
117
  string message = 2;
116
- PoolData data = 3;
118
+ optional PoolData data = 3; // null in TypeScript becomes optional in proto
117
119
  }
118
120
 
119
121
  message GetCandleChartResponse {