@rivendell/defi
TypeScript icon, indicating that this package has built-in type declarations

1.0.32 • Public • Published

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

Package Sidebar

Install

npm i @rivendell/defi

Weekly Downloads

3

Version

1.0.32

License

MIT

Unpacked Size

70.4 kB

Total Files

24

Last publish

Collaborators

  • shlok_28