Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow multiple base58 address sizes #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fboucquez
Copy link

@fboucquez fboucquez commented Sep 9, 2024

It relaxes the base58 validation to allow extended sizes according to this doc

In particular, we encountered issues with this address that started the investigation.

closes: #44

cc @ealmansi

@@ -53,7 +60,8 @@ describe('bchaddr', function () {
'3QG9WxfFoqWwE2T7KQMkCHqhsap1waSfDu',
'33ynPLSQsUvePNaTdyK3rGZaNhAyfeAmbT',
'3NKpWcnyZtEKttoQECAFTnmkxMkzgbT4WX',
'3Dq1CBvAbQ5AxGCNT4byE8PhNQExZcR6Q2'
'3Dq1CBvAbQ5AxGCNT4byE8PhNQExZcR6Q2',
'BfdrC5aVm7A9YcSQnwxWWXjXGSxwgUdMmA7goREBawA8SHtUcp'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be problematic, some addresses are detected as p2sh, some as p2pkh

@fboucquez
Copy link
Author

I cannot build atm on my mac, I haven't updated the dist folder

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/util/createHash.js:138:18)
    at BulkUpdateDecorator.update (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/util/createHash.js:44:50)
    at RawSource.updateHash (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/NormalModule.js:737:17)
    at handleParseResult (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/NormalModule.js:801:10)
    at /Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/NormalModule.js:854:4
    at processResult (/Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/NormalModule.js:625:11)
    at /Users/fernando/develop/workspace-exodus/bchaddrjs/node_modules/webpack/lib/NormalModule.js:676:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

@fboucquez
Copy link
Author

I've manged to re-build downgrading to v16.20.0, but the changes are way more than they should. @ealmansi , what node version did you use?

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.

libraray does not recognize these addresses
1 participant