Skip to main content

Unified SDK for Meme Platform with triple-lock security

Project description

MoonfunSDK - Python

Unified SDK for Meme Platform with triple-lock security.

Installation

pip install -r requirements.txt

Or install from source:

python setup.py install

Quick Start

from moonfun_sdk import MoonfunSDK
import os

# Initialize SDK
sdk = MoonfunSDK(
    private_key=os.getenv('PRIVATE_KEY'),
    image_api_url="https://your-api-url.com"
)

# Create Meme token
result = sdk.create_meme(prompt="A funny cat")
print(f"Token created: {result['token_address']}")

# Buy tokens
sdk.buy_token(token_address="0x...", bnb_amount=0.1)

# Sell tokens
balance = sdk.get_token_balance("0x...")
sdk.sell_token(token_address="0x...", amount=balance)

Features

  • One-Click Meme Creation: create_meme() handles entire flow
  • Triple-Lock Security: Signature + Timestamp + Balance verification
  • Token Trading: Buy and sell tokens with slippage protection
  • Comprehensive Error Handling: Custom exceptions for all error cases
  • Type Hints: Full type annotations for better IDE support

Examples

See examples/ directory:

  • example_create_meme.py - Create a Meme token
  • example_trading.py - Buy and sell tokens

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moonfun_sdk-1.0.3.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moonfun_sdk-1.0.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file moonfun_sdk-1.0.3.tar.gz.

File metadata

  • Download URL: moonfun_sdk-1.0.3.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for moonfun_sdk-1.0.3.tar.gz
Algorithm Hash digest
SHA256 317fc7126667b9c88487a1aac2c305bfcbf9b5df7cd8acaa1e9b311a5d7e81ce
MD5 f48c0ea0b868a676f6829eaf70bed130
BLAKE2b-256 ecfa255a07eb4f594efcb0d4d0ac9c39703f21e41d2379d28aaa35d4291b64e2

See more details on using hashes here.

File details

Details for the file moonfun_sdk-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: moonfun_sdk-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for moonfun_sdk-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2445ebe72018ce43c1d31fc761f5a78e4e9e94e7b01c4a26b38e929919633583
MD5 5ecf168f9c15104a5e895874b76f7b04
BLAKE2b-256 d18d9d0fb9ded8381b821b56b0c38da164f17f75f80834ae94803f470e6b5d54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page