Giter Site home page Giter Site logo

Comments (4)

achow101 avatar achow101 commented on August 30, 2024

What do you mean by generalized descriptors? I'm not sure that it is useful for us to support making complex descriptors. That seems like something that is better suited for a descriptor generator software. They could get an xpub from HWI and pass it to that software.

from hwi.

instagibbs avatar instagibbs commented on August 30, 2024

from hwi.

Sjors avatar Sjors commented on August 30, 2024

This is also useful in the context of #137 (getdescriptors command), vs. the alternative approach I tried in #73 with descriptor templates.

For simple enough policies, e.g. M of N multisig, it makes sense for HWI to return descriptors based on params:

For example:

./hwi.py --fingerprint 0000000 getdescriptors --account 0 --multisig_threshold 2 --multisig_participants xpub1,xpub2
{
  "receive": [
    "sh(wpkh(...))",
    "wpkh(multi(2, xpub, xpub1, xpub2)/0/*)",
    "taproot(...)"
  ],
  "internal": [
     ....
  ]
}

This is very easy to build on what we have, and Bitcoin Core could use as soon as it has native descriptor support.

But for more complex policies, perhaps it's better if some other program gives us a template descriptor, we check if the hardware wallet can handle it, and then fill in our xpub.

./hwi.py --fingerprint 0000000 getdescriptors --receive "wpkh(multi(2, $xpub, xpub1, xpub2)/0/*)" --internal "wpkh(multi(2, $xpub, xpub1, xpub2/1/*)"
{
  "receive": "wpkh(multi(2, xpub, xpub1, xpub2)/0/*)"
  "internal": "wpkh(multi(2, xpub, xpub1, xpub2)/1/*)"
}

However, currently there is no such standard. Bitcoin Core also can't compose descriptors yet, it can only parse them or infer them from a script.

from hwi.

Sjors avatar Sjors commented on August 30, 2024

Thinking about this a bit more, neither approach seems sufficient for an interactive MuSig setup. For that we may need to add a number of specific commands.

Once the key is produced we can use descriptors, but how will the device know that it controls some of that? I'm sure this, and Taproot, will require new firmware anyway, but it's useful to think about what the interaction might look like.

from hwi.

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.