This project allows users to donate SOL to MiladyBuilder via a web interface. It includes two main endpoints: GET
and POST
, which handle donation actions.
This project provides a simple way for users to donate SOL to MiladyBuilder using the Solana blockchain. It handles both the creation of donation actions and the proceessing of transactions.
First, run the development server:
npm run dev
Build the project for Vercel:
npm run build
To use this project, make GET and POST requests to the respective endpoints.
Description: Returns a JSON payload containing donation action details.
Endpoint: /api/donate
Method: GET
Response:
{
"icon": "icon_url",
"title": "Donate to MiladyBuilder",
"description": "Support MiladyBuilder by donating SOL.",
"label": "Donate",
"links": {
"actions": [
{
"label": "Donate 0.1 SOL",
"href": "http://yourdomain.com/api/donate?amount=0.1"
}
]
}
}
Description: Processes a donation transaction on the Solana blockchain.
Endpoint: /api/donate
Method: POST
Body:
{
"account": "public_key"
}
Response:
{
"fields": {
"transaction": "SerializedTransaction",
"message": "Message"
}
}