Code Monkey home page Code Monkey logo

Comments (6)

landabaso avatar landabaso commented on June 8, 2024 1

Hi @DmytroShalaiev,

This library doesn’t currently support Tapscript, and I won’t be able to add this feature until the beginning of next year. I'm currently quite busy on a related project involving BitcoinerLab, but please be assured that adding Tapscript support to the library is one of my top priorities.

That said, bitcoinjs-lib requires you to initialize the initEccLib for Taproot. This process will eventually be automated, but for now, you can do it manually. Please try calling initEccLib and tell me where this leads you. Depending on your situation, I might be able to propose a temporary solution for your specific needs.

Also, I'm curious to know if having p2tp outputs is an absolute necessity for you at this moment or can wait a bit.

from descriptors.

DmytroShalaiev avatar DmytroShalaiev commented on June 8, 2024 1

So such a trick works :) and Output object with TP address created. Next step extending functions inputWeight & outputWeight for working with TP 'sizes' (https://bitcoinops.org/en/tools/calc-size/), seems it's all that needed in CoinSelection usage

Снимок экрана 2023-12-18 в 16 04 49

from descriptors.

landabaso avatar landabaso commented on June 8, 2024 1

Good to hear!

By the way, you don’t need both tiny-secp256k1 and @bitcoinerlab/secp256k1. Just choosing one should suffice.

Have you forked the project? It looks like you're on the right track. I believe your next step is to adapt the guessOutput() function for Taproot (tr) and then accurately determine the correct input and output sizes. Keep me updated on your progress. Once you've made headway, we can collaborate on crafting a new version.

One important aspect to consider is that releasing a new version would ideally require new test vectors. This is crucial for ensuring the reliability and robustness of the updates.

from descriptors.

DmytroShalaiev avatar DmytroShalaiev commented on June 8, 2024

Right now, I am working with https://github.com/bitcoinerlab/coinselect

My main goal is processing 'coinslection' from P2WPKH utxo's to P2TP outputs. and seems that initing EccLib for bitcoin-js is the only thing missing to achieve the goal.

from descriptors.

DmytroShalaiev avatar DmytroShalaiev commented on June 8, 2024

Thank you so much for your time and your best

Tapscript support to the library is one of my top priorities.

It will be cool!

Depending on your situation, I might be able to propose a temporary solution for your specific needs.

Right now trying to do it, thanks.

Also, I'm curious to know if having p2tp outputs is an absolute necessity for you at this moment or can wait a bit.

I think can wait, but I will try to initEccLib.

from descriptors.

DmytroShalaiev avatar DmytroShalaiev commented on June 8, 2024

@landabaso I added the implementation for (P2TR keypath input) and attached a draft PR #36
when you have time please take a look; it will be nice to hear your feedback.

The tests are not done yet, but I think I can add them after discussion.

from descriptors.

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.