Skip to content

Instantly share code, notes, and snippets.

@maraoz
Forked from matiu/gist:9833812
Last active August 29, 2015 13:57
Show Gist options
  • Save maraoz/9834017 to your computer and use it in GitHub Desktop.
Save maraoz/9834017 to your computer and use it in GitHub Desktop.
/* create and sign */
var tx = TransactionBuilder.init(opts)
.addUtxos(utxos)
.addOutputs(outs)
.addKeys(keys)
.build();
broadcast(tx.serialize());
/* create and sign later */
var builder = TransactionBuilder.init(opts)
.addUtxos(utxos)
.addOutputs(outs);
var tx = builder.build();
/*..later..*/
builder.addKeys(keys);
while ( !builder.isComplete() ) {
/*...get new keys ..*/
builder.addKeys(keys);
}
var tx = builder.build();
broadcast(tx.serialize());
/* opts for init: fee (fixed), remainderAddress, spendUnconfirmed, locktime, signhash, */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment