olindo has asked for the wisdom of the Perl Monks concerning the following question:

Oh glorious Monks, please hear my cry for help.

I am working on some projects that involves validating some cryptocoins wallets. For now I am able to validate BTC (Bitcoin) and ETH (Ethereum) wallets, but I'm stuck with BCH (Bitcoin Cash)

I found some example in other unworthy languages like PHP (https://github.com/bitcoincoltd/cashaddress) or JS (https://raw.githubusercontent.com/Ayms/cashaddress/master/cashaddress.js)

I've started porting the JS example to Perl, but after "bs32_decode" I'm stuck at the "polymod" function, and I fear even the rest is too complicated for me

Does anyone have a BCH validator, or can help me finish mine?

Thank for your precious attention, wise Monks

Replies are listed 'Best First'.
Re: BCH (CashAddress) wallet validation
by Laurent_R (Canon) on May 14, 2019 at 15:40 UTC
Re: BCH (CashAddress) wallet validation
by Discipulus (Canon) on May 14, 2019 at 17:11 UTC
    Hello olindo and welcome to the monastery!

    Knowning nothing of the matter I found Bitcoin address validation at rosettacode and this perl code you can find useful.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      Yes infact I used that for BTC validation, however BCH is different and I can't reuse that code