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

Add network property #200

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Add network property #200

merged 2 commits into from
Nov 26, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 26, 2024

BIP-32 specifies four different "versions" for extended keys. Public and private, but also mainnet and testnet. Previously we just assumed mainnet, because that's what's used for Ethereum, but to support other networks (such as Bitcoin), I've added a network field (i.e., mainnet or testnet), which determines which BIP-32 extended key version to use.

@Mrtenz Mrtenz marked this pull request as ready for review November 26, 2024 12:24
@Mrtenz Mrtenz requested a review from a team as a code owner November 26, 2024 12:24
@@ -458,6 +458,7 @@ export default {
masterFingerprint: 1247889873,
parentFingerprint: 0,
index: 0,
network: 'mainnet',
Copy link
Member

Choose a reason for hiding this comment

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

How come we need to add this here, but not for other fixtures?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's because of how the tests using these are written. They do a direct comparison of the JSON objects.

@Mrtenz Mrtenz merged commit 7d777bd into main Nov 26, 2024
20 checks passed
@Mrtenz Mrtenz deleted the mrtenz/network-property branch November 26, 2024 13:42
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