https://github.com/justshiftjk/solana-moonshot-swap
Node.js and Express backend project that facilitates moonshot swap transactions using moonshot-sdk, TypeScript, Solana web3, and solana/spl-token. It listens for swap (buy/sell) requests and creates transactions accordingly.
https://github.com/justshiftjk/solana-moonshot-swap
express moonshot-sdk nodejs solana solana-trading solana-web3 spl-token typescript
Last synced: about 1 year ago
JSON representation
Node.js and Express backend project that facilitates moonshot swap transactions using moonshot-sdk, TypeScript, Solana web3, and solana/spl-token. It listens for swap (buy/sell) requests and creates transactions accordingly.
- Host: GitHub
- URL: https://github.com/justshiftjk/solana-moonshot-swap
- Owner: justshiftjk
- License: mit
- Created: 2024-07-18T07:11:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T07:35:44.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T15:47:31.507Z (over 1 year ago)
- Topics: express, moonshot-sdk, nodejs, solana, solana-trading, solana-web3, spl-token, typescript
- Language: TypeScript
- Homepage:
- Size: 48.8 KB
- Stars: 9
- Watchers: 0
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Moonshot Swap Transaction Backend
This is a Node.js and Express backend project that facilitates moonshot swap transactions using moonshot-sdk, TypeScript, Solana web3, and solana/spl-token. It listens for swap (buy/sell) requests and creates transactions accordingly. The project is deployable to Vercel.
## Features
- Handle swap (buy/sell) requests.
- Create moonshot swap transactions.
- Integration with Solana blockchain.
- Deployable to Vercel.
## Technologies
- Node.js
- Express.js
- TypeScript
- moonshot-sdk
- @solana/web3.js
- @solana/spl-token
## Installation
1. Clone the repository:
```bash
git clone https://github.com/dappsol/moonshot-swap.git
cd moonshot-swap
```
2. Install dependencies:
```bash
npm install
```
3. Update the `config.ts` file with any additional configuration settings as needed.
## Usage
### Starting the Project
To start the project, run:
```bash
npm start
```
or
```bash
yarn start
```
The project will run at:
```
http://localhost:9000
```
### Swap Endpoint
The swap endpoint is available at:
```
http://localhost:9000/api/moonshot/swap
```
### Creating Transactions
To create a transaction, use the following parameters:
- `mintAddress`: Token mint address for buying/selling.
- `amount`: When buying, input SOL amount; when selling, omit this value.
- `tradeDirection`: Use `"BUY"` for buying and `"SELL"` for selling.
- `slippageBps`: Default is `100` and can be omitted.
## Contact
If you have any questions or want more customized app for specific use cases, please feel free to contact me to below contacts.
- E-Mail: adamglab0731.pl@gmail.com
- Telegram: [@bettyjk_0915](https://t.me/bettyjk_0915)