This project facilitates swap (buy/sell) transactions using the Moonshot SDK, TypeScript, Solana web3, and solana/spl-token. When a swap request is received, a transaction is created and executed on the Solana blockchain.
- Handles buy and sell swap requests
- Integrates with Moonshot SDK
- Utilizes Solana web3 for blockchain interactions
- Manages SPL tokens using solana/spl-token
- Node.js (v14 or later)
- Yarn or npm
- Solana CLI
- Moonshot SDK
- Clone the repository:
git clone https://github.com/dappsol/moonshot-swap.git
cd moonshot-swap
- Install the dependencies:
Using Yarn:
yarn install
Using npm:
npm install
- Compile the TypeScript code:
Using Yarn:
yarn build
Using npm:
npm run build
- Run the project:
Using Yarn:
yarn start
Using npm:
npm start
.
├── src
│ ├── index.ts # Entry point of the application
│ ├── config.ts # Configuration file
│ ├── swap.ts # Swap transaction logic
│ ├── utils.ts # Utility functions
├── .env # Environment variables
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please contact [your email] or open an issue on GitHub.
Here is a sample README file for your project:
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.
- Handle swap (buy/sell) requests.
- Create moonshot swap transactions.
- Integration with Solana blockchain.
- Deployable to Vercel.
- Node.js
- Express.js
- TypeScript
- moonshot-sdk
- @solana/web3.js
- @solana/spl-token
-
Clone the repository:
git clone https://github.com/dappsol/moonshot-swap.git cd moonshot-swap
-
Install dependencies:
npm install
-
Update the
config.ts
file with any additional configuration settings as needed.