Skip to content

Convert `Pass`, `UnblindedToken`, `RandomToken` and `Voucher` to use bytes internally.

Administrator requested to merge github/fork/tp-la/bytes into main

Created by: tomprince

As part of working on https://whetstone.privatestorage.io/privatestorage/PrivateStorageio/-/issues/84, I want to extract the passes being spent in _ValidationResult.validate_passes, to do that, I'd like to reuse the parsing in _zkapauthorizer.model.Pass. However, currently that only accepts unicode, but _ValidationResult.validate_passes has bytes. While I could convert to unicode to parse, looking at where Pass and UnblindedToken, it seems like it would be simpler to have them accept bytes instead.

I'm a little less sure regarding Voucher, I changed it partly to match the other model objects, and partly because I changed the attrs validator that was being used.

Merge request reports