pomelo-sdk
v0.1.3
Published
Pomelo SDK
Downloads
13
Readme
Pomelo SDK
Pomelo - Javascript Library
Install
Using Yarn:
$ yarn add pomelo-sdk
or using NPM:
$ npm install --save pomelo-sdk
Quick Start
import * as pomelo from "pomelo-sdk"
// Round Computations
const match_value = 100000;
const sum_square = 1578.29538956198575761;
const divisor = pomelo.calculate_divisor(match_value, sum_square);
// => 63.359495732767975
// Grant Computations
const square = 706.30066043198416992;
const grant_estimate = pomelo.calculate_grant_estimated_match(square, divisor);
// => 44750.85368069151
// User Computations
const value = 180
const sum_sqrt = 26.57631766125593487
const funding_estimate = pomelo.calculate_funding_estimated_match(value, sum_sqrt, grant_estimate);
// => 22591.380526818404;