Follow

I wrote a Swift library today for output descriptors. It only has one feature at the moment: calculate the checksum.

Porting the Python checksum code from the Bitcoin Core test suite was fairly easy, except for one thing: Swift is very stubborn about strings, and doesn't believe in character count: "hello"[0] will not compile! I had to jump through a bunch of hoops with ranges. But it works.
github.com/Sjors/output-descri

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!