π¦ ClawHub
moonfun_sdk
by @moonnfunofficial
Python SDK for BSC enabling creation of AI-generated Meme tokens with stable minting and experimental token trading (buy/sell) features.
π‘ Examples
import os
from moonfun_sdk import MoonfunSDKInitialize with private key
sdk = MoonfunSDK(private_key=os.getenv('PRIVATE_KEY'))Create Meme token
result = sdk.create_meme(prompt="A happy cat celebrating")print(f"Token: {result['token_address']}")
print(f"View: https://moonn.fun/detail?address={result['token_address']}")
βοΈ Configuration
Default Configuration
SDK comes pre-configured with hosted services:
No additional configuration needed for basic usage.
Custom Configuration
sdk = MoonfunSDK(
private_key="0x...",
image_api_url="https://custom-api.com", # Optional
platform_url="https://moonn.fun", # Default
rpc_url="https://bsc-dataseed.bnbchain.org" # Default
)
Environment Variables
Supported environment variables:
PRIVATE_KEY (required): Ethereum private keyMOONFUN_IMAGE_API_URL (optional): Custom image API endpointπ Tips & Best Practices
# β
Use environment variables
sdk = MoonfunSDK(private_key=os.getenv('PRIVATE_KEY'))β
Use dedicated wallets
Create new wallet for SDK operations only
β Never hardcode keys
sdk = MoonfunSDK(private_key="0x123...") # Don't do this
TERMINAL
clawhub install moonfunsdk