Skip to content

drift-labs/solana-actions-server

Repository files navigation

Express TypeScript API

Prerequisites

  • Node.js
  • npm or yarn
  • A .env file with necessary configurations

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd <repository-directory>
  2. Install dependencies:
     npm install
     # or
     yarn install
  3. Create a .env file:
     BUCKET=<your-public-bucket-url>
     ENV=<your-environment (e.g., 'devnet')>
     PORT=<your-port (default: 3000)>
     NODE_ENV=<your-node-env (e.g., 'development')>
     URL=<your-production-url>
  4. Start the server
     npm run dev
     # or
     yarn dev

Routes

GET /blinks/deposit?token=<token>&ref=<referralCode>

POST /transactions/deposit?token=<token>&amount=<amount>&ref=<referralCode>

Content-Type: application/json
{
  "account": "<account-public-key>"
}

About

open source drift blink template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages