nl_tokens: / * Signs the raw transaction
pl_tokens: function signTx ( _txObj , i , privKey ) { var compressPubKey = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : false ; var hashcode = arguments . length > 4 && arguments [ 4 ] !== undefined ? arguments [ 4 ] : zconstants . SIGHASH_ALL ; // Make a copy var txObj = JSON . parse ( JSON . stringify ( _txObj ) ) ; // Prepare our signature // Get script from the current tx input var script = txObj . ins [ i ] . prevScriptPubKey ; // Populate current tx in with the prevScriptPubKey var signingTx = signatureForm ( txObj , i , <mask> , hashcode ) ; // Get script signature var scriptSig = getScriptSignature ( privKey , signingTx , hashcode ) ; // Chuck it back into txObj and add pubkey // Protocol: // PUSHDATA // signature data and SIGHASH_ALL // PUSHDATA // public key data var pubKey = zaddress . privKeyToPubKey ( privKey , compressPubKey ) ; txObj . ins [ i ] . script = zbufferutils . getPushDataLength ( scriptSig ) + scriptSig + zbufferutils . getPushDataLength ( pubKey ) + pubKey ; return txObj ; }