{"id":13454043,"url":"https://github.com/dialectlabs/actions","last_synced_at":"2025-04-09T05:08:14.540Z","repository":{"id":245133852,"uuid":"817348202","full_name":"dialectlabs/actions","owner":"dialectlabs","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-02T12:07:10.000Z","size":291,"stargazers_count":98,"open_issues_count":1,"forks_count":151,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-01T21:12:34.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dialectlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T14:11:52.000Z","updated_at":"2025-03-23T07:49:59.000Z","dependencies_parsed_at":"2024-06-20T01:39:45.194Z","dependency_job_id":"053aa18a-2d59-4331-bd44-a023b488cc9d","html_url":"https://github.com/dialectlabs/actions","commit_stats":null,"previous_names":["dialectlabs/actions-adapter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dialectlabs%2Factions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dialectlabs%2Factions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dialectlabs%2Factions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dialectlabs%2Factions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dialectlabs","download_url":"https://codeload.github.com/dialectlabs/actions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980837,"owners_count":21027808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:50.525Z","updated_at":"2025-04-09T05:08:14.516Z","avatar_url":"https://github.com/dialectlabs.png","language":null,"funding_links":[],"categories":["miscellaneous"],"sub_categories":[],"readme":"# @dialectlabs/actions\n\nThis repository contains reference implementations of Solana Actions using [Hono](https://hono.dev/), [Next.js](https://nextjs.org/), and [Express](https://expressjs.com/).\n\n## Getting Started\n\nFor Hono, run the development server in the root directory:\n\nFor Next.js, run the development server in it's [directory](examples/nextjs):\n\nFor Express, run the development server in the subfolder in it's [directory](examples/express):\n\n```bash\nnpm install\nnpm run dev\n```\n\n## Presets\n\n### Tensor Buy Floor\n\n- Place your api key to `TENSOR_API_KEY` constant in tensor-api.ts\n\n## How To\n\n### Actions Development with Hono\n\n1. See [Jupiter Swap Action example](examples/hono/examples/jupiter-swap/route.ts)\n2. Build your own action\n3. Add your router to [index.ts](examples/hono/examples/index.ts)\n\n### Actions Development with Next.js\n\n1. See [Donate Native SOL Action example](examples/nextjs/src/app/api/actions/donate-sol/route.ts)\n2. Build your own action\n   - Create a new folder in [src/app/api/actions](examples/nextjs/src/app/api/actions) with your action name\n   - Under that folder, create a route.ts file with your action\n\n### Actions Development with Express\n\n1. See [Donate Native SOL Action example](examples/express/transfer-sol/server.js)\n2. Build your own action\n   - Create a new folder in [examples/express](examples/express) with your action name\n   - Under that folder, create a server.js file with your action and make the necessary imports\n\n### Unfurl action into a Blink\n\nTo check and unfurl your or existing action open\n[https://dial.to/](https://dial.to/)  \ne.g action for swap on Jupiter using Hono: \u003clocalhost:3000/api/jupiter/swap/SOL-Bonk\u003e\n\n## Examples in this repo\n\n### Hono\n\nThere is a simple [donate](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/donate/route.ts) action as well as a [memo](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/memo/route.ts) action in this repo which serves as a template for creating your own actions.\n\nBasic examples\n1. [Jupiter](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/jupiter-swap/route.ts) (swap)\n2. [Helius](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/helius/stake/route.ts) (stake) \n3. [Meteora](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/meteora/swap/route.ts) (swap) \n4. [Sanctum](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/sanctum/trade/route.ts) (stake) \n5. [Tensor](https://github.com/dialectlabs/actions/tree/main/examples/hono/examples/tensor) (buy floor or bid)\n\nLive data examples\n1. [Basic live data](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/live-data/route.ts)\n\nAction chaining examples\n1. [Inline chaining](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/chaining/inline/route.ts)\n2. [Post-request chaining](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/chaining/post/route.ts)\n\nExternal link examples\n1. [External link](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/external-link/route.ts)\n\nSign message examples\n1. [Sign message](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/sign-message/route.ts)\n\nTransaction reference examples\n1. [Donate with tx reference](https://github.com/dialectlabs/actions/blob/main/examples/hono/examples/tx-reference/route.ts)\n\nYou can also unfurl these actions into Blinks on https://dial.to by entering the action URL into the Blink URL field.\n\nFor example, to unfurl the Helius stake action, you would enter the following URL into the Blink URL field:\n\n`http://localhost:3000/api/helius/stake`\n\n### Next.js\n\nThere are a few example actions in this repository for [Donating Native SOL](examples/nextjs/src/app/api/actions/donate-sol/route.ts) and [Donating SPL Tokens](https://github.com/dialectlabs/actions/blob/main/examples/nextjs/src/app/api/actions/donate-spl/route.ts).\n\nTo unfurl these actions into Blinks on https://dial.to by entering the action URL into the Blink URL field.\n\nFor example, to unfurl the Donate Native SOL action, you would enter the following URL into the Blink URL field:\n\n`http://localhost:3000/api/actions/donate-sol`\n\n### Express\n\nThere is an example action in this repository for [Donating Native SOL](examples/express/transfer-sol/server.js).\n\nTo unfurl this action into Blinks on https://dial.to by entering the action URL into the Blink URL field.\n\nFor example, to unfurl the Donate Native SOL action, you would enter the following URL into the Blink URL field:\n\n`http://localhost:8080/api/actions/transfer-sol`\n\n## Learn More\n\nTo learn more about Hono, take a look at the following resources:\n\n- [Hono Documentation](https://hono.dev/docs/) - learn about Hono features and API.\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n\nTo learn more about Express, take a look at the following resources:\n\n- [Express Documentation](https://expressjs.com/en/guide/routing.html) - learn about Express features and API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdialectlabs%2Factions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdialectlabs%2Factions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdialectlabs%2Factions/lists"}