SDK ReferenceInstallation

Installation

Install the Veil SDK to interact with the protocol.

Install

npm install @veil-dev/sdk

Prerequisites

  • Node.js 18+
  • Solana Web3.js
  • Anchor (for BN types)
npm install @solana/web3.js @coral-xyz/anchor

Setup

import { Connection, Keypair } from "@solana/web3.js";
import { Wallet } from "@coral-xyz/anchor";
import { VeilClient } from "@veil-dev/sdk";
 
// Connect to Solana
const connection = new Connection("https://api.devnet.solana.com");
 
// Your wallet
const keypair = Keypair.fromSecretKey(/* your secret key */);
const wallet = new Wallet(keypair);
 
// Create client
const client = new VeilClient({ connection, wallet });

Development

If building from source:

cd sdk
yarn install
yarn build