Quick Start
This guide will help you get started with the Solana AMM SDK.
Prerequisites
-
Update your package list:
sudo apt-get update
-
Install Node.js and npm:
sudo apt-get install -y nodejs npm
- Verify installation by running:
node --version
andnpm --version
- Verify installation by running:
-
Install Git:
sudo apt-get install -y git
- Verify installation by running:
git --version
- Verify installation by running:
Setup
-
Choose your installation method:
Option A - Install via npm (Recommended):
# Create a new directory and initialize mkdir my-amm-project cd my-amm-project npm init -y # Install the SDK npm install @confirmedwtf/solana-amm-sdk
Option B - Clone the repository:
git clone https://github.com/confirmedwtf/solana-amm-sdk cd solana-amm-sdk npm install
-
Create test file:
- If you installed via npm, create a new
test.mjs
file - If you cloned the repository, the test file is already included
You can copy our example test file from: https://github.com/confirmedwtf/solana-amm-sdk/blob/main/test.mjs
- If you installed via npm, create a new
-
Get a Solana RPC URL:
-
Edit
test.mjs
usingnano
nano test.mjs
Before editing, ensure you have the following ready:
- RPC URL: Your Solana RPC endpoint URL
- Token Mint Address: The address of your token's mint on Solana
- Private Key: Your wallet's private key (keep it secure)
Update the necessary settings in the
test.mjs
file with your RPC URL, Token Mint address, and private key.To save and exit
nano
, follow these steps:- Press
Ctrl + X
to begin the exit process. - Press
Y
to confirm that you want to save the changes. - Press
Enter
to write the changes to the file and exitnano
.
-
Run the app:
node test.mjs
- This command will start the application using the settings you configured in
test.mjs
.
- This command will start the application using the settings you configured in
-
Stop the app:
- To stop the application, press
Ctrl + C
in the terminal where the app is running.
- To stop the application, press
Configuration Tips
- RPC URL: Use a reliable provider to avoid connection issues
- Token Mint: This is your token's address on Solana (can be found on Solscan/Explorer)
- Makers Count:
- Start with a smaller number (e.g., 1000) to test
- Increase up to 5000+ for more market activity
- Volume Settings:
mCapFactor
: 0 = neutral, 1 = moderate increase, 2+ = stronger increasemCapFactor
of 0 is neutral, meaning the price will not changemCapFactor
of 1 is price positive, meaning you will not sell all of the tokens you are buying while generating volume
speedFactor
: This controls the delay between swaps. The average delay in seconds is calculated as(5000 + 10000/2) / 1000 / speedFactor
. For example:speedFactor
of 1 results in an average delay of 10 seconds between swapsspeedFactor
of 10 results in an average delay of 1 second between swaps- For a swap every minute, set
speedFactor
to approximately 0.167 - For a swap every 5 minutes, set
speedFactor
to approximately 0.033 - For a swap every 10 minutes, set
speedFactor
to approximately 0.017
minSolPerSwap
andmaxSolPerSwap
: Start small (0.005-0.006) and adjust based on your needs
- Jito Tip: Set to 10001 to prioritize your transaction
- Private Key: Support for both base 58 string format and byte array format
Important Notes
- Ensure you have enough SOL in your wallet (at least 0.03 SOL recommended)
- If transactions are not landing, try increasing the jito tip (defaults to 10000 lamports if not specified)
- Never share or commit your private keys
- Monitor your RPC usage to stay within provider limits