@rivendell/defi
v1.0.32
Published
DeFi Building Blocks - powered by Rivendell
Downloads
17
Maintainers
Readme
Rivendell - DeFI on Steroids.
Supercharge your dapp with defi in < 5 lines of code.
Follow the below steps:
- Install the sdk via npm/yarn/pnpm
pnpm install @rivendell/defi
- Import & Initialize the Intents class in your node.js file
import { Riv } from '@rivendell/defi'
const riv = new Riv('test-api-key')
- 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"
}
- 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: [email protected]