bitcore-channel
bitcore-channel copied to clipboard
Helpful detail for Developer Guide
It might be a good idea to add an example to the payment channel portion of the developer guide for the case that the provider simply returns a signature of the refund, not the refund itself. It took me a while to figure out I needed to make a TransactionSignature:
var signature = new TransactionSignature({
signature: signature_string,
prevTxId: consumer.commitmentTx.hash,
outputIndex: 0,
inputIndex: 0,
publicKey: server_key,
sigtype: sigtype
});
try
{
refund_tx.applySignature(signature);
...