solidus-network
Python SDK for Solidus Network — did:solidus derivation, identifier
validation, W3C verification-method encoding, strict Ed25519, and BBS+ selective disclosure.
Status: on PyPI. pip install solidus-network. Wheels ship for five platforms (macOS arm64 and
x86_64, Linux x86_64 and aarch64, Windows x64) plus an sdist, published through PyPI Trusted
Publishing over OIDC, so no API token exists anywhere. Solidus runs on testnet only.
What it does, and what it does not
Ships: address and DID derivation · identifier validation (SPEC v0.2.0 §4.1) ·
publicKeyMultibase encoding and decoding · strict Ed25519 verification · BBS+ signature
verification and selective-disclosure proofs.
Not in the first version:
- Transaction signing. A write path means key handling, and in Python that means people pasting private keys into notebooks. The read path ships well first.
- DID resolution over the network. The encoding and validation this package does are the parts implementations get wrong. An HTTP client is not.
- SD-JWT VC issuance.
Install
pip install solidus-network
One wheel per platform serves CPython 3.9 and newer, so installing needs no Rust toolchain.
Installing from source
A clone builds on its own. The BBS+ code the binding needs is vendored in src/bbs.rs, so
Cargo.toml has no path into the Solidus monorepo. You need a Rust toolchain:
git clone --recurse-submodules https://github.com/solidusnetwork/solidus-py.git
cd solidus-py
pip install maturin
maturin develop
Usage
Every example below is executed by the test suite — pytest --doctest-glob='*.md' README.md. A
README that stops being true is a test failure. That is not decoration: an outside developer found
four blocks in our TypeScript README that did not compile against the published packages, and this
is the response.
Derive an identity from a mnemonic
>>> from solidus_network import seed_from_mnemonic, identity_key
>>> seed = seed_from_mnemonic(" ".join(["abandon"] * 23 + ["art"]))
>>> key = identity_key(seed)
>>> key.did("testnet")
'did:solidus:testnet:3tBoVe6XRtirzr8SdRotGgbkuEQN'
The identity key is seed64[:32] — a raw slice, deliberately not routed through the HKDF
hierarchy below. That asymmetry is load-bearing and frozen by the conformance vectors.
Derive a different key for every verifier
A wallet gives each verifier its own key, so two verifiers holding the same user cannot correlate them.
>>> from solidus_network import pairwise_key
>>> a = pairwise_key(seed, "rp-a.example.com")
>>> b = pairwise_key(seed, "rp-b.example.com")
>>> a.identifier == b.identifier
False
>>> a.did()
'did:solidus:testnet:3ThmUf3VBefVuaQSBGzC1fcP5iKS'
Validate a DID before you resolve it
This is what separates invalidDid from notFound — "no such DID" implies the identifier could
have existed.
>>> from solidus_network import is_valid_did
>>> is_valid_did("did:solidus:testnet:3tBoVe6XRtirzr8SdRotGgbkuEQN")
True
>>> is_valid_did("did:solidus:devnet:3tBoVe6XRtirzr8SdRotGgbkuEQN") # did-syntax:invalid-on-purpose
False
>>> is_valid_did("did:solidus:testnet:0OIl000000000000000000") # did-syntax:invalid-on-purpose
False
Read a key out of a DID Document, and verify with it
>>> from solidus_network import decode_public_key_multibase, ed25519
>>> import nacl.signing
>>> signer = nacl.signing.SigningKey(b"\x07" * 32)
>>> from solidus_network import public_key_multibase
>>> verification_method = {
... "type": "Ed25519VerificationKey2020",
... "publicKeyMultibase": public_key_multibase(bytes(signer.verify_key)),
... }
>>> signed = signer.sign(b"a credential")
>>> ed25519.verify_multibase(
... verification_method["publicKeyMultibase"], b"a credential", signed.signature)
True
Verification is strict: it rejects small-order keys and non-canonical encodings. The vacuous identity equation — an all-zeros key with an all-zeros signature, which satisfies ZIP-215 for any message — does not verify here.
>>> ed25519.verify(bytes(32), b"anything at all", bytes(64))
False
Verify a BBS+ selective-disclosure proof
The verifier never sees the undisclosed claims and never sees the issuer's signature. It sees the
proof, the issuer's public key, and the (index, message) pairs being asserted.
>>> import pytest
>>> _ = pytest.importorskip("solidus_network.solidus_network_native") # skips without the wheel
>>> from solidus_network import bbs
>>> sk = bytes.fromhex(
... "363ef9668e4e1cf86b5f2092c51f7c056d6841cec69920cc5d887f68c6cab6d1")
>>> bbs.public_key_hex(sk)[:32]
'9898c245f85011e9092e9a3d20ac204d'
(The importorskip line keeps this file runnable as a test in a clone without the compiled
extension. Your own code needs only the from solidus_network import bbs.)
Full sign → prove → verify flows, including every negative case, are in tests/test_vectors.py
against the published conformance suite.
API
| module | name | what it is |
|---|---|---|
solidus_network |
seed_from_mnemonic(mnemonic, passphrase="") |
BIP-39 → 64-byte seed, NFKD-normalised here |
identity_key(seed64) → DerivedKey |
seed64[:32], outside the HKDF tree |
|
pairwise_key(seed64, verifier_id) → DerivedKey |
HKDF-SHA512, one unlinkable key per verifier | |
DerivedKey.identifier · .did(network) |
base58 address · full did:solidus:… |
|
solidus_network.did |
identifier_for(public_key) |
base58(BLAKE3-256(key)[:20]) |
did_for(public_key, network) |
the full DID string | |
public_key_multibase(public_key) |
z6Mk…, with the 0xed01 multicodec header |
|
decode_public_key_multibase(mb) |
the inverse; also accepts pre-2026-08-07 headerless keys | |
is_valid_identifier(s) · is_valid_did(s) |
SPEC v0.2.0 §4.1 syntax | |
solidus_network.ed25519 |
verify(public_key, msg, sig) |
strict; returns False, never raises |
verify_multibase(mb, msg, sig) |
the same, straight from a DID Document | |
solidus_network.bbs |
public_key_hex(secret_key) |
from key bytes, never from IKM |
verify(sig_hex, pk_hex, header, messages) |
over the full message vector | |
create_proof(…) → proof hex |
holder side | |
verify_proof(…) |
verifier side |
Conformance
test-vectors/ is published so third parties can check us rather than take our word. This package
runs them itself, and prints its own scope:
8/13 vectors CHECKED. A green run does NOT mean 13/13. Out of scope:
credential-bundle (3) — agent-identity message map — product layer, not the protocol surface
did-tx-create (1) — transaction signing is out of v0.1.0 — read path first
tx-wire-binaryv2 (1) — v2 transaction wire encoding is part of the write path, out with did-tx-create
Eight of thirteen, stated openly, is the honest number. An unimplemented category fails this suite — it is never skipped. A runner that quietly passes what it does not understand reports full marks while checking a fraction, which is worse than having no runner: it manufactures confidence in exactly the artifact we ask outsiders to trust.
Ed25519 is strict, and the library choice is why
Verification must reject small-order public keys and non-canonical encodings, which is what gives strongly binding signatures — exclusive ownership, the property a verifiable credential exists to assert. ZIP-215 verification accepts both and does not.
This package depends on PyNaCl (libsodium) rather than cryptography (OpenSSL), whose Ed25519
is permissive about small-order keys. libsodium's exact behaviour varies by version, so it is
asserted in tests/test_ed25519_strict.py rather than promised here — a test is the only version of
this claim that stays true.
BBS+ is native, and here is what that costs
There is no usable native Python BBS+ implementation. Checked against PyPI on 2026-08-07: bbs is
an empty 0.0.1 placeholder, ursa is gone, and blspy/py_ecc are BLS primitives — building on
them would mean implementing draft-irtf-cfrg-bbs-signatures in Python.
So BBS+ binds the Rust crate via PyO3, which buys byte-parity with the chain and costs a
per-platform wheel. Everything else is pure Python and ships in the same wheel at no native cost.
The binding is feature-gated to bbs only, so no C BLS toolchain enters the build.
This is why the release ships wheels: an sdist alone would force every user to have a Rust
toolchain. The release workflow (.github/workflows/release.yml) builds five wheels rather than
thirty: pyo3's abi3-py39 makes one wheel per platform serve every CPython from 3.9
up. Measured, not assumed — a wheel built on CPython 3.14 was installed on 3.9, 3.11 and 3.13 and
reproduced the frozen BBS+ public key and DID on all three.
Development
Without a Rust toolchain — runs everything except the four BBS+ vectors, and says so:
git clone --recurse-submodules https://github.com/solidusnetwork/solidus-py.git
cd solidus-py
uv venv .venv && . .venv/bin/activate
uv pip install pytest blake3 pynacl
PYTHONPATH=python pytest
test-vectors/ is a submodule pointing at
solidus-test-vectors — the same repository
we ask third parties to run against their own implementations. It is a pointer, not a copy, so the
suite here cannot quietly diverge from the one we publish.
With a Rust toolchain, for the full 8/13:
uv pip install maturin
maturin develop
pytest
SOLIDUS_REQUIRE_NATIVE=1 turns a missing extension from a report into an error. CI sets it, so a
wheel that shipped without its native half cannot go green.
pytest runs the conformance vectors, every docstring example, and every example in this file.
Before believing the suite, break something and watch it fail. Dropping the multicodec header from
public_key_multibase, or making verify() return True, each takes down the specific vectors it
should and nothing else — and two of the four failures we seeded were caught by the doctests
independently of the vector runner.
The rest of the ecosystem
The same conformance vectors back three SDKs, and all three produce byte-identical output for the operations they share.
| language | package | BBS+ |
|---|---|---|
| Python | this package, solidus-network |
yes |
| TypeScript | @solidus-network/sdk on npm |
yes |
| Go | github.com/solidusnetwork/solidus-go |
no, the maintained Go BBS+ libraries implement a different scheme |
The vectors themselves are at
solidusnetwork/solidus-test-vectors, so
a third implementation can check itself against the same bytes.
Licence
Apache-2.0.
Metadata
Release files for solidus-network 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solidus_network-0.1.1.tar.gz | 65.4 kB | With provenance | Details for solidus_network-0.1.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| solidus_network-0.1.1-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for solidus_network-0.1.1-cp39-abi3-win_amd64.whl |
| solidus_network-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for solidus_network-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| solidus_network-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for solidus_network-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| solidus_network-0.1.1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for solidus_network-0.1.1-cp39-abi3-macosx_11_0_arm64.whl |
| solidus_network-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for solidus_network-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.9 MB
Release files / solidus_network-0.1.1.tar.gz
| Download URL | solidus_network-0.1.1.tar.gz |
|---|---|
| Size | 65.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff0914b9dda48f78457c8488148e423fa225420796643bbc22149419e9c7b5f3
|
|
BLAKE2b-256 checksum How to use checksums |
45180d04d44578eefd425f591e1d5eaefdf6c125ada951f3e3fc74d94eb2b757
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / solidus_network-0.1.1-cp39-abi3-win_amd64.whl
| Download URL | solidus_network-0.1.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 261.5 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ebb033b6d0adac657b5e99460e3cada2e2fa1b385671a782ea05d782dd30eb9c
|
|
BLAKE2b-256 checksum How to use checksums |
6c1cbfa1678aa0db2b1d911377600e046c7360cb139717ef2bc574a3821c82c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / solidus_network-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | solidus_network-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 420.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
78b7b0ee40f517bc118f3517f2a9d833eb65934a7965351362da036cb1ced3f8
|
|
BLAKE2b-256 checksum How to use checksums |
20f1195fb597c7cb6a08464a52037123f5d1e6ba56fab8ad906c5ad5be8fa13d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / solidus_network-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | solidus_network-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 420.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
efd9393eaaebcb48d0abe0b65e199f17e4546ef7d88a6231f20efcfb091ec703
|
|
BLAKE2b-256 checksum How to use checksums |
4efed21290d7d54a28b915929d4cfee757a0de0659c9d0eb24b92b904debd5f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / solidus_network-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | solidus_network-0.1.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 372.3 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b483990d53f2ab6b9315e58b1b3e88e1da9e159ff3c3d21ea4ec9cbf158e4f2a
|
|
BLAKE2b-256 checksum How to use checksums |
ef5e809ae29861d7968df9ea96c603bc6e6d3cfaa5f6e75452b66f8cc830154a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / solidus_network-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | solidus_network-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 373.7 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c65ccec63759af0962445930147d5c3b319be24e9c40b85477b7d2c9e0e700df
|
|
BLAKE2b-256 checksum How to use checksums |
7e6752b6e04bbb159c7be162b26301fef2ad66910bef1165ee91cd926aab38b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logSecurity for solidus-network 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for solidus_network-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.