lq-provider
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

📦 paraspace-provider

A simple api for interacting with paraspace protocol

🌟 Features

  1. 🪐 internal integration of typechain and paraspace-core addresses
  2. 🤖️ multicall integration
  3. 🍵 ethers based rpc provider

✨ Usage

npm i lq-provider

🍻 Example

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

import { Provider, ParaSpaceEthMM as MM, Environment, NetworkName, RPCProviderType } from "paraspace-provider"

const rpcs = [
    {
        endpoint: "https://goerli.infura.io/v3/<your-api-key>",
        type: RPCProviderType.ArchiveRPC,
    },
    {
        endpoint: "https://eth-goerli.g.alchemy.com/v2/<your-api-key>",
        type: RPCProviderType.ArchiveRPC,
    }
    // and more ...
]

const provider = new Provider(Environment.DEVELOPMENT, NetworkName.goerli, rpcs)
await provider.init()

const reserves = await provider.connectAndSendTx(
    MM.ProtocolDataProvider,
    "getAllReservesTokens",
    []
)
const USDC = reserves.find({ symbol } => symbol === "USDC")
console.log(USDC)

🔖 see release for CHANGELOG

Readme

Keywords

none

Package Sidebar

Install

npm i lq-provider

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

221 MB

Total Files

5676

Last publish

Collaborators

  • ryan-man