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-3.2.0.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

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

litcoin-3.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for litcoin-3.2.0.tar.gz
Algorithm Hash digest
SHA256 f259fbcd1fe054ea7fe541a68923a1f178a993aa7829bccf438572c0bea0abc8
MD5 ea6186efb0fa3c80d543c77be211e476
BLAKE2b-256 d5d4f5a3f2ddb1fdaa339bfdd19b3ddc82b10fda7f6b27ebfc27c7c1f1c7f5a4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for litcoin-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c50cd0289178335e2267a852ae7fa0a04fa8677fc05ac8ebb394218e016ee5b5
MD5 bce38c918d164aeb5b810dcfe6b8b399
BLAKE2b-256 7a31da5b720f94a3408ec3f2fca216e6393c66b4fef323c2bbbe943881789671

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