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 output format: private key in hexadecimal #464

Closed
wants to merge 1 commit into from

Conversation

BubuMVX
Copy link
Contributor

@BubuMVX BubuMVX commented Jan 24, 2025

Hello!

This PR adds an option in the "wallet convert" routine, to export a wallet's private key in hexadecimal format (private-hex).

Command example:
wallet convert --infile wallet.pem --in-format pem --out-format private-hex

I wrote an unit test (test_wallet_convert_pem_to_private_hex), but I'm not sure how to execute it... 😅

@@ -25,6 +25,7 @@
WALLET_FORMAT_PEM = "pem"
WALLET_FORMAT_ADDRESS_BECH32 = "address-bech32"
WALLET_FORMAT_ADDRESS_HEX = "address-hex"
WALLET_FORMAT_PRIVATE_HEX = "private-hex"
Copy link
Collaborator

@popenta popenta Jan 29, 2025

Choose a reason for hiding this comment

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

I think the out-format could be called secret-key.

@popenta
Copy link
Collaborator

popenta commented Jan 29, 2025

Hello!

This PR adds an option in the "wallet convert" routine, to export a wallet's private key in hexadecimal format (private-hex).

Command example: wallet convert --infile wallet.pem --in-format pem --out-format private-hex

I wrote an unit test (test_wallet_convert_pem_to_private_hex), but I'm not sure how to execute it... 😅

Hello, that's awesome! We planned to add this feature as well 🚀

The run the test you can simply type:

pytest <path-to-test-file>

I'd also say you should change the base branch so it will be merged in feat/next and included in the next release.

@BubuMVX
Copy link
Contributor Author

BubuMVX commented Jan 29, 2025

Hi @popenta !

I didn't want to mess up with your branches, so I preferred to create a new PR (#472) with your feedback.
And I close this one.

@BubuMVX BubuMVX closed this Jan 29, 2025
@BubuMVX BubuMVX deleted the add-out-format-private-hex branch January 29, 2025 21:41
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