@pooltogether/v5-utils-js v0.0.1-beta.19
🧰 Javascript Utilility Library - PoolTogether V5
Calculations, Computations and Core Logic
The @pooltogether/v5-utils-js
node module package provides computations for the PoolTogether V5 protocol.
High-order operations like processing subgraphs and chain state (draws, winners, etc..) is included in the computations
namespaced functions.
🖥️ Computations:
Consume subgraph and protocol chain state to return computed outcomes:
Create Issue to request new features.Open Pull Request adhering to Contribution guidelines.
💾 Installation
This project is available as an NPM package:
npm install @pooltogether/v5-utils-js
yarn add @pooltogether/v5-utils-js
The repo can be cloned from Github for contributions.
git clone https://github.com/pooltogether/v5-utils-js
🏆 Quickstart (Draw Results)
Functions like computeDrawWinners(chainId, prizePool)
compute and return JSON of winners for each tier of a prize pool, grouped by vault.
import { computeDrawWinners } from '@pooltogether/v5-utils-js';
// Compute Winners for the last Draw (where prizePool is the address)
const winners = computeDrawWinners(chainId, prizePool);
// Returns:
/**
{}
* /
📖 Documentation
Namespaces
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago