@thorchain/asgardex-util

v0.10.0
Helper utilities for ASGARDEX clients
THORChain ASGARDEX

@thorchain/asgardex-util

Utitity helpers for ASGARDEX clients

Modules (in alphabetical order)

  • memo - Utilities for memos
  • stake - XYK formula calc for stake
  • swap - XYK formula calc for swap

Usage

Calculations-Staking

import {
  PoolData,
  getSwapOutput,
  getSwapOutputWithFee,
  getSwapInput,
  getSwapSlip,
  getSwapFee,
  getValueOfAssetInRune,
  getValueOfRuneInAsset,
  getDoubleSwapOutput,
  getDoubleSwapOutputWithFee,
  getDoubleSwapInput,
  getDoubleSwapSlip,
  getDoubleSwapFee,
  getValueOfAsset1InAsset2,
} from '@thorchain/asgardex-util'

Calculations-Swapping

import {
  UnitData,
  StakeData,
  getStakeUnits,
  getPoolShare,
  getSlipOnStake
} from '@thorchain/asgardex-util'

Installation

yarn add @thorchain/asgardex-util
npm i @thorchain/asgardex-util

Metadata

  • MIT
  • Whatever
  • THORChain
  • released 1/27/2022

Downloads