Skip to main content

Installation

npm install @skate-org/skate_amm_solana

SDK Initialization

import { Connection, Keypair } from "@solana/web3.js";
import { Wallet } from "@coral-xyz/anchor";
import { SkateSDK, Environment } from "@skate-org/skate_amm_solana";

// Use the appropriate RPC URL
const connection = new Connection(process.env.RPC_URL_902!, "confirmed");

// Create wallet from keypair
const keypair = Keypair.generate(); // or load from file
const wallet = new Wallet(keypair);

// Or initialize for PRODUCTION environment
const sdkProduction = new SkateSDK(connection, Environment.PRODUCTION, wallet);

Reference

  • SDK README ↗
  • Check the README for:
    • Configure token pair
    • Address conversion
    • Important notes
    • and more..