0.2.0 • Published 4 years ago

@polkassembly/util v0.2.0

Weekly downloads
46
License
Apache-2.0
Repository
github
Last release
4 years ago

@polkassembly/util

A set of utility functions used in Polkassembly.

Usage

Installation -

yarn add @polkssembly/util

Functions can be imported directly from the package, e.g.

import { getPassingThreshold } from '@polkassembly/util';

Utility functions

  • getPassingThreshold: Get the amount of Aye needed for a referendum to pass.
  • newtonRaphson: This is a fork of scijs/newton-raphson-method that uses bn.js instances instead of plain javascript numbers. It has been simplified and requires to pass the function and its derivative as argument.
  • solveQuadraticEquation: Get the roots of a polynomial function of degree 2 (a*x^2 + b*x + c) where the coeffiscients a, b and c are BN from bn.js.
0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago