https://github.com/anotherrusty/solana-actions
Jupiter Swap Action Examples
https://github.com/anotherrusty/solana-actions
Last synced: over 1 year ago
JSON representation
Jupiter Swap Action Examples
- Host: GitHub
- URL: https://github.com/anotherrusty/solana-actions
- Owner: AnotherRusty
- License: apache-2.0
- Created: 2024-07-03T02:01:30.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-03T02:02:41.000Z (almost 2 years ago)
- Last Synced: 2024-09-15T19:14:40.264Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @dialectlabs/actions
This repository contains reference implementations of Solana Actions using [Hono](https://hono.dev/).
## Getting Started
First, run the development server:
```bash
npm install
npm run dev
```
## Presets
### Tensor Buy Floor
* Place your api key to `TENSOR_API_KEY` constant in tensor-api.ts
## How To
### Actions Development
1. See [Jupiter Swap Action example](examples/jupiter-swap/route.ts)
2. Build your own action
* Use specified openapi `responses` from [openapi.ts](examples/openapi.ts) for your POST, GET methods
* Use specified openapi `body` from [openapi.ts](examples/openapi.ts) for your POST methods
3. Add your router to [index.ts](examples/index.ts)
### Swagger UI
Open [http://localhost:3000/swagger-ui](http://localhost:3000/swagger-ui) with your browser to explore actions.
### Unfurl action into a Blink
To check and unfurl your or existing action open
[https://actions.dialect.to/](https://actions.dialect.to/)
e.g action for swap on Jupiter:
## Learn More
To learn more about Hono, take a look at the following resources:
- [Hono Documentation](https://hono.dev/docs/) - learn about Hono features and API.