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
- Tinklalapis: https://bridgenode.cc
- Protokolas: x402 V2 (docs.x402.org)
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.2.tar.gz
(13.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bridgenode_llm-0.2.2.tar.gz.
File metadata
- Download URL: bridgenode_llm-0.2.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df3fbcc281b1a87b1f92dfc3fed9958bb39e45b6086c17835ba747be657099a5
|
|
| MD5 |
39d9c69cac5e4be97692f2ff59a8a3db
|
|
| BLAKE2b-256 |
4c6fe525ae53ce5091e894dfaa9353b51ba01b803ab50abeb751a2f19dfb0503
|
File details
Details for the file bridgenode_llm-0.2.2-py3-none-any.whl.
File metadata
- Download URL: bridgenode_llm-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1228893ce908ef11e202e59524a96d29c54dae0c544e34450a47ff87a638783e
|
|
| MD5 |
70f014227eebb31fb6550d3bb885db2f
|
|
| BLAKE2b-256 |
fe27c4ceaf1044498e5ee39e80f7856c952789e545775fd42d2a713cf4d8fbe0
|