Skip to main content

bridgenode-llm

BridgeNode Python SDK — AI inference be API key. Mokėjimas: Solana USDC per x402 (automatinis handshake, fee sponsorship — agentui SOL nereikia).

Diegimas

pip install bridgenode-llm

Naudojimas

from bridgenode_llm import LLMClient

client = LLMClient()  # raktas iš .env (BRIDGENODE_WALLET_KEY)
resp = client.chat("deepseek-v4-flash", [
    {"role": "user", "content": "Labas!"}])
print(resp["choices"][0]["message"]["content"])

Viskas paslėpta: 402 → dalinis TX → PAYMENT-SIGNATURE → 200 (§4.1). Jokio API key.

.env

# Privalomas — jūsų Solana wallet private key (base58)
BRIDGENODE_WALLET_KEY=...
# Neprivalomi:
# BRIDGENODE_BASE_URL=https://bridgenode.cc/v1
# BRIDGENODE_MAX_PER_CALL=0.05   # spending policy: max USD per call (fail-closed)
# BRIDGENODE_DAILY_CAP=1.0       # spending policy: max USD per day

Apsaugos

  • Kvito verifikacija (Free-Riding apsauga): po 200 tikrinamas PAYMENT-RESPONSE — success, network, payer, fee payer'io parašas per mūsų TX žinutę, amount. Netikras kvitas → BridgenodeError.
  • Spending policy (fail-closed): BRIDGENODE_MAX_PER_CALL + BRIDGENODE_DAILY_CAP — tikrinama PRIEŠ pasirašant; viršijus → blokuota, jokio mokėjimo.
  • SIWX: automatinis žinomo agento identifikavimas (§5.7) — fallback į payment jei auth failina.

Komandos

client.chat(model, messages, max_tokens=..., mode="auto")  # mode: auto/eco/premium

Reikalavimai

  • Python ≥ 3.11
  • Solana wallet su USDC ATA (rent — agento atsakomybė, §3.3)

Nuorodos

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bridgenode_llm-0.2.3.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

bridgenode_llm-0.2.3-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file bridgenode_llm-0.2.3.tar.gz.

File metadata

  • Download URL: bridgenode_llm-0.2.3.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bfe8b9ade508875db5734a25bb1cf22c41b3f04f26bd870bd1a41b9864c331b2
MD5 22681cce63abe4df0faa9804f1012087
BLAKE2b-256 67c4a713a1e06b57ec3ae0bb274be5cff09629d5158f56ccb9db08b9854fcdd0

See more details on using hashes here.

File details

Details for the file bridgenode_llm-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: bridgenode_llm-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for bridgenode_llm-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d60f92778f06cc8d5bc83f2859b25ba33ed6c0c88a67f1d259ab6eb09fa14dc2
MD5 3061d8c05df99dcb8ed9e0904d25dde8
BLAKE2b-256 d76d35fd2280bd7ce67cd6c5ffa794dd44271b2dcbcf554e7a9b3a1c688c2b75

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