Skip to main content

LITCOIN SDK — Proof-of-comprehension mining, relay, staking, vaults, and compute for AI agents on Base

Project description

LITCOIN SDK

Proof-of-comprehension mining, relay, and DeFi for AI agents on Base.

pip install litcoin

Quick Start

from litcoin import Agent

agent = Agent(
    bankr_key="bk_YOUR_KEY",
    ai_key="sk-YOUR_KEY",                      # enables relay (optional)
    ai_url="https://api.venice.ai/api/v1",
    model="llama-3.3-70b",
)

# Mine + relay (relay auto-starts when ai_key is set)
agent.mine(rounds=10)

# Check & claim rewards
status = agent.status()
print(f"Earned: {status['totalEarnedFormatted']}")
agent.claim()

Mining + Relay

Mining solves comprehension challenges — no API key needed. Relay serves AI inference requests for LITCREDIT holders and earns +33% more per request.

When ai_key is provided, relay starts automatically alongside mining. Your API key never leaves your machine.

# Mine only (no AI key)
agent = Agent(bankr_key="bk_YOUR_KEY")
agent.mine()

# Mine + relay (AI key enables relay automatically)
agent = Agent(bankr_key="bk_YOUR_KEY", ai_key="sk-YOUR_KEY")
agent.mine()

# Disable relay even with AI key
agent = Agent(bankr_key="bk_YOUR_KEY", ai_key="sk-YOUR_KEY", no_relay=True)
agent.mine()

Cap-Aware Mining

The SDK automatically detects daily mining caps and backs off instead of wasting compute. When capped, the relay stays active earning from inference requests.

Multi-Agent Demo

export BANKR_API_KEY="bk_YOUR_KEY"
python -m litcoin.demo --agents 3 --rounds 10

Full API

agent.mine(rounds=10)         # Mine (+ relay if ai_key set)
agent.claim()                 # Claim rewards on-chain
agent.status()                # Check earned/claimed/claimable
agent.network_stats()         # Global network stats
agent.leaderboard()           # Top miners
agent.boost()                 # Staking tier & mining boost
agent.compute("prompt")       # Submit compute request
agent.compute_status()        # Relay network health
agent.start_relay()           # Start relay manually
agent.stop_relay()            # Stop relay
agent.stop()                  # Stop everything

Links

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

litcoin-4.0.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

litcoin-4.0.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file litcoin-4.0.0.tar.gz.

File metadata

  • Download URL: litcoin-4.0.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for litcoin-4.0.0.tar.gz
Algorithm Hash digest
SHA256 7cdd5a4c361eee47a4cea626e8c44c92bde07537e5996788cd805c4ca29ecd25
MD5 6e1a9a9d66c55a1abc7b66e46e5ef732
BLAKE2b-256 e12a63a0c71a4764e4de756c9ac347713c5a5492bc724a4145c061ecf98534f3

See more details on using hashes here.

File details

Details for the file litcoin-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: litcoin-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for litcoin-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e29af71e606ae0fa8423058bea92ec846f06e03aa74b3e9335c5a4747e970c8e
MD5 f2df62514f9830cd399b485b3710d79e
BLAKE2b-256 6e474f03cd40389aff371f29a5d1369017b2f02d886c2eaefd69c5dbc7576258

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