1.1.13 • Published 6 months ago

@liquidloans/lib-ethers-dev v1.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@liquidloans/lib-ethers

Ethers-based library for reading Liquid Loans protocol state and sending transactions.

Quickstart

Install in your project:

npm install --save @liquidloans/lib-base @liquidloans/lib-ethers ethers@^5.0.0

Connecting to an Ethereum node and sending a transaction:

const { Wallet, providers } = require("ethers");
const { EthersLiquidLoans } = require("@liquidloans/lib-ethers");

async function example() {
  const provider = new providers.JsonRpcProvider("http://localhost:8545");
  const wallet = new Wallet(process.env.PRIVATE_KEY).connect(provider);
  const liquidLoans = await EthersLiquidLoans.connect(wallet);

  const { newVault } = await liquidLoans.openVault({
    depositCollateral: 5, // PLS
    borrowUSDL: 2000
  });

  console.log(`Successfully opened a LiquidLoans Vault (${newVault})!`);
}

More examples

See packages/examples in the repo.

Liquid Loans's Dev UI itself contains many examples of @liquidloans/lib-ethers use.

API Reference

For now, it can be found in the public Liquid Loans repo.

1.1.1

8 months ago

1.1.9

6 months ago

1.1.8

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.0.7

8 months ago

1.1.5

7 months ago

1.0.6

8 months ago

1.1.4

7 months ago

1.0.5

10 months ago

1.1.3

7 months ago

1.0.4

11 months ago

1.1.2

8 months ago

1.1.12

6 months ago

1.1.11

6 months ago

1.1.10

6 months ago

1.1.13

6 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago