@thorchain/asgardex-util
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

@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

Readme

Keywords

Package Sidebar

Install

npm i @thorchain/asgardex-util

Weekly Downloads

25

Version

0.10.0

License

MIT

Unpacked Size

656 kB

Total Files

16

Last publish

Collaborators

  • philipstanislaus
  • musnit
  • thorchain_org
  • jpthor
  • veado
  • dysoro
  • _stu
  • junkai121
  • sarawut11
  • thorswap
  • xdefidp
  • hodrthemediocre
  • hildisviniottar