Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@rivendell/defi

0xRivendell20MIT1.0.32TypeScript support: included

DeFi Building Blocks - powered by Rivendell

intents, intents-sdk, bytekode, bytekode-labs, web3, rivendell, defi, automation, 0xrivendell, ethereum, ethers, smart accounts, smart contract wallets

readme

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')


3. 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" }

4. 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