File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed
packages/sui-agent/src/protocols/aftermath Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -4,32 +4,12 @@ import { SuiClient } from '@mysten/sui/client';
44import { handleError } from '../../utils' ;
55import { initSuiClient } from '../../transactions/Transaction' ;
66import PoolTool from './PoolTool' ;
7+ import { AftermathTransaction , RankingMetric , RankedPool } from './types' ;
78
89// Initialize Aftermath SDK for mainnet
910const af = new Aftermath ( 'MAINNET' ) ;
1011const pools = af . Pools ( ) ;
1112
12- type RankingMetric = 'apr' | 'tvl' | 'fees' | 'volume' ;
13-
14- // Type definitions for Aftermath SDK responses
15- interface AftermathTransaction {
16- target : `${string } ::${string } ::${string } `;
17- arguments : ( string | number | boolean | bigint ) [ ] ;
18- typeArguments : string [ ] ;
19- }
20-
21- interface PoolMetrics {
22- apr : string ;
23- tvl : string ;
24- fee : string ;
25- volume : string ;
26- }
27-
28- interface RankedPool {
29- id : string ;
30- metrics : PoolMetrics ;
31- }
32-
3313/**
3414 * Converts an Aftermath transaction to our internal format.
3515 * @param tx - Raw transaction from Aftermath SDK.
Original file line number Diff line number Diff line change @@ -90,3 +90,22 @@ export interface SDKPool {
9090 } ;
9191 stats ?: SDKPoolStats ;
9292}
93+
94+ // Type definitions for Aftermath SDK responses
95+ export interface AftermathTransaction {
96+ target : `${string } ::${string } ::${string } `;
97+ arguments : ( string | number | boolean | bigint ) [ ] ;
98+ typeArguments : string [ ] ;
99+ }
100+
101+ export interface PoolMetrics {
102+ apr : string ;
103+ tvl : string ;
104+ fee : string ;
105+ volume : string ;
106+ }
107+
108+ export interface RankedPool {
109+ id : string ;
110+ metrics : PoolMetrics ;
111+ }
You can’t perform that action at this time.
0 commit comments