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.5.tar.gz (14.7 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.5-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.5.tar.gz
  • Upload date:
  • Size: 14.7 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.5.tar.gz
Algorithm Hash digest
SHA256 adba5d7cf661e2be631a6f345036d5c9c186a6c41d11feb0427adc7909fefffc
MD5 1564f9b5737f08ebcace37f952806190
BLAKE2b-256 e3d640c45d6d94ac737e9259073fb9e609db5053c9937fb3bd9df9006ab4219b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bridgenode_llm-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f36e865a3304b89317f9dcb68e11b819af9d07f60d532d1bffa5206c982ef9aa
MD5 929753aad465713b514bcc4bf7af94dc
BLAKE2b-256 6edfb58ec666699fcf1e8e0e90dae6c8ea602afe0c931f57b0dfe2fb17737233

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