UNPKG

@molecularlabs/nucleus-frontend

Version:
43 lines (40 loc) 1.35 kB
import { Address } from 'viem'; import { ChainId } from './vault-config.mjs'; import 'viem/chains'; import '../vaults/config.mjs'; interface GetErc20BalanceParams { chainId: ChainId; tokenAddress: Address; userAddress: Address; } declare const getErc20Balance: ({ chainId, tokenAddress, userAddress, }: GetErc20BalanceParams) => Promise<bigint>; interface GetErc20DecimalsParams { chainId: ChainId; tokenAddress: Address; } declare const getErc20Decimals: ({ chainId, tokenAddress, }: GetErc20DecimalsParams) => Promise<number>; interface GetErc20AllowanceParams { chainId: ChainId; tokenAddress: Address; userAddress: Address; spenderAddress: Address; } declare const getErc20Allowance: ({ chainId, tokenAddress, userAddress, spenderAddress, }: GetErc20AllowanceParams) => Promise<bigint>; declare const getErc20AllowanceWithDecimals: ({ chainId, tokenAddress, userAddress, spenderAddress, }: GetErc20AllowanceParams) => Promise<[{ error?: undefined; result: bigint; status: "success"; } | { error: Error; result?: undefined; status: "failure"; }, { error: Error; result?: undefined; status: "failure"; } | { error?: undefined; result: number; status: "success"; }]>; export { getErc20Allowance, getErc20AllowanceWithDecimals, getErc20Balance, getErc20Decimals };