public override void WriteToBitcoinBuffer(byte[] buffer, int offset) { Version.WriteBytes(buffer, offset); TxIns.WriteToBitcoinBuffer(buffer, TxIns_Offset(ref offset)); TxOuts.WriteToBitcoinBuffer(buffer, TxOuts_Offset(ref offset)); LockTime.WriteBytes(buffer, LockTime_Offset(ref offset)); }
public void Sign(byte[] privateKey) { var publicKey = BitcoinHelper.CreatePublicKeyFromPrivate(privateKey); var transactionHash = ComputeHashBeforeSigning(); var signature = BitcoinHelper.Sign(transactionHash, privateKey); TxIns.First().CreateSignatureScript(signature, publicKey); }