0.0.1 • Published 2 years ago

@d8x/perpetual-futures v0.0.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

Usage

Install the package

$ npm install --save @d8x/perpetual-futures

Then in your script:

import { perpQueries, perpUtils } from "@d8x/perpetual-futures";

And to use the functions from, let's say, scripts/utils/perpQueries.ts:

const { queryTraderState, queryAMMState, queryPerpParameters } = perpQueries;

The same works for the rest of the files:

const { getMarkPrice } = perpUtils;

Observation

In order to use walletUtils (only works on the backend. It doesn't work in UI because it needs to read the ABIs from disk) you'll have to import it like this:

import * as walletUtils from '@d8x/perpetual-futures/dist/scripts/utils/walletUtils';