Skip to content

0xRivendell/sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published