I’m not the greatest reviewer… anyways, below my two cents (and yes, those are really only TWO cents, haha)
This is really minor, but the byte checker in Network.zig:36-42 could be more comfortable to read.
for (reference) |byte| {
if (!((byte >= 'a' and byte <= 'z') or
(byte >= 'A' and byte <= 'Z') or
(byte >= '0' and byte <= '9') or
byte == '-' or byte == '_'))
return error.InvalidNetwork;
}
It’s not that great to read, in my opinion. I’d write the following instead:
Another improvement would be more explicit error unions. What I mean by that is that you sometimes (e.g. PaymentPayload.zig:64) have a fn name(args) !Ret {} instead of fn name(args) Error!Ret {}.