bhwi-cli: add descriptors pubkeys command#22
Conversation
|
I do not think it is part of the I think it should be part of its own commands set, like: etc |
Nice, I like that too. Let me fix it up. |
|
@edouardparis changed to what you said above - |
|
the command |
@edouardparis Right, just wanted to work towards parity with Python HWI. They're just descriptors for pubkeys it seems. Maybe deeper commands like Or: |
|
|
| serde_json::json!( | ||
| { | ||
| "receive": receive, | ||
| "internal": internal |
There was a problem hiding this comment.
what means internal ? is it the change ?
There was a problem hiding this comment.
Yes. I can change it but I wanted parity with HWI. I actually like "change" better but internal is fine too
There was a problem hiding this comment.
Funny that "internal" makes sense for the case of utxos refresh to reset timelocks, while "change" relates to a transactional exchange. I agree to keep it as it is.
There was a problem hiding this comment.
I tried and I got same result than your PR description.
Internal and receive are the same set of xpubs, is it the hwi behavior ?
There was a problem hiding this comment.
@edouardparis same xpubs but path should have 1 for internal and 0 for receive.
Coldcard simulator:
(ignore checksum difference cause of the h vs ')
Running `/home/trev/Workspace/rust-projects/bhwi/target/debug/bhwi --format json descriptor pubkeys`
{
"internal": [
"pkh([0f056943/44'/0'/0']tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/1/*)#j35f7r6v",
"wpkh([0f056943/84'/0'/0']tpubDCx8y86cKonoPyTtj3f9NZLpBYoBNkbAzUdafMHhggjxkhF8Dny2aekWfDafywEMZEQaQjkK9Gxn7aN7usLRUQdYbvDgcnmYRf72khPEouL/1/*)#fzltz6me",
"sh(wpkh([0f056943/49'/0'/0']tpubDDbPekoxnr7CaZUbYJVai5nbC2hUKEFeUDddcqhjQkeNo8wqk7qY1MuxDjBGwPESKui5XEH6hu21VfBXJbn8PZrFuwasiDAcyfA7Ao8WAsA/1/*))#cdnlkxr8",
"tr([0f056943/86'/0'/0']tpubDCrr3F1M4TwZdFptiTXmjHpcdQMYNBzM9vA3gLGtB5tYUL6CFeNNNoK89xxqFowY9jzUsTDfZirSmfy9ZnjBuNVfxLYthQXoVvr3ja1jRrA/1/*)#tzygl3dl"
],
"receive": [
"pkh([0f056943/44'/0'/0']tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/0/*)#r93grk25",
"wpkh([0f056943/84'/0'/0']tpubDCx8y86cKonoPyTtj3f9NZLpBYoBNkbAzUdafMHhggjxkhF8Dny2aekWfDafywEMZEQaQjkK9Gxn7aN7usLRUQdYbvDgcnmYRf72khPEouL/0/*)#ck62l0tp",
"sh(wpkh([0f056943/49'/0'/0']tpubDDbPekoxnr7CaZUbYJVai5nbC2hUKEFeUDddcqhjQkeNo8wqk7qY1MuxDjBGwPESKui5XEH6hu21VfBXJbn8PZrFuwasiDAcyfA7Ao8WAsA/0/*))#dvafwekc",
"tr([0f056943/86'/0'/0']tpubDCrr3F1M4TwZdFptiTXmjHpcdQMYNBzM9vA3gLGtB5tYUL6CFeNNNoK89xxqFowY9jzUsTDfZirSmfy9ZnjBuNVfxLYthQXoVvr3ja1jRrA/0/*)#6kpfzya8"
]
}➜ ./hwi.py --emulators --fingerprint "0f056943" getdescriptors | jq
{
"receive": [
"pkh([0f056943/44h/0h/0h]tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/0/*)#s5whevah",
"wpkh([0f056943/84h/0h/0h]tpubDCx8y86cKonoPyTtj3f9NZLpBYoBNkbAzUdafMHhggjxkhF8Dny2aekWfDafywEMZEQaQjkK9Gxn7aN7usLRUQdYbvDgcnmYRf72khPEouL/0/*)#t89494uz",
"sh(wpkh([0f056943/49h/0h/0h]tpubDDbPekoxnr7CaZUbYJVai5nbC2hUKEFeUDddcqhjQkeNo8wqk7qY1MuxDjBGwPESKui5XEH6hu21VfBXJbn8PZrFuwasiDAcyfA7Ao8WAsA/0/*))#fuwje7w6"
],
"internal": [
"pkh([0f056943/44h/0h/0h]tpubDDpWvmUrPZrhSPmUzCMBHffvC3HyMAPnWDSAQNBTnj1iZeJa7BZQEttFiP4DS4GCcXQHezdXhn86Hj6LHX5EDstXPWrMaSneRWM8yUf6NFd/1/*)#pqtkyed0",
"wpkh([0f056943/84h/0h/0h]tpubDCx8y86cKonoPyTtj3f9NZLpBYoBNkbAzUdafMHhggjxkhF8Dny2aekWfDafywEMZEQaQjkK9Gxn7aN7usLRUQdYbvDgcnmYRf72khPEouL/1/*)#6nq5cqv6",
"sh(wpkh([0f056943/49h/0h/0h]tpubDDbPekoxnr7CaZUbYJVai5nbC2hUKEFeUDddcqhjQkeNo8wqk7qY1MuxDjBGwPESKui5XEH6hu21VfBXJbn8PZrFuwasiDAcyfA7Ao8WAsA/1/*))#uaqyppm9"
]
}descriptors pubkeys command
|
@edouardparis changed to |
|
while running with ledger testnet app: Which makes sense the ledger testnet app refuses derivation paths for mainnet. |
Analogous to Python HWI's getdescriptors.
Not a nice error message 😩 |
Analogous to Python HWI's getdescriptors.
Note: HWI uses
hinstead'for the paths, so the checksums are different. This isn't possible right now withrust-miniscript