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

# 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

  1. Add the .env file to your project root.

  2. 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:

Dependency
Version
Purpose

@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.

Development Dependencies

Dependency
Version
Purpose

typescript

^5.7.3

Enables static typing and type-checking in JavaScript.

ts-node

^10.9.2

Allows TypeScript code to run directly in Node.js.

@types/node-fetch

^2.6.12

Type definitions for node-fetch library.

tsconfig-paths

^4.2.0

Resolves paths for TypeScript configuration.

Last updated