Ejemplo n.º 1
0
 public TxInputPayload(
     TxOutPointPayload previousTx,
     UnknownPayload script,
     UInt32 sequence
     )
 {
     PreviousTransaction = previousTx;
     Script   = script;
     Sequence = sequence;
 }
Ejemplo n.º 2
0
        public TxInputPayload(byte[] bytes)
        {
            PreviousTransaction = new TxOutPointPayload(bytes);
            var remaining = bytes.Skip(PreviousTransaction.ToBytes().Length);

            var scriptLength = new IntegerPayload(remaining.ToArray());

            remaining = remaining.Skip(scriptLength.ToBytes().Length);

            Script    = new UnknownPayload(remaining.Take((Int32)scriptLength.Integer).ToArray());
            remaining = remaining.Skip(Script.ToBytes().Length);

            Sequence = BitConverter.ToUInt32(remaining.ToArray(), 0);
        }