예제 #1
0
        public void Read(Stream s)
        {
            BinaryReader br = new BinaryReader(s);

            value        = br.ReadUInt64();
            scriptPubKey = br.ReadBytes(VarInt.FromStream(s).intValue);
        }
예제 #2
0
        public void Read(Stream s)
        {
            BinaryReader br = new BinaryReader(s);

            prevOut      = br.ReadBytes(32);
            prevOutIndex = br.ReadUInt32();
            scriptSig    = br.ReadBytes(VarInt.FromStream(s).intValue);
            sequenceNo   = br.ReadUInt32();
        }
예제 #3
0
        public virtual void Read(Stream s)
        {
            BinaryReader br = new BinaryReader(s);

            version     = br.ReadUInt32();
            prev_block  = br.ReadBytes(32);
            merkle_root = br.ReadBytes(32);
            timestamp   = br.ReadUInt32();
            bits        = br.ReadUInt32();
            nonce       = br.ReadUInt32();
            txns        = new Transaction[VarInt.FromStream(s)];
            for (int i = 0; i < txns.Length; i++)
            {
                txns[i] = Transaction.FromStream(s);
            }
        }
예제 #4
0
        public void Read(Stream s)
        {
            BinaryReader br = new BinaryReader(s);

            version = br.ReadUInt32();
            inputs  = new TxIn[VarInt.FromStream(s)];
            for (int i = 0; i < inputs.Length; i++)
            {
                inputs[i] = TxIn.FromStream(s);
            }
            outputs = new TxOut[VarInt.FromStream(s)];
            for (int i = 0; i < outputs.Length; i++)
            {
                outputs[i] = TxOut.FromStream(s);
            }
            lock_time = br.ReadUInt32();
        }