1- import { DexOperationStatus , SwapOrderType , TickInterval } from './enums' ;
1+ import { DexOperationStatus , SwapOrderType , TickInterval , WsEvent } from './enums' ;
22
33export type WsSync = {
4- t : ' Sync' ,
4+ t : WsEvent . Sync ,
55 s : number , // Slot
66 bH : string , // Block hash
77}
88
99export type WsAsset = {
10- t : ' Asset' ,
10+ t : WsEvent . Asset ,
1111 pId : string , // Policy ID
1212 nH : string , // Name Hex
1313 d : number , // Decimals
@@ -20,7 +20,7 @@ export type WsAsset = {
2020}
2121
2222export type WsLiquidityPool = {
23- t : ' LiquidityPool' ,
23+ t : WsEvent . LiquidityPool ,
2424 d : string , // DEX
2525 i : string , // Identifier
2626 a : string , // Address
@@ -31,7 +31,7 @@ export type WsLiquidityPool = {
3131}
3232
3333export type WsLiquidityPoolState = {
34- t : ' LiquidityPoolState' ,
34+ t : WsEvent . LiquidityPoolState ,
3535 rA : number , // Reserve A
3636 rB : number , // Reserve B
3737 lpTs : number , // Total LP tokens
@@ -42,15 +42,15 @@ export type WsLiquidityPoolState = {
4242}
4343
4444export type WsOperationStatus = {
45- t : ' OperationStatus' ,
45+ t : WsEvent . OperationStatus ,
4646 st : DexOperationStatus , // Status type
4747 s : number , // Slot
4848 tH : string , // Tx hash
4949 oI : number , // Output index
5050}
5151
5252export type WsLiquidityPoolSwap = {
53- t : ' LiquidityPoolSwap' ,
53+ t : WsEvent . LiquidityPoolSwap ,
5454 siT ?: WsAsset , // Swap in token
5555 soT ?: WsAsset , // Swap out token
5656 oT : SwapOrderType , // Order type
@@ -68,7 +68,7 @@ export type WsLiquidityPoolSwap = {
6868}
6969
7070export type WsLiquidityPoolDesposit = {
71- t : ' LiquidityPoolDeposit' ,
71+ t : WsEvent . LiquidityPoolDeposit ,
7272 dAT ?: WsAsset , // Deposit A token
7373 dBT ?: WsAsset , // Deposit B token
7474 dAA : number , // Deposit A amount
@@ -84,7 +84,7 @@ export type WsLiquidityPoolDesposit = {
8484}
8585
8686export type WsLiquidityPoolWithdraw = {
87- t : ' LiquidityPoolWithdraw' ,
87+ t : WsEvent . LiquidityPoolWithdraw ,
8888 lpT : WsAsset , // Related LP token
8989 lpA : number , // LP token amount
9090 mA : number , // Min. receive token A
@@ -100,7 +100,7 @@ export type WsLiquidityPoolWithdraw = {
100100}
101101
102102export type WsLiquidityPoolTick = {
103- t : ' LiquidityPoolTick' ,
103+ t : WsEvent . LiquidityPoolTick ,
104104 r : TickInterval , // Resolution
105105 o : number , // Open
106106 h : number , // High
0 commit comments