Environment Variables Config
The framework uses environment variables for configuration. You’ll need to create a .env file in your project’s root directory.
Example .env
File
.env
File# Required API keys and configurations
PRIVATE_KEYPAIR=<YOUR_PRIVATE_KEYPAIR> # Replace with your private keypair for deployment
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> # Replace with your OpenAI API key
RPC_ENDPOINT=https://api.mainnet-beta.solana.com # Replace with your RPC endpoint URL
# Trade parameters
ACTION=buy # Set to "buy" or "sell"
MINT=<YOUR_TOKEN_MINT_ADDRESS> # Replace with the token contract address
AMOUNT=10000 # Replace with the amount of SOL or tokens to trade
# Debugging
NODE_DEBUG=module
Replace the placeholders with your actual credentials.
How to Use Environment Variables
Add the
.env
file to your project root.The framework automatically loads these variables using the
dotenv
package.
Dependencies
The framework utilizes several dependencies for its functionality. Below is a table of the key dependencies:
@solana/web3.js
^1.98.0
Solana blockchain interaction.
dotenv
^16.4.7
Secure management of environment variables.
firebase
^11.1.0
Firebase SDK for authentication and database integration.
node-fetch
^3.3.2
Lightweight module to make HTTP requests.
form-data
^4.0.1
Handling form data in HTTP requests.
openai
^4.77.3
Integration with OpenAI’s GPT models for AI-based functionalities.
bs58
^6.0.0
Base58 encoding and decoding for working with Solana data structures.
Last updated