Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 766 Bytes

README.md

File metadata and controls

49 lines (34 loc) · 766 Bytes

overlay-sdk

Installation

  1. Build the package:
cd packages/overlay-sdk
pnpm run build
  1. Link the package to react application
cd ../../apps/overlay
pnpm add overlay-sdk

Usage

To get started with the Overlay SDK import the necessary module:

import { OverlaySDK } from 'overlay-sdk'

Initialization

Before using the SDK create an instance of the OverlaySDK class:

// Pass your own viem PublicClient

import { createPublicClient, http } from "viem";
import { arbitrumSepolia } from "viem/chains";

const rpcProvider = createPublicClient({
  chain: arbitrumSepolia,
  transport: http(),
});
const web3Provider = window.ethereum;

const sdk = new OverlaySDK({
  chainId: 421614,
  rpcProvider,
  web3Provider,
});