bitcoinerlab / descriptors

A TypeScript library for parsing Bitcoin Descriptors, including Miniscript-based ones. Streamlines creating Partially Signed Bitcoin Transactions (PSBTs) from Descriptors. Features BIP32, single-signature, and Hardware Wallet signing capabilities, and facilitates finalizing transactions.
https://bitcoinerlab.com/modules/descriptors
41 stars 14 forks source link

Add new methods #11

Closed landabaso closed 1 year ago

landabaso commented 1 year ago

addSignatures([{pubKey:Buffer, signature:Buffer}]) addPreimages({"ripemd160(xxx)": preimage: Buffer})

getScriptSig() //FOR P2SH, P2SH-P2WSH, undefined otherwise getScriptWitness() //FOR P2WSH, P2SH-P2WSH, undefined otherwise

getWitnessScript() //FOR P2WSH, P2SH-P2WSH, undefined otherwise getRedeemScript() //For P2SH-P2WSH, P2SH, undefined otherwise getLockTime(); getSequence();

landabaso commented 1 year ago

addPreimages({"<ripemd160_preimage(aaaa)>":"bbbbbbb"})

landabaso commented 1 year ago

https://bitcoin.stackexchange.com/questions/107872/what-are-the-scriptpubkey-scriptsig-redeem-script-and-witness-for-the-various

0xbrito commented 1 year ago

Hi @landabaso do you need some help?

landabaso commented 1 year ago

Hi @0xbrito,

Thank you for taking the time to offer help! At the moment, I am still in the process of deciding the API and refactoring the code, so it's not yet ready to accept contributions.

Once the code is in a more manageable state, there are plenty of tasks to do that I have in mind.

We keep in touch and thanks again!

0xbrito commented 1 year ago

I see,

No worries! I'm still following this any update:)

landabaso commented 1 year ago

done