tornado-core/dist/prices.d.ts

21 lines
737 B
TypeScript
Raw Normal View History

2024-04-29 18:55:15 +03:00
import { type Provider } from 'ethers';
2024-10-16 17:19:49 +03:00
import { OffchainOracle, Multicall } from './typechain';
import { Call3 } from './multicall';
2024-04-29 18:55:15 +03:00
export declare class TokenPriceOracle {
oracle?: OffchainOracle;
multicall: Multicall;
provider: Provider;
constructor(provider: Provider, multicall: Multicall, oracle?: OffchainOracle);
2024-10-16 17:19:49 +03:00
buildCalls(tokens: {
tokenAddress: string;
decimals: number;
}[]): Call3[];
buildStable(stablecoinAddress: string): Call3[];
fetchPrice(tokenAddress: string, decimals: number): Promise<bigint>;
2024-04-29 23:05:55 +03:00
fetchPrices(tokens: {
tokenAddress: string;
decimals: number;
}[]): Promise<bigint[]>;
2024-10-16 17:19:49 +03:00
fetchEthUSD(stablecoinAddress: string): Promise<number>;
2024-04-29 18:55:15 +03:00
}