Skip to content

Conversation

@balladyna
Copy link
Collaborator

This feature implements Bech32 encoder and decoder to support BIP 173 and BIP 350 address formats. It adds full support for encoding and decoding Bech32 strings, including HRP validation, checksum verification, and bit conversion logic. This enables SegWit address parsing and generation, ensuring compatibility with Bitcoin and other systems that use Bech32.

List of changes:

  • created seg_wit.dart, to represent SegWit addresses, including HRP, witness version and witness program data
  • created seg_wit_decoder.dart to parse and validate Bech32-encoded SegWit addresses into structured SegWit objects
  • created seg_wit_encoder.dart to serialize SegWit objects into valid Bech32-encoded address strings
  • created bech32.dart to represent HRP and payload with bit conversion
  • created bech32_decoder.dart to validate and decode Bech32-encoded strings
  • created bech32_encoder.dart to convert a Bech32 data structure into a valid Bech32-encoded string
  • created bytes_utils.dart to convert lists of integers between arbitrary bit group sizes (e.g., 8-bit bytes and 5-bit groups)
  • created bech32_utils.dart to provide helper methods for HRP expansion and polymod checksum computation as required by the Bech32 encoding standard
  • unrelated with domain: changed the Ubuntu Actions runner image to the latest general availability version 24.04, due to the deprecation of the version 20.04

This feature implements Bech32 encoder and decoder to support BIP 173 and BIP 350 address formats. It adds full support for encoding and decoding Bech32 strings, including HRP validation, checksum verification, and bit conversion logic. This enables SegWit address parsing and generation, ensuring compatibility with Bitcoin and other systems that use Bech32.

List of changes:
- created seg_wit.dart, to represent SegWit addresses, including HRP, witness version and witness program data
- created seg_wit_decoder.dart to parse and validate Bech32-encoded SegWit addresses into structured SegWit objects
- created seg_wit_encoder.dart to serialize SegWit objects into valid Bech32-encoded address strings
- created bech32.dart to represent HRP and payload with bit conversion
- created bech32_decoder.dart to validate and decode Bech32-encoded strings
- created bech32_encoder.dart to convert a Bech32 data structure into a valid Bech32-encoded string
- created bytes_utils.dart to convert lists of integers between arbitrary bit group sizes (e.g., 8-bit bytes and 5-bit groups)
- created bech32_utils.dart to provide helper methods for HRP expansion and polymod checksum computation as required by the Bech32 encoding standard
- unrelated with domain: changed the Ubuntu Actions runner image to the latest general availability version 24.04, due to the deprecation of the version 20.04
@balladyna balladyna requested review from dpajak99 and kronikarz July 24, 2025 09:52
@kronikarz kronikarz merged commit a7d50ef into master Jul 24, 2025
2 checks passed
@kronikarz kronikarz deleted the ow-feature/bech32 branch July 24, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants