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

such: updated usage for public child keys #230

Open
wants to merge 1 commit into
base: 0.1.4-dogebox-pre
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion doc/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Below is a list of all the commands and the flags that they require. As a remind
| p2pkh | -k | -t | Generates a p2pkh address derived from the public key specified. Include the testnet flag if it was generated from testnet. |
| bip32_extended_master_key | None | -t | Generate an extended master private key from a secp256k1 context for either mainnet or testnet. |
| bip32maintotest | -p | None | Convert a mainnet private key into an equivalent testnet key. |
| derive_child_keys | -p, -m | -t | Generates a child key derived from the specified private key using the specified derivation path.
| derive_child_keys | -p, -m | -t | Generates a child key derived from the specified public or private key using the specified derivation path.
| generate_mnemonic | None | -e, -y, -w, -b | Generates a 24-word english seed phrase randomly or from optional hex entropy. |
| list_encryption_keys_in_tpm | None | None | List the encryption keys in the TPM. |
| decrypt_master_key | -y | -j | Decrypt the master key with the TPM or SW. |
Expand Down Expand Up @@ -135,6 +135,16 @@ Below are some examples on how to use the `such` tool in practice.
> child index: -2147483647
> p2pkh address: DFqonEEA56VE8zEGvhXNgjiPT3PaPFNQQu

##### Derive public child key (second child key at level 2 in this case, non-hardened)

./such -c derive_child_keys -m m/1 -p dgub8sdBNNzYwKo1KKQcQoJXMDwEg3fgX52aY2aSuSGMXepn71kMtZoN7BVwWp7JT582EDT8djTpCMx7Nd62nJ8u8xNmszEXrmsHWf6XQccjiLg
> ext key: dgub8q9VuPpS4NijK4e7Cc7WaKGD6QHjUB3YkJi83imYVvBRGjrKwPcNFjNcmNt2UnEuhFmKhcmo8aRQABUhq55H3ackUBGj3nJDTMpcP6ALoiN
> extended pubkey: dgub8q9VuPpS4NijK4e7Cc7WaKGD6QHjUB3YkJi83imYVvBRGjrKwPcNFjNcmNt2UnEuhFmKhcmo8aRQABUhq55H3ackUBGj3nJDTMpcP6ALoiN
> pubkey hex: 02cbfea5f5cf7d28b9111e92f05356a39a64f19247e539b428ef91e70a6900ae71
> depth: 2
> child index: 1
> p2pkh address: D7M52mS3ZTrPXgRmfjpV5pPSG2E2TsfZAi

#### Generate a random BIP39 seed phrase
#### See "Seed phrases" in address.md, for additional guidance

Expand Down
2 changes: 1 addition & 1 deletion src/cli/such.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static void print_usage()
printf("mnemonic_to_key (requires -n <seed_phrase> or -y <file_num>, -j (use_tpm), -o <account_int>, -g <change_level>, -i <address_index> and -a, all optional),\n");
printf("mnemonic_to_addresses (requires -n <seed_phrase> or -y <file_num>, -j (use_tpm), -o <account_int>, -g <change_level>, -i <address_index> and -a, all optional),\n");
printf("print_keys (requires -p <private key hex>),\n");
printf("derive_child_keys (requires -m <custom path> -p <private key>),\n");
printf("derive_child_keys (requires -m <custom path> -p <public or private key>),\n");
printf("sign (-x <raw hex tx> -s <script pubkey> -i <input index> -h <sighash type> -p <private key>),\n");
printf("comp2der (-s <compact signature>),\n");
printf("bip32maintotest (-p <extended hd master key>),\n");
Expand Down
Loading