Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js Txin Ergonomics #54

Open
breavyn opened this issue Apr 26, 2022 · 0 comments
Open

Js Txin Ergonomics #54

breavyn opened this issue Apr 26, 2022 · 0 comments

Comments

@breavyn
Copy link

breavyn commented Apr 26, 2022

The TxIn constructor requires a script, however when a transaction input is first created, its script is typically not yet known. Therefore providing a script should be optional.


How I'm currently adding an input

const txin = TxIn.default();
txin.setPrevTxId(prevTxid);
txin.setVOut(prevVOut);
tx.addInput(txin);

How I'd like to add an input

const txin = new TxIn(prevTxid, prevVOut);
tx.addInput(txin);
@Firaenix Firaenix mentioned this issue Jul 6, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant