Skoot-Skoot is a platform that leverages blockchain technology to revolutionize the electric scooter sharing economy. This repository contains the Solana action API for Skoot-Skoot, which handles USDC payments on the Solana blockchain.
This API implements a Solana action for transferring USDC tokens. It provides the following functionality:
- Checks the sender's USDC balance
- Prepares a transaction to transfer 1 USDC if the balance is sufficient
- Returns a serialized transaction ready for signing by a Solana wallet
- Balance checking before transaction preparation
- Secure transaction preparation using Solana web3.js and SPL token libraries
- RESTful API endpoint for easy integration with front-end applications
- Clone the repository
- Run
npm install
to install dependencies - Create a
.env
file based on.env.example
and fill in the required values - Run
npm start
to start the server - Use
npm test
to run the test suite
POST /api/actions/transfer-usdc
- Request body: { "senderPublicKey": "...", "recipientAddress": "..." }
- Response: { "serializedTransaction": "...", "message": "..." }
- Node.js
- Express.js
- @solana/web3.js
- @solana/spl-token
For more information about Skoot-Skoot, please contact https://x.com/ayorinde270