Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to `citrate-labs-sdk` are documented here. This project adhe

## [Unreleased]

## [0.9.0] - 2026-11-12: the r1007 network

Breaking (0.x minor): the vendored address book and the genesis check move from r1006 to r1007
(live 2026-11-12T14:00Z). A client or manager of this version refuses an r1006 node.

### Changed

- `citrate_sdk/_generated/federation_contract.json` is the r1007 federation contract
(citrate-federation#579, built from citrate-chain's root book). The expected genesis is r1007's
block 0, `0xcf68634502b4fca1e977ac8dd35aa006bb40c04208d5cd55f1c2b508bba96631`.
`CitrateClient`, the write-path managers (`pinned_send`) and
`verify_wallet_address_on_chain` raise `WrongNetworkError` (`WRONG_NETWORK`) on an r1006 node,
as they did on r1005. To keep talking to another network, pass `expected_genesis_hash=`.
- The block-0 contract and account-abstraction addresses are unchanged (CREATE2). The 28
contracts deployed after block 0 (TenantHierarchy, the Quorum registries, the DefensePrime
registries and others) moved to the r1007 post-genesis deployer's addresses. The root book folds
them into `contracts()` under their own keys, for example `TenantHierarchy`.

## [0.8.0] - 2026-11-08 — contract verification on CitrateScan

Minor release: new API only, nothing removed or changed in an incompatible way. Publish once the
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ chain). It mirrors the canonical TypeScript SDK (`@citratelabs/sdk`) and may lag

Tokenomics are not yet determined; see [docs.citrate.ai](https://docs.citrate.ai).

This release carries the **r1006** address book (citrate-chain
`contracts/addresses/r1006/40204.json`, genesis block `0xa3651a27…6cdd4`). Two networks can share
chain id 40204 (r1005 and r1006 do), so before the client or a manager sends a transaction, and
This release carries the **r1007** address book (citrate-chain's root book
`contracts/addresses/40204.json`, genesis block `0xcf686345…ba96631`). Several networks share
chain id 40204 (r1005, r1006 and r1007 do), so before the client or a manager sends a transaction, and
before `verify_wallet_address_on_chain` trusts the factory, the SDK reads block 0 and raises
`WrongNetworkError` (`error_code="WRONG_NETWORK"`) unless its hash is that genesis.
`client.verify_network()` runs the check up front. `LiquidStakingPool` is not in r1006 block 0,
`client.verify_network()` runs the check up front. `LiquidStakingPool` is not deployed on r1007 (nor on r1006),
so `StakingManager` has no default address.

See the concepts in the docs: <https://docs.citrate.ai>.
Expand Down Expand Up @@ -106,7 +106,7 @@ Point the SDK at a local Citrate stack on one machine instead of the public test
client = CitrateClient(
rpc_url="http://localhost:8545",
private_key="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", # anvil acct #0
expected_genesis_hash=None, # a local devnet is not the r1006 genesis
expected_genesis_hash=None, # a local devnet is not the r1007 genesis
)
assert client.get_chain_id() == 40204
```
Expand Down Expand Up @@ -218,7 +218,7 @@ forge and hardhat can verify against the same API directly. Two details matter o
| `CITRATE_GATEWAY_API_KEY` | — | `cgk_` bearer key for the inference gateway |

`CitrateClient(rpc_url, private_key=None, timeout=..., allow_insecure_http=False, chain_id=None,
expected_genesis_hash=<vendored>)`. The expected chain id (40204), genesis hash (r1006) and
expected_genesis_hash=<vendored>)`. The expected chain id (40204), genesis hash (r1007) and
gateway base URL come from the vendored federation artifact; `citrate contract` prints the full
table. The managers take the same `chain_id=` / `expected_genesis_hash=` keywords.

Expand Down
2 changes: 1 addition & 1 deletion citrate_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
wait_for_verification,
)

__version__ = "0.8.0"
__version__ = "0.9.0"
__author__ = "Citrate Team"

__all__ = [
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "citrate-labs-sdk"
version = "0.8.0"
version = "0.9.0"
description = "Python SDK for the Citrate distributed AI network (chain 40204). The canonical TypeScript SDK is @citratelabs/sdk on npm; this Python client is opt-in and may lag it."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading