UNPKG

@xchainjs/xchain-thorchain-amm

Version:

module that exposes estimating & swappping cryptocurrency assets on thorchain

25 lines (24 loc) 883 B
import { CompatibleAsset } from '@xchainjs/xchain-thorchain-query'; import { Address, Asset, CryptoAmount, TokenAsset } from '@xchainjs/xchain-util'; import { Wallet } from '@xchainjs/xchain-wallet'; import { TxSubmitted } from './types'; export type NonProtocolActionParams = { wallet: Wallet; assetAmount: CryptoAmount<Asset | TokenAsset>; recipient: Address; memo: string; walletIndex?: number; }; export type ProtocolActionParams = { wallet: Wallet; assetAmount: CryptoAmount<CompatibleAsset>; memo: string; walletIndex?: number; }; export type ActionParams = ProtocolActionParams | NonProtocolActionParams; export declare class ThorchainAction { static makeAction(actionParams: ActionParams): Promise<TxSubmitted>; private static makeProtocolAction; private static makeNonProtocolAction; private static isNonProtocolParams; }