Coder Social home page Coder Social logo

Comments (7)

craigraw avatar craigraw commented on June 5, 2024 1

That seems reasonable. I agree it would be a clearer description of the wallet with less ambiguity. So:

Singlesig:
P2PKH: pkh(keystore)
P2SH-P2PKH: sh(wpkh(keystore))
P2WPKH: wpkh(keystore)

Multisig:
P2SH: sh(multi(m,keystore1,keystore2,...))
P2SH-P2WSH: sh(wsh(multi(m,keystore1,keystore2,...)))
P2WSH: wsh(multi(m,keystore1,keystore2,...))

I agree the underscore seems missing looking at sipa's doc, but it doesn't feel natural to include in the above.

from sparrow.

craigraw avatar craigraw commented on June 5, 2024

I'm unsure if that's valid miniscript. Certainly sh(wpkh(key)) is used in output descriptors, and (for example) Sparrow will display that in the Receive panel. But I can't seem to find any reference to it in http://bitcoin.sipa.be/miniscript/ or any other document on miniscript that I've seen. It would be good to have clarity on this point!

from sparrow.

sgeisler avatar sgeisler commented on June 5, 2024

Yeah, I confused the terminology too again. What you display seems to actually be miniscript (maybe missing an underscore), but in the case of p2sh-p2wpkh there just isn't any miniscript involved. What you want to display is probably a miniscript-based descriptor, because while sh(pk_h(key)), sh(wphk(key)) and sh(wsh(pk_h(key))) all encode the same spend policy, they produce different scripts/addresses. And the addresses you display are sh(wphk(key)) ones, so the displayed miniscript is kinda misleading. I think the descriptor concept is easy to see in rust-miniscript.

EDIT: if you want to play around with policies/miniscript/descriptors @afilini built a nice playground based on rust-miniscript.

from sparrow.

craigraw avatar craigraw commented on June 5, 2024

Implemented in sparrowwallet/drongo@3115669

from sparrow.

sgeisler avatar sgeisler commented on June 5, 2024

Nice! I think it should also be named differently in the ui (something along the lines of Miniscript descriptor) once sparrow actually uses the new version of drogo. Looking forward to the next release!

from sparrow.

craigraw avatar craigraw commented on June 5, 2024

Agreed - due to label space I think I'm going to go with 'Descriptor', since it is closest to output descriptor language, but with each keystore abbreviated to it's label to make it easier to read. Each keystore will have a a tooltip with the output descriptor representation of the keystore e.g. [d34db33f/44'/0'/0']xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL (no child key derivation). The context menu will allow for copying the full unabbreviated output descriptor.

I'm also moving from multi to sortedmulti as a more accurate representation of multisig wallets in Sparrow.

from sparrow.

craigraw avatar craigraw commented on June 5, 2024

Implemented in b8c3bf1.

from sparrow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.