Packages
Bitstring Status List entry, credential, and revocation verification helpers for Elixir.
Current section
Files
Jump to
Current section
Files
ex_bitstring_status_list
README.md
README.md
# ex_bitstring_status_list[](https://hex.pm/packages/ex_bitstring_status_list)[](https://hexdocs.pm/ex_bitstring_status_list)[](https://github.com/bawolf/ex_bitstring_status_list/blob/main/LICENSE)`ex_bitstring_status_list` is a focused Elixir library for Bitstring Status Listcredentials and entry verification.Quick links: [Hex package](https://hex.pm/packages/ex_bitstring_status_list) | [Hex docs](https://hexdocs.pm/ex_bitstring_status_list) | [Supported features](https://github.com/bawolf/ex_bitstring_status_list/blob/main/SUPPORTED_FEATURES.md) | [Interop notes](https://github.com/bawolf/ex_bitstring_status_list/blob/main/INTEROP_NOTES.md) | [Fixture policy](https://github.com/bawolf/ex_bitstring_status_list/blob/main/FIXTURE_POLICY.md)The package owns status-list-specific semantics:- allocate stable entry indices- encode and decode bitstring lists- construct `BitstringStatusListEntry` values- construct `BitstringStatusListCredential` credentials- resolve entry status from a decoded list or full credentialGeneric VC envelope validation belongs in `ex_vc`. DID and key resolution belongin `ex_did`.## StatusCurrent support:- Recommendation-shaped bitstring construction with a 16KB privacy floor- multibase base64url + GZIP `encodedList` encoding/decoding- `revocation`, `suspension`, `refresh`, and `message` purposes- entry generation, validation, and index parsing- status resolution from a decoded list or a full `BitstringStatusListCredential`- `statusSize`, `statusMessages`, `statusReference`, and `ttl` support- contractual released fixture corpus for package-owned behavior and Recommendation examplesDeliberately out of scope:- generic VC validation- cryptographic proof verification- DID resolution- issuer workflow and protocol transport## Installation```elixirdef deps do [ {:ex_bitstring_status_list, "~> 0.1.0"} ]end```## UsageBuild a list and allocate an entry:```elixir{:ok, status_list, index} = ExBitstringStatusList.new_status_list(size: 1024) |> ExBitstringStatusList.allocate_index()entry = ExBitstringStatusList.entry("https://issuer.example/status/revocation", index)```Revoke an index and resolve its status:```elixirstatus_list = ExBitstringStatusList.new_status_list(size: 8) |> ExBitstringStatusList.revoke(3)ExBitstringStatusList.status_at(status_list, 3)# => :revoked```Build a message-oriented status list:```elixirstatus_list = ExBitstringStatusList.new_status_list( purpose: "message", status_size: 2, status_messages: [ %{"status" => "0x0", "message" => "pending_review"}, %{"status" => "0x1", "message" => "accepted"}, %{"status" => "0x2", "message" => "rejected"}, %{"status" => "0x3", "message" => "undefined"} ], status_reference: "https://example.org/status-dictionary/" )```Serialize to a status list credential:```elixircredential = ExBitstringStatusList.to_credential(status_list, id: "https://issuer.example/status/revocation", issuer: "did:web:issuer.example" )```Resolve status directly from the credential plus entry:```elixirExBitstringStatusList.status_from_credential(credential, entry)# => :active | :revoked | integer```Resolve the Recommendation-shaped status result:```elixir{:ok, result} = ExBitstringStatusList.resolve_status(credential, entry)result.statusresult.validresult.message```## Testing And FixturesThe library is tested with:- direct unit tests for Recommendation-shaped package behavior- golden fixtures for deterministic credential examples- released fixtures derived from W3C Recommendation examples and package-owned deterministic cases- a release gate that verifies formatting, compile, tests, docs, and Hex package buildNormal `mix test` and normal library usage do not require Node, Rust, ornetwork access. The committed released fixtures are the contract for currentlysupported package-owned behavior.Run the local release gate with:```bashmix release.gate```## Release AutomationThe standalone `ex_bitstring_status_list` repository is expected to carry:- CI on push and pull request- a manual publish workflowThe publish workflow should be triggered through `workflow_dispatch` after theversion and changelog are ready. It publishes to Hex first and then creates thematching Git tag and GitHub release automatically. It expects a `HEX_API_KEY`repository secret in the standalone `ex_bitstring_status_list` repository.## Maintainer Workflow`ex_bitstring_status_list` currently lives in the `delegate` monorepo and ismirrored into the standalone `ex_bitstring_status_list` repository forpublishing and external consumption.The intended workflow is:1. make library changes in `libs/ex_bitstring_status_list`2. run `mix release.gate`3. sync the package into a clean checkout of `github.com/bawolf/ex_bitstring_status_list`4. review and push from the standalone repo5. trigger the publish workflow from the standalone repoA helper script for the sync step lives at `scripts/sync_standalone_repo.sh`.