Skip to content

fix: allow multiple base58 address sizes#45

Open
fboucquez wants to merge 3 commits intoealmansi:masterfrom
ExodusForks:fboucquez/feat/exended_p2sh
Open

fix: allow multiple base58 address sizes#45
fboucquez wants to merge 3 commits intoealmansi:masterfrom
ExodusForks:fboucquez/feat/exended_p2sh

Conversation

@fboucquez
Copy link
Copy Markdown

@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

Comment thread test/bchaddr.js
'3NKpWcnyZtEKttoQECAFTnmkxMkzgbT4WX',
'3Dq1CBvAbQ5AxGCNT4byE8PhNQExZcR6Q2'
'3Dq1CBvAbQ5AxGCNT4byE8PhNQExZcR6Q2',
'BfdrC5aVm7A9YcSQnwxWWXjXGSxwgUdMmA7goREBawA8SHtUcp'
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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