Closed coolaj86 closed 5 months ago
Now that we understand what the SigHashType actually means, we need to clean that code up.
I suggest:
- Tx.createHashable() - Tx.hashPartial() - Tx._hash() + txSigHashInfo.inputs = Tx.createSigHashInputs(inputs, sigHashType) + txSigHashInfo.outputs = Tx.createSigHashOutputs(outputs, sigHashType); + let txSigHashHex = Tx.packSigHashTx(txSigHashInfo, sigHashType); + let txSigHashBytes = Tx.utils.hexToBytes(txSigHashHex); + let sigBytes = Tx.doubleSha256(txSigHashBytes);
Part of #60 (and prior PRs)
Now that we understand what the SigHashType actually means, we need to clean that code up.
I suggest: