Giter Club home page Giter Club logo

Comments (8)

blmalone avatar blmalone commented on June 16, 2024 7

Is this issue being worked on? :)

from coinselect.

dcousens avatar dcousens commented on June 16, 2024

Options:

  • .witness field for each input, or
  • .prevOutScript/.prevOutType for each input

The latter is probably better...

from coinselect.

karelbilek avatar karelbilek commented on June 16, 2024

Hey, I will look at this soon, I am currently in need for coinselect to work on segwit :)

from coinselect.

karelbilek avatar karelbilek commented on June 16, 2024

Which script types would like to support?

I could take the types from here (except for NONSTANDARD)

https://github.com/bitcoinjs/bitcoinjs-lib/blob/170328341bdcf2a22d6ee6df1df587ea4e83c8a9/src/templates/index.js#L11

from coinselect.

dcousens avatar dcousens commented on June 16, 2024

.script.length is used now for estimation [if provided] - without it, it assumes P2PKH.

If you're implementation can pre-sign all inputs, but with fake/blank signatures [for security], then script.length and an added reduction of byte length over the witness stack would be more than enough to do this.

from coinselect.

karelbilek avatar karelbilek commented on June 16, 2024

Hm, but pre-signing all inputs with empty/fake privkeys will complicate things and needlessly slow down computation, when the inputs types usually have the same lengths anyway for the given type

from coinselect.

dcousens avatar dcousens commented on June 16, 2024

Hm, but pre-signing all inputs with empty/fake privkeys will complicate things and needlessly slow down computation

Not necessarily, it should be no different then the approach we'd be taking here (pattern match, speculate byte length impact via a fake script/witness.

from coinselect.

dcousens avatar dcousens commented on June 16, 2024

Resolved partially by #22 (comment) - but - the virtual size calculation isn't accounted for yet?
.witness would need to be provided?

from coinselect.

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.