1.0 React Hooks
Overview
Integrating the sdk into your frontend
yarn add @r3vl/sdk
--------- or ---------
npm install @r3vl/sdkimport { R3vlProvider, createClient as r3vlCreateClient } from "@r3vl/sdk";
import { WagmiConfig, createClient } from "wagmi";
const r3vlClient = r3vlCreateClient();
const wagmiClient = createClient({
// per wagmi instructions: https://wagmi.sh/examples/connect-wallet
});
const App = ({ Component, pageProps }: AppProps) => {
return (
<WagmiConfig client={wagmiClient}>
<R3vlProvider client={r3vlClient}>
<Component {...pageProps} />
</R3vlProvider>
</WagmiConfig>
)
}Creating Revenue Path (code subject to change)
At the moment, @r3vl/sdk is compatible with the following chains:
Here a live example of a NextJS implementation of the R3VL SDK
Withdrawing From Revenue Path
Get Revenue Path Balances
Get Revenue Path Tiers
Updating Revenue Path
Last updated