bitcore-channel icon indicating copy to clipboard operation
bitcore-channel copied to clipboard

Helpful detail for Developer Guide

Open illuzen opened this issue 9 years ago • 0 comments

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);

...

illuzen avatar Jun 05 '15 21:06 illuzen