0.2.1 • Published 1 year ago

parax-api v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

parax-api

A simple api for interacting with paraspace protocol

Feature

  1. 📖 internal contracts configurations
  2. 🤖️ multicall integration

Usage

npm i parax-api

developing usage: yarn install && yarn test

Example

// In this case, you are connecting to the test network of paraspace in goerli
// NOTE: provider.init() should be done before ues

import { Provider, ParaspaceMM as MM, Environment, NetworkName } from "parax-api"

const endpoint = "https://goerli.infura.io/v3/29d7bc88d05e4b929c13351513b1bba0"
provider = new Provider(Environment.DEVELOPMENT, NetworkName.goerli, endpoint)
await provider.init()

const decimal = await provider.connectAndSendTx(MM.APE, "decimals", [])
console.log(`APE decimal is ${decimal}`)

see release for CHANGELOG