Setup

Installation

Adding @delegatexyz/sdk to your project is just a single command.

npm install @delegatexyz/sdk viem

Importing

ES6 or Typescript
import { http } from "viem"
import { DelegateV1, DelegateV2 } from "@delegatexyz/sdk";
NodeJS require
const { http } = require("viem");
const { DelegateV1, DelegateV2 } = require("@delegatexyz/sdk");

Setup

The v1 or v2 SDK require the same parameters:

account is only required to use the write functions.

import { http } from "viem"
import { DelegateV1, DelegateV2 } from "@delegatexyz/sdk";

const RPC_URL = "";
const v1 = new DelegateV1(http(RPC_URL))
const v2 = new DelegateV2(http(RPC_URL))

Last updated