Skip to content
 
 

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@dialectlabs/actions

This repository contains reference implementations of Solana Actions using Hono.

Getting Started

First, run the development server:

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
  2. Build your own action
    • Use specified openapi responses from openapi.ts for your POST, GET methods
    • Use specified openapi body from openapi.ts for your POST methods
  3. Add your router to index.ts

Swagger UI

Open 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/
e.g action for swap on Jupiter: localhost:3000/api/jupiter/swap/SOL-Bonk

Examples in this repo

There is a simple donate action in this repo which serves as a template for creating your own actions.

There are also a few example actions in this repository for Jupiter (swap), Helius (stake), Meteora (swap), Sanctum (stake), and Tensor (buy floor or bid).

You can find the code for these actions in the examples directory.

You can also unfurl these actions into Blinks on https://dial.to by entering the action URL into the Blink URL field.

For example, to unfurl the Helius stake action, you would enter the following URL into the Blink URL field:

http://localhost:3000/api/helius/stake

Learn More

To learn more about Hono, take a look at the following resources:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages