@sentio/sdk 2.41.7-rc.1 → 2.42.0-rc.1

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,4 +1,5 @@
1
1
  export * from './aptos-dex.js';
2
2
  export * from './coin.js';
3
+ export * from './token.js';
3
4
  export { findNewCoinBalances } from './coin-event.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/aptos/ext/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/aptos/ext/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './aptos-dex.js';
2
2
  export * from './coin.js';
3
+ export * from './token.js';
3
4
  export { findNewCoinBalances } from './coin-event.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/aptos/ext/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/aptos/ext/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { AptosNetwork } from '../network.js';
2
+ import { AptosChainId } from '@sentio/chain';
3
+ export type SimpleTokenInfo = {
4
+ tokenAddress: `0x${string}`;
5
+ name: string;
6
+ symbol: string;
7
+ decimals: number;
8
+ bridge: 'LayerZero' | 'Wormhole' | 'Celer' | 'Native';
9
+ logoUrl?: string;
10
+ websiteUrl?: string;
11
+ category: 'Native' | 'Bridged' | 'Meme';
12
+ coinGeckoId?: string;
13
+ coinMarketCapId?: number;
14
+ };
15
+ export declare function initTokenList(): Promise<void>;
16
+ export declare function whitelistTokens(): Map<string, SimpleTokenInfo>;
17
+ export declare function isWhiteListToken(token: string): boolean;
18
+ export declare function getTokenInfoWithFallback(token: string, network?: AptosNetwork): Promise<SimpleTokenInfo>;
19
+ export declare function getPriceForToken(token: string, timestamp: number, network?: AptosChainId): Promise<number>;
20
+ export declare function tokenTokenValueInUsd(n: bigint, coinInfo: SimpleTokenInfo, timestamp: number, network?: AptosChainId): Promise<import("@sentio/bigdecimal").BigDecimal>;
21
+ //# sourceMappingURL=token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/aptos/ext/token.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAa,MAAM,eAAe,CAAA;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAqB5C,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAID,wBAAsB,aAAa,kBAUlC;AAkCD,wBAAgB,eAAe,iCAE9B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOvD;AAKD,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAsC9G;AAED,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,eAA6B,GACnC,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,wBAAsB,oBAAoB,CACxC,CAAC,EAAE,MAAM,EACT,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,eAA6B,oDAKrC"}