This project allows users to donate SOL to a specific account 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 a predefined account using the Solana blockchain. It handles both the creation of donation actions and the processing of transactions.
-
Clone the repository:
git clone https://github.com/rkmonarch/blinks-example.git cd blinks-example
-
Install the dependencies:
pnpm i
-
Start the development server:
pnpm run dev
To use this project, you can make GET and POST requests to the respective endpoints.
{
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7dPPWr-BRKzBy_Fig0v_snt-_onQj9Pl5xA&s",
"title": "Donate to the Rahul",
"description": "Support rahul by donating SOL.",
"label": "Donate",
"links": {
"actions": [
{
"label": "Donate 0.1 SOL",
"href": "http://yourdomain.com/api/donate?amount=0.1"
}
]
}
}
{
"account": "SenderPublicKey"
}
{
"fields": {
"transaction": "SerializedTransaction",
"message": "Transaction created"
}
}
This project is licensed under the MIT License. See the LICENSE file for details.