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 WIF format to make_keychain in the CLI #938

Closed
hstove opened this issue Feb 2, 2021 · 1 comment · Fixed by #991
Closed

Add WIF format to make_keychain in the CLI #938

hstove opened this issue Feb 2, 2021 · 1 comment · Fixed by #991
Assignees
Labels
good first issue Appropriate for a new open source contribution

Comments

@hstove
Copy link
Contributor

hstove commented Feb 2, 2021

When you generate a keychain in the CLI, it uses the standard STX derivation path (which starts with m/5757'/...). If you try and use the secret key generated from the CLI in a Bitcoin wallet, you won't be able to access the address generated in the CLI. However, one easy fix is for the CLI to output your WIF Private Key (Wallet Import Format), which is supported by many BTC wallets.

To do so:

  • Get the WIF key in keys.ts
    • const wif = child.toWIF();
  • Add the WIF key to the result of that function
  • Update the typescript return type of that function
  • Add a test
@hstove hstove added the good first issue Appropriate for a new open source contribution label Feb 2, 2021
@friedger
Copy link
Contributor

friedger commented Feb 2, 2021

You can use stacks-gen as a workaround :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Appropriate for a new open source contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants