@clonegod/ttd-sol-common 2.0.31 → 2.0.32

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.
@@ -1,13 +1,13 @@
1
1
  export interface SolanaAccountUpdateEvent {
2
2
  recv_ms: number;
3
3
  providerId: string;
4
+ account: string;
4
5
  slot: number;
5
6
  writeVersion: number;
6
7
  transactionHash: string;
7
- dexId: string;
8
- pair: string;
9
- poolAddress: string;
10
- poolName?: string;
8
+ dex_id: string;
9
+ pool_address: string;
10
+ pool_name: string;
11
11
  accountData?: Buffer | string;
12
12
  }
13
13
  export interface SolanaBlockMetaUpdateEvent {
@@ -21,17 +21,20 @@ export interface SolanaBlockMetaUpdateEvent {
21
21
  entriesCount: number;
22
22
  }
23
23
  export interface SolanaPoolAccountUpdateEventData {
24
- type: string;
25
24
  provider_id: string;
26
25
  event_time: number;
27
26
  dexId: string;
28
- pair: string;
29
27
  pool_address: string;
30
28
  pool_name: string;
31
29
  data: {
32
30
  slot: number;
33
31
  writeVersion: number;
34
32
  transactionHash: string;
35
- accountData: string;
33
+ pool_account: string;
34
+ pool_account_data: string;
35
+ vaultA_account?: string;
36
+ vaultA_account_data?: string;
37
+ vaultB?: string;
38
+ vaultB_account_data?: string;
36
39
  };
37
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -4,19 +4,18 @@
4
4
  export interface SolanaAccountUpdateEvent {
5
5
  recv_ms: number; // 接收时间戳(毫秒)
6
6
 
7
- // provider_id: 'helius-laserstream',
8
- providerId: string; // 提供者 ID
7
+ providerId: string; // 提供者 ID: 'helius-laserstream'
9
8
 
10
9
  // 公共字段
10
+ account: string; // 账户地址
11
11
  slot: number; // Solana slot 号
12
12
  writeVersion: number; // 账户写入版本
13
- transactionHash: string; // 交易哈希
13
+ transactionHash: string; // 导致账户变化的交易哈希
14
14
 
15
15
  // 池子信息
16
- dexId: string; // DEX ID
17
- pair: string; // 交易对名称
18
- poolAddress: string; // 池子地址
19
- poolName?: string; // 池子名称
16
+ dex_id: string; // DEX ID
17
+ pool_address: string; // 池子地址
18
+ pool_name: string; // 池子名称
20
19
 
21
20
  // 账户数据(原始数据,由客户端解析)
22
21
  accountData?: Buffer | string; // 账户原始数据
@@ -37,21 +36,28 @@ export interface SolanaBlockMetaUpdateEvent {
37
36
  }
38
37
 
39
38
  /**
40
- * 推送给询价、交易进程的Account Change Event 结构
39
+ * 推送给询价、交易进程的AccountData
40
+ * - AMM : pool_account_data, vaultA_account_data, vaultB_account_data
41
+ * - 其他 : account_data
41
42
  */
42
43
  export interface SolanaPoolAccountUpdateEventData {
43
- type: string
44
44
  provider_id: string
45
45
  event_time: number
46
46
  dexId: string
47
- pair: string
48
47
  pool_address: string
49
48
  pool_name: string
50
49
  data: {
51
50
  slot: number
52
51
  writeVersion: number
53
52
  transactionHash: string
54
- accountData: string
53
+ pool_account: string
54
+ pool_account_data: string
55
+
56
+ // AMM 池子的Vault
57
+ vaultA_account?: string
58
+ vaultA_account_data?: string
59
+ vaultB?: string
60
+ vaultB_account_data?: string
55
61
  }
56
62
  }
57
63