@clonegod/ttd-sol-common 2.0.32 → 2.0.34

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,19 @@
1
+ export declare enum SolanaPoolAccountType {
2
+ POOL = "pool",
3
+ VAULT_A = "vaultA",
4
+ VAULT_B = "vaultB"
5
+ }
1
6
  export interface SolanaAccountUpdateEvent {
2
- recv_ms: number;
7
+ recvTimeMs: number;
3
8
  providerId: string;
4
9
  account: string;
5
10
  slot: number;
6
11
  writeVersion: number;
7
12
  transactionHash: string;
8
- dex_id: string;
9
- pool_address: string;
10
- pool_name: string;
13
+ dexId: string;
14
+ poolAddress: string;
15
+ poolName: string;
16
+ accountType: SolanaPoolAccountType;
11
17
  accountData?: Buffer | string;
12
18
  }
13
19
  export interface SolanaBlockMetaUpdateEvent {
@@ -21,15 +27,14 @@ export interface SolanaBlockMetaUpdateEvent {
21
27
  entriesCount: number;
22
28
  }
23
29
  export interface SolanaPoolAccountUpdateEventData {
24
- provider_id: string;
25
30
  event_time: number;
26
- dexId: string;
31
+ provider_id: string;
32
+ dex_id: string;
27
33
  pool_address: string;
28
34
  pool_name: string;
29
35
  data: {
30
36
  slot: number;
31
- writeVersion: number;
32
- transactionHash: string;
37
+ tx_hash: string;
33
38
  pool_account: string;
34
39
  pool_account_data: string;
35
40
  vaultA_account?: string;
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SolanaPoolAccountType = void 0;
4
+ var SolanaPoolAccountType;
5
+ (function (SolanaPoolAccountType) {
6
+ SolanaPoolAccountType["POOL"] = "pool";
7
+ SolanaPoolAccountType["VAULT_A"] = "vaultA";
8
+ SolanaPoolAccountType["VAULT_B"] = "vaultB";
9
+ })(SolanaPoolAccountType || (exports.SolanaPoolAccountType = SolanaPoolAccountType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,8 +1,14 @@
1
1
  /**
2
2
  * Solana 池子账户更新事件数据结构
3
3
  */
4
+ export enum SolanaPoolAccountType {
5
+ POOL='pool',
6
+ VAULT_A='vaultA',
7
+ VAULT_B='vaultB',
8
+ }
9
+
4
10
  export interface SolanaAccountUpdateEvent {
5
- recv_ms: number; // 接收时间戳(毫秒)
11
+ recvTimeMs: number; // 接收时间戳(毫秒)
6
12
 
7
13
  providerId: string; // 提供者 ID: 'helius-laserstream'
8
14
 
@@ -13,12 +19,16 @@ export interface SolanaAccountUpdateEvent {
13
19
  transactionHash: string; // 导致账户变化的交易哈希
14
20
 
15
21
  // 池子信息
16
- dex_id: string; // DEX ID
17
- pool_address: string; // 池子地址
18
- pool_name: string; // 池子名称
22
+ dexId: string; // DEX ID
23
+ poolAddress: string; // 池子地址
24
+ poolName: string; // 池子名称
25
+
26
+ // 账户类型
27
+ accountType: SolanaPoolAccountType;
19
28
 
20
29
  // 账户数据(原始数据,由客户端解析)
21
30
  accountData?: Buffer | string; // 账户原始数据
31
+
22
32
  }
23
33
 
24
34
  /**
@@ -41,15 +51,14 @@ export interface SolanaBlockMetaUpdateEvent {
41
51
  * - 其他 : account_data
42
52
  */
43
53
  export interface SolanaPoolAccountUpdateEventData {
44
- provider_id: string
45
54
  event_time: number
46
- dexId: string
55
+ provider_id: string
56
+ dex_id: string
47
57
  pool_address: string
48
58
  pool_name: string
49
59
  data: {
50
60
  slot: number
51
- writeVersion: number
52
- transactionHash: string
61
+ tx_hash: string
53
62
  pool_account: string
54
63
  pool_account_data: string
55
64