elements icon indicating copy to clipboard operation
elements copied to clipboard

initpegoutwallet only supports pkh descriptors on liquidv1 chain

Open philippem opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

initpegoutwallet only supports pkh descriptors for production (liquidv1). wpkh and sh(wpkh) descriptors are only supported for non-liquidv1 chains. This is inconvenient for many PAK list users who wish to use segwit offline wallets. Segwit pegouts are supported by the watchman (see https://blockstream.info/liquid/tx/ca5bec433cd7c8838720fedec3e7a52deb5e73ee7a78b393b2bc55b3414c1303).

The code that restricts the form of descriptor for liquidv1 is at https://github.com/ElementsProject/elements/blob/elements-0.21/src/wallet/rpcwallet.cpp#L5420

Describe the solution you'd like

Support for all 3 forms of initpegoutwallet:

  1. initpegoutwallet "pkh(XPUB)"
  2. initpegoutwallet "wpkh(XPUB)"
  3. initpegoutwallet "sh(wpkh(XPUB))"

Describe alternatives you've considered

It is possible to construct peg-out transactions outside of an elementsd wallet and submit them (the above peg-out was performed that way).

Additional context

philippem avatar Jan 14 '22 04:01 philippem