Esempio n. 1
0
 public TxInputPayload(
     TxOutPointPayload previousTx,
     UnknownPayload script,
     UInt32 sequence
     )
 {
     PreviousTransaction = previousTx;
     Script   = script;
     Sequence = sequence;
 }
Esempio n. 2
0
        public TxOutputPayload(byte[] bytes)
        {
            Amount = BitConverter.ToInt64(bytes, 0);
            var remaining = bytes.Skip(8);

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

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

            Script = new UnknownPayload(remaining.Take((Int32)scriptLength.Integer).ToArray());
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 public TxOutputPayload(Int64 amount, UnknownPayload script)
 {
     Amount = amount;
     Script = script;
 }