Giter Club home page Giter Club logo

Comments (8)

GambolingPangolin avatar GambolingPangolin commented on September 16, 2024

@jprupp @wraithm what do you think?

from haskoin-core.

wraithm avatar wraithm commented on September 16, 2024

What would the special package look like? I don't quite see the full vision for the second option. Could you flesh that out for me?

from haskoin-core.

jprupp avatar jprupp commented on September 16, 2024

I was thinking of the same question. How would that package work?

Is it possible to hide the P2TR code behind a compile-time flag? As long as a shell script is provided that will run the tests with and without flags, using the appropriate Nix package, without extra hassle, such that anyone can run it.

from haskoin-core.

GambolingPangolin avatar GambolingPangolin commented on September 16, 2024

Special package

The special package would require a version of libsecp256k1 with the BIP340 stuff enabled. It would have bindings to the signing and verification logic under secp256k1_schnorrsig.h. This entails duplicating some of the non-public code in haskell-secp256k1, but I think that's ok. It would also expose an API for creating TxSignature values for inclusion in P2TR witnesses and support for key-path and basic script path spends (CHECKSIG and CHECKMULTISIG).

Use flags

I think we can hide entire modules behind package flags. So if we were to go that route, we could have a flag --bip340 that would

  • Make an additional module Haskoin.Transaction.Taproot.Sign available
  • Set a similar flag on haskell-secp256k1 exposing the secp256k1_schnorrsig.h bindings

I think the best testing strategy would be to have one test script that runs all the tests against the Nix package. Since we are talking about adding bindings under a flag, testing with the flag indeed tests the base set of exports without the flag.

from haskoin-core.

GambolingPangolin avatar GambolingPangolin commented on September 16, 2024

I made a PoC sidecar package. It currently does not work, but should give you an idea of what the package would include. You can see it at https://github.com/GambolingPangolin/bitcoin-taproot .

from haskoin-core.

NCrashed avatar NCrashed commented on September 16, 2024

As an active user of the library (ergvein wallet) I consider the flag option optimal. Also, if there would be any tasks that I can help with, I am in. We want to add taproot support to the wallet.

from haskoin-core.

GambolingPangolin avatar GambolingPangolin commented on September 16, 2024

@NCrashed good to hear your thoughts. I'll go ahead and create some branches that put the signing code behind flags, so everyone can have a look at that.

from haskoin-core.

wraithm avatar wraithm commented on September 16, 2024

from haskoin-core.

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.