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

Uploaded Python 3

File details

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

File metadata

  • Download URL: litcoin-3.2.1.tar.gz
  • Upload date:
  • Size: 24.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.1.tar.gz
Algorithm Hash digest
SHA256 eb83720f4924ff44db355c246da9d80d759ec1b398624138cc1571cfd0aa1b6d
MD5 b845db27a4044f243d119edb45f1e4c6
BLAKE2b-256 63961592ccba267fb7b3bbd975f83d8505aebdad448dfcdab15a6fce7d6cd921

See more details on using hashes here.

File details

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

File metadata

  • Download URL: litcoin-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 25.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ecc74886977909c8e3344f2035cf5a28f13b6fa9d8afd8f061f38472b19a1c
MD5 e773f1950ea75a284d8dfa0a018075b2
BLAKE2b-256 58a823dae479bbd41b551fbf8976e91e1da7113c79a0df696ea085772ea13d66

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