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.
- 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
Ensure you have the following installed on your local development machine:
- Node.js
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/your-username/solana-signature-verification.git
-
Get into the directory of the newly cloned repo
cd solana-signature-verification -
Install dependencies:
npm install
-
Start the server:
npm start
Welcome route to verify the API is running.
Verify Solana message signature and generate JWT token.
-
Request Body:
{ "publicKey": "yourPublicKeyHere", "signature": "yourSignatureHere" } -
Response:
{ "isValid": true, "token": "yourJWTtokenHere", "message": "Signature is valid" }
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" }