These examples focus on the stable three-module public API:
authenticationproofwns
Build the SDK first:
npm run buildThen run an example:
node examples/authentication.mjs
node examples/proof.mjs
node examples/wns.mjsThe HTTP examples mirror the Python DID-WBA flow:
- The first protected request is signed with HTTP Message Signatures.
- If the server returns
401withWWW-Authenticate/Accept-Signature, the client retries with the server nonce. - On success, the server returns a Bearer token in
Authentication-Info. - Later requests reuse the cached Bearer token.
Start the TypeScript server:
npm run build
node examples/did-wba-http-server.mjsIn another terminal, run the TypeScript client:
node examples/did-wba-http-client.mjsFrom the repository root, a Python SDK client can authenticate against the same TypeScript server:
uv run python typescript/ts_sdk/examples/python_to_ts_did_wba_client.pyThe examples generate local demo TS DID files under examples/.generated/.