Skip to content

Instantly share code, notes, and snippets.

import { DriftClient, Wallet } from "@drift-labs/sdk";
import { Connection, Keypair } from "@solana/web3.js";
const RPC_URL = process.env.RPC_URL!;
const main = async () => {
const dc = new DriftClient({
env: 'mainnet-beta',
connection: new Connection(process.env.RPC_URL!),
wallet: new Wallet(Keypair.generate()),