2

The Bitcoin Wiki page for Bech32 addresses explains how one can create a bech32 address from a public key. In step 6 it says-

Compute the checksum by using the data from step 5 and the H.R.P (bc for MainNet and tb for TestNet)

I went through the bip 173 wiki page which explains the checksum process. However I do not know python and cannot understand most of it.

How does one compute the checksum? Is there some library I can use? I mainly develop in Java/Kotlin/C++. Either an explanation of the python code on the bip173 page or libraries/code snippets in the languages I develop in will be greatly appreciated.

Nissim R
  • 123
  • 6

1 Answers1

4

You may want to look at the reference implementation section: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#reference-implementations

It lists implementations for various languages, including C, C++, and JavaScript

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287
  • Just to add to this answer, [this pr](https://github.com/sipa/bech32/pull/40/commits) on the github page has the java example. – Nissim R Oct 29 '21 at 04:00