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

Show consistently compressed and uncompressed wif private keys in key inpsect #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

psgreco
Copy link
Contributor

@psgreco psgreco commented Oct 7, 2024

Before:

$ hal key inspect --regtest 0000000000000000000000000000000000000000000000000000000000000001
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA",
  "public_key": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
    "p2wpkh": "bcrt1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080",
    "p2shwpkh": "2NAUYAHhujozruyzpsFRP63mbrdaU5wnEpN",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}
$ hal key inspect --regtest cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA",
  "public_key": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
    "p2wpkh": "bcrt1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080",
    "p2shwpkh": "2NAUYAHhujozruyzpsFRP63mbrdaU5wnEpN",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}

$ hal key inspect --regtest 91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx",
  "public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mtoKs9V381UAhUia3d7Vb9GNak8Qvmcsme",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}

After:

$ hal key inspect --regtest 0000000000000000000000000000000000000000000000000000000000000001
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA",
  "uncompressed_wif_private_key": "91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx",
  "public_key": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
    "p2wpkh": "bcrt1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080",
    "p2shwpkh": "2NAUYAHhujozruyzpsFRP63mbrdaU5wnEpN",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}
$ hal key inspect --regtest cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA",
  "uncompressed_wif_private_key": "91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx",
  "public_key": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
    "p2wpkh": "bcrt1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080",
    "p2shwpkh": "2NAUYAHhujozruyzpsFRP63mbrdaU5wnEpN",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}
$ hal key inspect --regtest 91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx
{
  "raw_private_key": "0000000000000000000000000000000000000000000000000000000000000001",
  "wif_private_key": "cMahea7zqjxrtgAbB7LSGbcQUr1uX1ojuat9jZodMN87JcbXMTcA",
  "uncompressed_wif_private_key": "91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx",
  "public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "xonly_public_key": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
  "uncompressed_public_key": "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
  "addresses": {
    "p2pkh": "mtoKs9V381UAhUia3d7Vb9GNak8Qvmcsme",
    "p2tr": "bcrt1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssm803es"
  }
}

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.

1 participant