core/
Cargo.toml
src/
lib.rs
did.rs
resolver.rs
document.rs
error.rs
rpc.rs
cli/
Cargo.toml
src/main.rs
server/
Cargo.toml
src/main.rs
core: DID domain models, RPC client, mappingDidDetails -> DID Resolution result.server: HTTP DID resolver (GET /1.0/identifiers/{did}) backed by an HTTP(S) or WS(S) QSB node RPC endpoint.cli: CLI utility for ad-hoc DID resolution from terminal.
cargo check --workspacecargo run -p qsb-did-resolver-server -- \
--listen-addr 127.0.0.1:8080 \
--node-rpc-url http://127.0.0.1:9944Against the public Poseidon WebSocket RPC:
cargo run -p qsb-did-resolver-server -- \
--listen-addr 127.0.0.1:8080 \
--node-rpc-url wss://qsb.qbck.io:9945 \
--allow-insecure-tlscargo run -p qsb-did-resolver-cli -- \
--node-rpc-url http://127.0.0.1:9944 \
--did did:qsb:YOUR_DID_ID \
--prettyWebSocket RPC is also supported:
cargo run -p qsb-did-resolver-cli -- \
--node-rpc-url wss://qsb.qbck.io:9945 \
--allow-insecure-tls \
--did did:qsb:YOUR_DID_ID \
--prettyGET /healthGET /1.0/identifiers/{did}
The resolver calls node JSON-RPC method:
did_getByString
--node-rpc-url accepts HTTP and WebSocket JSON-RPC endpoints:
http://127.0.0.1:9944https://example.node/rpcws://127.0.0.1:9944wss://qsb.qbck.io:9945
If a development node uses a certificate that is not trusted by the local
system, pass --allow-insecure-tls or set QSB_ALLOW_INSECURE_TLS=true.
Use this only for development/test endpoints.
Resolver validates DID input before RPC call:
- prefix must be
did:qsb: - identifier part must be valid Base58
- decoded identifier length must be exactly 32 bytes
- invalid input returns DID Resolution error
invalidDid
- Resolver maps
DidKeyMaterial::Multikeytotype: "Multikey"andpublicKeyMultibase. - Resolver maps
DidKeyMaterial::Jwktotype: "JsonWebKey2020"andpublicKeyJwk. publicKeyMultibaseis reconstructed frommulticodec + raw public_keyreturned by chain state.- JWK bytes are parsed as JSON for DID Document output when they contain valid JSON, otherwise they are returned as a string.
- Resolver does not enforce codec allowlist itself; codec policy is enforced by runtime.