From 6bc2ba8ab44e8b41b9cd2b1bc51022eaa1cfb964 Mon Sep 17 00:00:00 2001 From: SaulBuilds Date: Fri, 25 Sep 2026 16:49:15 -0700 Subject: [PATCH] docs(sdks/python): purchase_model_access fails closed; list timeout and chain_id The purchase_model_access row now says the method always raises and moves no funds, instead of naming a precompile. The CitrateClient __init__ row lists the timeout and chain_id parameters. Co-Authored-By: Claude Opus 5.5 (1M context) --- content/sdks/python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/sdks/python.md b/content/sdks/python.md index 164dd440..297d78ee 100644 --- a/content/sdks/python.md +++ b/content/sdks/python.md @@ -95,7 +95,7 @@ Source: `citrate_sdk/client.py` (class `CitrateClient`), exported from `citrate_ | Method | Signature | Notes | |---|---|---| -| `__init__` | `(rpc_url="http://localhost:8545", private_key=None, allow_insecure_http=False)` | `client.py`. Read-only without a key. | +| `__init__` | `(rpc_url="http://localhost:8545", private_key=None, allow_insecure_http=False, timeout=30.0, chain_id=None)` | `client.py`. Read-only without a key. `timeout` is the per-request timeout in seconds; `chain_id` pins the chain every signature is bound to (default 40204). | | `get_chain_id()` | `-> int` | `eth_chainId`, `client.py`. | | `get_balance(address)` | `-> int` | wei, `eth_getBalance`, `client.py`. | | `get_nonce(address)` | `-> int` | pending nonce, `eth_getTransactionCount`, `client.py`. | @@ -103,7 +103,7 @@ Source: `citrate_sdk/client.py` (class `CitrateClient`), exported from `citrate_ | `inference(model_id, input_data, encrypted=False, max_gas=1000000, recipient_public_key=None)` | `-> InferenceResult` | precompile `0x...0101`; the encrypted path fails closed without `recipient_public_key`, `client.py`. | | `get_model_info(model_id)` | `-> Dict` | `citrate_getModel`, raises `ModelNotFoundError`, `client.py`. | | `list_models(owner=None, limit=100)` | `-> List[Dict]` | `citrate_listModels`, `client.py`. | -| `purchase_model_access(model_id, payment_amount)` | `-> str` | needs a key; access-control precompile `0x...0104`, `client.py`. | +| `purchase_model_access(model_id, payment_amount)` | `-> str` | Fails closed: always raises `CitrateError` and moves no funds, because no on-chain access-purchase route exists yet. `client.py`. | Signing binds `chainId` under EIP-155 (`_eip155_chain_id` in `client.py`) so a signature cannot be replayed on another network. IPFS upload fails closed rather than fabricating a fallback CID (`_upload_to_ipfs` in `client.py`). A