Releases: many-things/osmosis-router
Releases · many-things/osmosis-router
v1.1.6
v1.1.5
Full Changelog: 1.1.1...1.1.5
v1.1.1
v1.1.0
@many-things/osmosis-router
is a minimal package for Osmosis Swap Estimation.- Please use the latest
1.1.0
over1.0.2
and under(API interface foramount
is different, also fixed bugs).
import { Currency } from '@keplr-wallet/types';
import { estimateSwap } from '@many-things/osmosis-router';
const tokenInCurrency: Currency = {
coinDenom: 'OSMO',
coinMinimalDenom: 'uosmo',
coinDecimals: 6,
};
const tokenOutCurrency: Currency = {
coinDenom: 'USDC',
coinMinimalDenom:
'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858',
coinDecimals: 6,
};
// 1 OSMO = 0.899660 USDC
const amount: string = '1000000'; // (1 * 10 ** 6).toString();
estimateSwap(tokenInCurrency, tokenOutCurrency, amount); // CoinPretty (0.899660 USDC)