@flipflop-sdk/cli
v1.3.18
Published
FlipFlop CLI tool for common operations
Maintainers
Readme
FlipFlop CLI ✨
A command-line interface for Flipflop token operations.
Installation
npm install -g @flipflop-sdk/cliUsage
Authentication
The CLI supports two ways to provide your keypair:
- Base58 format: Use
--keypair-bs58with your private key in base58 format - File format: Use
--keypair-filewith path to a JSON file containing your private key as an array of 64 numbers
Note: If both parameters are provided, --keypair-file takes priority.
Commands
Launch a new token
flipflop launch --name "MyToken" --symbol "MTK" --keypair-file ./keypair.json --rpc <your_rpc_url>
# or
flipflop launch --name "MyToken" --symbol "MTK" --keypair-bs58 "your_base58_private_key" --rpc <your_rpc_url>Set URC code
flipflop set-urc --mint <mint_address> --urc "mycode" --keypair-file ./keypair.json --rpc <your_rpc_url>
# or
flipflop set-urc --mint <mint_address> --urc "mycode" --keypair-bs58 "your_base58_private_key" --rpc <your_rpc_url>Mint tokens
flipflop mint --mint <mint_address> --urc "mycode" --keypair-file ./keypair.json --rpc <your_rpc_url>
# or
flipflop mint --mint <mint_address> --urc "mycode" --keypair-bs58 "your_base58_private_key" --rpc <your_rpc_url>Display mint information
flipflop display-mint --mint <mint_address> --rpc <your_rpc_url>Display URC information
flipflop display-urc --urc "mycode" --rpc <your_rpc_url>View system configuration
flipflop system-config --rpc <your_rpc_url>Displays comprehensive system configuration including:
- System admin address
- Token count
- Fee rates and accounts
- Pool settings
- System status
Upload metadata and get URI
flipflop metadata --name "MyToken" --symbol "MTK" --description "My awesome token" --image-path ./token-image.png --rpc <your_rpc_url>Uploads token metadata (including image) and returns the metadata URI for use in token creation.
Keypair File Format
The keypair file should be a JSON file containing an array of 64 numbers representing your private key:
[174, 47, ..., 238, 135]Global Options
--rpc <url>: RPC endpoint (default: https://api.mainnet-beta.solana.com)--keypair-bs58 <bs58>: Keypair in base58 format--keypair-file <path>: Path to keypair file (JSON array format)
Command-specific Options
Launch Command
--name <name>: Token name (required)--symbol <symbol>: Token symbol (required)--uri <uri>: Token metadata URI (optional)--token-type <type>: Token type - meme or standard (default: meme)
Set URC Command
--mint <address>: Mint account address (required)--urc <code>: URC referral code (required)
Mint Command
--mint <address>: Mint account address (required)--urc <code>: URC referral code (required)
Display Commands
--mint <address>: Mint account address (for display-mint)--urc <code>: URC code (for display-urc)
Metadata Command
--name <name>: Token name (required)--symbol <symbol>: Token symbol (required)--description <description>: Token description (required)--image-path <path>: Path to image file (required)
Features
- 🚀 Token Launch: Create new tokens with customizable metadata
- 🎯 URC Management: Set and manage referral codes
- 💰 Token Minting: Mint tokens using URC codes
- 📊 Information Display: View mint and URC details
- ⚙️ System Configuration: Check current system settings
- 🖼️ Metadata Upload: Upload token images and metadata
- 🔐 Flexible Authentication: Support for both file and base58 keypairs
- 🌐 Multi-network Support: Configurable RPC endpoints
Dependencies
This CLI tool uses the following key libraries:
@flipflop-sdk/node: Core FlipFlop SDK functionality@solana/web3.js: Solana blockchain interaction@coral-xyz/anchor: Solana program frameworkcommander: Command-line interface frameworkdecimal.js: Precise decimal arithmeticbs58: Base58 encoding/decoding
Requirements
- Node.js >= 16.0.0
- npm or yarn package manager
Support
For issues and questions, please visit our GitHub repository.
