-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: keepkey taproot support (ish) #701
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -88,7 +94,9 @@ function prepareSignTx( | |||
newOutput.setOpReturnData(output.opReturnData); | |||
} else { | |||
// BTCSignTxOutputSpend | |||
newOutput.setScriptType(Types.OutputScriptType.PAYTOADDRESS); | |||
newOutput.setScriptType( | |||
output.address.startsWith("bc1p") ? PAYTOTAPROOT_PROTOBUF_SCRIPTTYPE : Types.OutputScriptType.PAYTOADDRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this is not coming from Types.OutputScriptType
but declared manually, see below in this diff.
I did try to install @trezor/protobuf
(which @keepkey/device-protocol
should be a superset of, but is outdated) and consume those types directly instead of the ones from @keepkey/devices
however build was failing with a gazillion of @shapeshiftoss/bitcoinjs-lib
build errors
Description
"ish", as in we're building a correct payload that KeepKey is unable to understand because of firmware itself not supporting P2TR outputs.
This is more than likely related to https://github.com/keepkey/device-protocol being the source-of-truth for messaging on the device, and said library not being up-to-date with latest
@trezor/protobuf
(which@keepkey/device-protocol
should be a superset of, and by extension, the device should understand the latest spec of).Testing
Unfortunately, none. If you really want to test this, put a debugger breakpoint in
newOutput
after thesetScriptType()
call (see inline comments) and ensure that the scriptType is 6 i.e P2TR:https://github.com/trezor/trezor-suite/blob/221fe9e7fcd29fc2ef5fa51ca2c22ba6a9369ef6/packages/protobuf/src/messages.ts#L127
Issue
Relates to shapeshift/web#8277