This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | |
//... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* create and sign */ | |
var tx = TransactionBuilder.init(opts) | |
.addUtxos(utxos) | |
.addOutputs(outs) | |
.addKeys(keys) | |
.build(); | |
broadcast(tx.serialize()); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var imports = require('soop').imports(); | |
var bitcore = require('bitcore'); | |
var Storage = imports.Storage || require('./Storage'); | |
function Wallet(opts) { | |
opts = opts || {}; | |
this.network = opts.network === 'livenet' ? | |
bitcore.networks.livenet : bitcore.networks.testnet; |
NewerOlder