Skip to content

ibrahimAlphaSquad/solana-signature-verification

Repository files navigation

Solana Signature Verification API

This project provides an API to verify Solana message signatures and manage key pairs with JWT authentication. The API is built using Express.js and includes Swagger documentation for easy reference.

Features

  • Verify Solana message signatures
  • Generate JWT tokens upon successful signature verification
  • Accept and process new public/private key pairs with JWT authentication
  • Swagger documentation for API endpoints

Getting Started

Prerequisites

Ensure you have the following installed on your local development machine:

  • Node.js
  • npm (Node Package Manager)

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/solana-signature-verification.git
  2. Get into the directory of the newly cloned repo

    cd solana-signature-verification
  3. Install dependencies:

    npm install
  4. Start the server:

    npm start

API Endpoints

GET /

Welcome route to verify the API is running.

POST /verify-signature

Verify Solana message signature and generate JWT token.

  • Request Body:

    {
      "publicKey": "yourPublicKeyHere",
      "signature": "yourSignatureHere"
    }
  • Response:

    {
      "isValid": true,
      "token": "yourJWTtokenHere",
      "message": "Signature is valid"
    }

POST /new-key-pair

Accept new public/private key pair with JWT authentication.

  • Request Headers:

    Authorization: Bearer yourJWTtokenHere
  • Request Body:

    {
      "publicKey": "newPublicKeyHere",
      "privateKey": "newPrivateKeyHere"
    }
  • Response:

    {
      "message": "New key pair processed successfully"
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published