futurepaul / bdk-cli-tutorial Goto Github PK
View Code? Open in Web Editor NEWA tutorial for learning BDK by writing a simpl cli wallet
A tutorial for learning BDK by writing a simpl cli wallet
I'm doing the tutorial with a trezor instead a coldcard but is not working, let me know what I am doing wrong
$ hwi -t "trezor" --chain test getdescriptors|jq
{
"receive": [
"pkh([a51660d6/44h/1h/0h]tpubDDkvjEEMSkpZCtiKwxv1HrSgwAj2VEwRRpvfHz5eLokZq3psmSadzcMUy5xJCmjK4hUhCYQWzznqUm9tEJ9CDpMxWNRdgVeSzGn8h7W6MzY/0/*)#xxn73406",
"sh(wpkh([a51660d6/49h/1h/0h]tpubDC61Vht4qu2ZxjtvjyUTPqmD4yEWzRBYMJ5a7MDaJSpm4jRMwgjmMwLnU2yaUhduemV5ug6YvEbNpuAx3FN4tMTGpeceE4iEX4JcU3G4gYr/0/*))#ernjye6q",
"wpkh([a51660d6/84h/1h/0h]tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/*)#w7wkvzsa"
],
"internal": [
"pkh([a51660d6/44h/1h/0h]tpubDDkvjEEMSkpZCtiKwxv1HrSgwAj2VEwRRpvfHz5eLokZq3psmSadzcMUy5xJCmjK4hUhCYQWzznqUm9tEJ9CDpMxWNRdgVeSzGn8h7W6MzY/1/*)#hjklvqlz",
"sh(wpkh([a51660d6/49h/1h/0h]tpubDC61Vht4qu2ZxjtvjyUTPqmD4yEWzRBYMJ5a7MDaJSpm4jRMwgjmMwLnU2yaUhduemV5ug6YvEbNpuAx3FN4tMTGpeceE4iEX4JcU3G4gYr/1/*))#vzayux0l",
"wpkh([a51660d6/84h/1h/0h]tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/1/*)#l2th3hq9"
]
}
I set the wpkh receive descriptor on DESC and wpkh internal to CHANGE
DESC="wpkh([a51660d6/84h/1h/0h]tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/*)#w7wkvzsa"
CHANGE="wpkh([a51660d6/84h/1h/0h]tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/1/*)#l2th3hq9"
$ target/debug/bdk-cli receive $DESC --index 0
Syncing...
underived descriptor: wpkh([a51660d6/84'/1'/0']tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/*)#a03fkc87
derived descriptor: wpkh([a51660d6/84'/1'/0']tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/0)#qu56tmp0
index: 0
address: tb1qjth6lw5lwhsxx9qmj9006j8nqyrygr9ucq9fzv
Then I try to check the address but I get this error
$ hwi -t "trezor" displayaddress --desc "wpkh([a51660d6/84'/1'/0']tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/0)#qu56tmp0"
{"error": "Key in descriptor does not match device: wpkh([a51660d6/84'/1'/0']tpubDC5gp5M6R1FSi6m74utezoTB7494xPxqerVXZvpJupyWCnkHXZY5tZj5ohkbJaDCuWNoZDy4LwLt1XRaro3NPyY5M6hvV8JLb9jHh5sSyHq/0/0)#qu56tmp0", "code": -7}
What I am doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.