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

Remove methods that neither used nor export #2072

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

jasonandjay
Copy link
Collaborator

  1. For Signer & Network, we have defined and exported it from psbt module.
  2. For UInt31, BIP32Path and ECPoint, we have neither used nor exported them. The check of BIP32Path should be related to BIP32, and ECPoint should be related to ECPair. This project is not suitable for checking.

So I think it's time to remove this methods.

In addition, I suggest that we stop using typeforce to verify input parameters and use ts types instead for better maintenance.

@junderw
Copy link
Member

junderw commented Apr 8, 2024

use ts types instead

TS types don't check at runtime. Some people still use plain old JavaScript, and some people also use @ts-ignore etc. against all best practices because "it just works".

If anything, there are probably some functions that SHOULD have runtime type checks that don't, and we should add more.

That said, I have #2030 which I think is necessary.

@junderw junderw merged commit 2ae74ca into bitcoinjs:master Apr 8, 2024
12 checks passed
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.

2 participants