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.0.0.tar.gz (17.6 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.0.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for litcoin-3.0.0.tar.gz
Algorithm Hash digest
SHA256 f7da914dd97e2c093f4e24b5ee2a9d3ee1c863e2c75692c929c3a2abc428a264
MD5 8f757408155b4e4bdf47aa06432dc22d
BLAKE2b-256 27a5c4819266ae38a09aac69732a9de33af7bbdc95c898626a80aa2e1eefa110

See more details on using hashes here.

File details

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

File metadata

  • Download URL: litcoin-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ae0a17f722d514b1cb554b74f3aa3b903d50ab6cfcb60bac8bc9edd18599a6b
MD5 0839350bd99eb388e176a9c3c578644b
BLAKE2b-256 2f8233e99c2314bb6818d3ea91f16750c13ba9f5777ccc8a203ad834a219cb88

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