1.0.32 • Published 4 months ago

@rivendell/defi v1.0.32

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

Rivendell - DeFI on Steroids.

Supercharge your dapp with defi in < 5 lines of code.

Follow the below steps:

  1. Install the sdk via npm/yarn/pnpm
pnpm install @rivendell/defi
  1. Import & Initialize the Intents class in your node.js file
import { Riv } from '@rivendell/defi'

const riv = new Riv('test-api-key')
  1. To enable staking in your dapp, copy and paste the code snippet below
const stakeTx = await riv.stake({ chainId, amount })

This stakeTx contains the following:

{
    to: "",
    value: "",
    data: "calldata of the ethereum transaction"
}
  1. To enable erc20 transfers in your dapp, copy and paste the code snippet below
const transferTx = await riv.transferTokens({ chainId, amount, token, to })

The above transaction object can be signed by eoa's, aa's, etc to execute staking eth via lido.

We support all evm based chains (kinda sorta)

We're still in beta. For any queries/integrations, reach out to me: shlok@0xrivendell.xyz