1.0.0 • Published 10 months ago

@dcspark/milkomeda-liquid-staking v1.0.0

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

milkomeda-liquid-staking-js

Synopsis

This is a JavaScript library to help interface with the Milkomeda Liquid Staking protocol. It includes helper methods that make intefacing with the the Milkomeda Liquid Staking protocol easy.

Build

$ npm install
$ npm run build

Installation

In your project run:

npm install --save @dcspark/milkomeda-liquid-staking-js

Getting Started

Create an instance of MLS using an ethers provider.

Examples

Through an RPC Provider

import { MilkomedaLiquidStaking } from "@dcSpark/milkomeda-liquid-staking-js";
import { ethers } from "ethers";

const provider = new ethers.providers.JsonRpcProvider("<RPC_URL>");
const liquidStaking = new MilkomedaLiquidStaking.createAsync(provider);

With custom signer

import { MilkomedaLiquidStaking } from "@dcSpark/milkomeda-liquid-staking-js";
import { ethers } from "ethers";

const provider = new ethers.providers.JsonRpcProvider("<RPC_URL>");

const signer = new ethers.Wallet("<YOUR_PK>", provider);

const liquidStaking = new MilkomedaLiquidStaking.createAsync(signer);