Skip to content

Support Base58 #6

Open
Open

Description

@dipu-bd

Add a Base58 codec — the marquee gap for a crypto-family foundation (Bitcoin / IPFS CID / Ripple / Monero addresses & keys). Base58Check stays in hashlib; this ticket is the plain Base58 codec plus the reusable radix core.

Architecture fit

  • Introduces a new radix / bignum core under lib/src/core/ (base-256 ↔ base-58 via repeated division), reused by Base62 and Base45.
  • Leading-zero handling: each leading 0x00 byte maps to a leading 1 character and back — the classic Base58 convention. Test this explicitly.
  • Codec class in lib/src/codecs/base58.dart (private ctor, static const bitcoin / ripple / flickr instances as appropriate), public toBase58/fromBase58 in lib/src/base58.dart with codec: override, export in codecs_base.dart.

Differential oracle: package:base_codecs (dev-dep).

Spec: https://digitalbazaar.github.io/base58-spec/

Effort: L · Sequence: first codec — establishes the radix core.

Checklist

  • Radix core with repeated-division encode / decode
  • Leading-zero → leading-1 mapping, tested at boundaries
  • Generated alphabet table + alphabet-string assertion
  • Six standard test groups incl. differential vs base_codecs
  • Web-safe: no 32-bit-shift assumptions in the division loop (node)
  • README / CHANGELOG / example / test_integration updated

Activity

  1. added
    enhancement
    on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions