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.1.tar.gz (13.5 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.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moonfun_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 13.5 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.1.tar.gz
Algorithm Hash digest
SHA256 c11a486d3548fca42c08650679c240fca5afe6502b6b52617e53be80b8ac899c
MD5 8932fd0d0a5b922b4b18eb6e0c1f04a9
BLAKE2b-256 aa3cdff96dfc001a3c0be7447bd0f27d366fbd417b7942a5a518d74951b53d07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moonfun_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b643c4771122aaefa3e19a7d902de73d5ee7dadc21f9a2fb54b972b7b7a7215c
MD5 4db6d3aacd29625f5ff1f79f5e14b967
BLAKE2b-256 91d493d9199692cfa36d70ac2b2534f351ae960cb536a4d1bddf69dbead62fbb

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