-
Notifications
You must be signed in to change notification settings - Fork 73
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
JS Client: add support for Taproot inputs #209
Comments
From the last version, the JS module accepts a psbt as either a base64-encoded string, or a binary Buffer; that's now the recommended way, as it allows you to use whichever external Psbt class you prefer, and serialize it before calling the ledger client. The Psbtv2 class is at this point deprecated and will probably be removed in a future version. Wallet policies support (limited) taproot scripts from the last version (2.1.3) of the app, but leaves can only be |
@bigspider thanks a lot for your reply! looked before into the code of the frontend library and it has: if (typeof psbt === 'string') {
psbt = Buffer.from(psbt, "base64");
}
if (Buffer.isBuffer(psbt)) {
const psbtObj = new PsbtV2()
psbtObj.deserialize(psbt);
psbt = psbtObj;
} So thought it works with PsbtV2 in all cases equally, but seems to be working fine as a base64 string. |
Thanks for your comments on the other issue - closing this one. |
There's code in the
psbtv2.ts
file which throws an error when taproot inputs are passed using BitcoinJS lib PSBT, as it was implemented in this PRCould it be implemented to allow taproot inputs to be passed in this case? Is there anything blocking from doing so?
P.S.
I use it with a tapleaf script spending path, not an internal public key. I'm also trying to make the correct version of a custom
WalletPolicy
for that scenario. Should I usemulti_a
for the descriptor in this case? If it's a multisig N of M, where order is not important.So I also wonder if it would be possible to use leaf scripts with PsbtV2 and if there's already ongoing work on that.
Thanks!
The text was updated successfully, but these errors were encountered: