Skip to content

Instantly share code, notes, and snippets.

@matiu
Created March 29, 2014 13:38
Show Gist options
  • Save matiu/9854631 to your computer and use it in GitHub Desktop.
Save matiu/9854631 to your computer and use it in GitHub Desktop.
p2sh
Cosign.prototype.cmd_raw_sign_scripthash = function(anypay, tx, i, scriptPubKey, txSigHash)
{
var scriptHash = scriptPubKey.capture()[0];
var addr = new Address(this.network.addressScript, scriptHash);
var addrStr = addr.as('base58');
if (!(addrStr in this.wallet.datastore.scripts))
return;
var scriptHex = this.wallet.datastore.scripts[addrStr];
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment