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.6.tar.gz (15.5 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.6-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.6.tar.gz
  • Upload date:
  • Size: 15.5 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.6.tar.gz
Algorithm Hash digest
SHA256 ab6ae99fcb9d05dd988237eac5a6bb2d7388a5607c126f9339b354ea26277902
MD5 2b7f3d5494f2f3aeef3feceed0c29b03
BLAKE2b-256 4f8d623b1132162d0931bf6bef1db49a0c75b49bb7f547d338b89478fd10f6a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 9.7 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2b7c21752e25afbe9ded4a2dfc7459f49d52f6021ba5f7055e84eee5eaabd6c1
MD5 d47543bc2717674f58663ebbefa0e858
BLAKE2b-256 1820a72413305cc16e7851dd7e65bb192b419d8b0514648fcfecf017b31a4f93

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 Sentry Error logging StatusPage Status page