Beispiel #1
0
 public static byte[] EncodeTxOutput(TxOutput txOutput)
 {
     var stream = new MemoryStream();
     EncodeTxOutput(stream, txOutput);
     return stream.ToArray();
 }
Beispiel #2
0
 private static ImmutableArray<byte> GetScriptFromInputPrevOutput(TxInput input, TxOutput prevOutput)
 {
     return input.ScriptSignature.AddRange(prevOutput.ScriptPublicKey);
 }
Beispiel #3
0
 public static void EncodeTxOutput(Stream stream, TxOutput txOutput)
 {
     using (var writer = new BinaryWriter(stream, Encoding.ASCII, leaveOpen: true))
     {
         writer.Write8Bytes(txOutput.Value);
         writer.WriteVarBytes(txOutput.ScriptPublicKey.ToArray());
     }
 }