Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@thorchain/asgardex-util

Package Overview
Dependencies
Maintainers
13
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thorchain/asgardex-util

Helper utilities for ASGARDEX clients

latest
npmnpm
Version
0.10.0
Version published
Weekly downloads
612
955.17%
Maintainers
13
Weekly downloads
 
Created
Source

@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

Keywords

THORChain

FAQs

Package last updated on 27 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts