@sovryn/perpetual-swap
TypeScript icon, indicating that this package has built-in type declarations

5.0.4 • Public • Published

Usage

Install the package Read the Whitepaper.

$ npm install --save @sovryn/perpetual-swap

Then in your script:

import { perpQueries, perpUtils } from "@sovryn/perpetual-swap";

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 '@sovryn/perpetual-swap/dist/scripts/utils/walletUtils';

Readme

Keywords

none

Package Sidebar

Install

npm i @sovryn/perpetual-swap

Weekly Downloads

0

Version

5.0.4

License

UNLICENSED

Unpacked Size

10.8 MB

Total Files

695

Last publish

Collaborators

  • soulbit
  • victor-creed
  • pietro.maximoff
  • grinry