You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With v1.8.1 we added the first bitcoin xPub support in Rotki. A user can provide an xpub starting with the xpub prefix and rotki will assume it's a legacy xpub. m/44'/0'/x' => P2PKH. If the prefix starts with zpub it will assume it's a native segwit m/84/0'/x' => WPKH` type of xpub.
But this is missing some functionality. The zpub prefix is electrum specific and not bitcoin standard. The xpub may still start with xpub and still be of WPKH type.
Finally we are missing support for segwit xpubs, m/49'/0'/x' => P2SH-P2WPKH. In electrum they are prefixed with ypub.
Task
At xpub input allow the user to specify the type of xpub.
P2PKH (legacy) with account path `m/44'/0'/x'
P2SH-P2WPKH (segwit) with account path m/49'/0'/x'
WPKH (native segwit) with account path m/84/0'/x'
Also allow auto completion of the type if the xpub is electrum style. If the user given xpub starts with:
xpub -> P2PKH
ypub -> P2SH-P2WPKH
zpub -> WPKH
In the frontend there will be a choice of xpub type, but in the end what is sent to the backend (so we avoid extra fields) is the xpub with the proper prefix. xpub, ypub, zpub. The backend will read the prefix and treat the xpub accordingly. When returning information on an xpub we coudl add an extra field for the type. We could also just use the xpub prefix for this. @kelsos What do you think? (can also respond in discord)
The text was updated successfully, but these errors were encountered:
Just as a side note: I don't think that will work in all cases, but think is good enough for now. I have a native segwit xpub here (account path m/84'/0'/0') and my wallet offers me two representations of such: one starting with xpub, one starting with zpub.
We will also allow choice of xpub type. It's just that we will use the prefix as hint. And we will save the type by using the prefix. So it should work no matter which representation you choose as long as you specify the type properly when entering it via the UI.
LefterisJP
added a commit
to LefterisJP/rotkehlchen
that referenced
this issue
Oct 23, 2020
Abstract
With v1.8.1 we added the first bitcoin xPub support in Rotki. A user can provide an xpub starting with the xpub prefix and rotki will assume it's a legacy xpub.
m/44'/0'/x'
=> P2PKH. If the prefix starts with zpub it will assume it's a native segwit
m/84/0'/x' => WPKH` type of xpub.But this is missing some functionality. The
zpub
prefix is electrum specific and not bitcoin standard. The xpub may still start with xpub and still be of WPKH type.Finally we are missing support for segwit xpubs,
m/49'/0'/x' => P2SH-P2WPKH
. In electrum they are prefixed withypub
.Task
At xpub input allow the user to specify the type of xpub.
P2PKH
(legacy) with account path `m/44'/0'/x'P2SH-P2WPKH
(segwit) with account pathm/49'/0'/x'
WPKH
(native segwit) with account pathm/84/0'/x
'Also allow auto completion of the type if the xpub is electrum style. If the user given xpub starts with:
xpub
->P2PKH
ypub
->P2SH-P2WPKH
zpub
->WPKH
In the frontend there will be a choice of xpub type, but in the end what is sent to the backend (so we avoid extra fields) is the xpub with the proper prefix.
xpub
,ypub
,zpub
. The backend will read the prefix and treat the xpub accordingly. When returning information on an xpub we coudl add an extra field for the type. We could also just use the xpub prefix for this. @kelsos What do you think? (can also respond in discord)The text was updated successfully, but these errors were encountered: