2 using System.Collections.Generic;
5 using System.Threading.Tasks;
8 using SQLite.Net.Attributes;
9 using SQLite.Net.Interop;
10 using SQLite.Net.Platform.Generic;
11 using SQLiteNetExtensions.Attributes;
12 using System.Collections.Generic;
13 using System.Diagnostics.Contracts;
18 /// Block headers table
20 public interface IBlockStorageItem
23 /// Item ID in the database
25 long ItemID { get; set; }
28 /// PBKDF2+Salsa20 of block hash
30 byte[] Hash { get; set; }
33 /// Version of block schema
35 uint nVersion { get; set; }
38 /// Previous block hash.
40 byte[] prevHash { get; set; }
45 byte[] merkleRoot { get; set; }
50 uint nTime { get; set; }
53 /// Compressed difficulty representation.
55 uint nBits { get; set; }
60 uint nNonce { get; set; }
65 byte[] nextHash { get; set; }
70 BlockType BlockTypeFlag { get; set; }
75 long nStakeModifier { get; set; }
78 /// Proof-of-Stake hash
80 byte[] hashProofOfStake { get; set; }
83 /// Stake generation outpoint.
85 byte[] prevoutStake { get; set; }
88 /// Stake generation time.
90 uint nStakeTime { get; set; }
95 byte[] Height { get; set; }
98 /// Block position in file
100 byte[] BlockPos { get; set; }
103 /// Block size in bytes
105 byte[] BlockSize { get; set; }
108 public interface IMerkleNode
113 long nMerkleNodeID { get; set; }
116 /// Reference to parent block database item.
118 long nParentBlockID { get; set; }
121 /// Transaction type flag
123 TxFlags TransactionFlags { get; set; }
128 byte[] TransactionHash { get; set; }
131 /// Transaction offset from the beginning of block header, encoded in VarInt format.
133 byte[] TxOffset { get; set; }
136 /// Transaction size, encoded in VarInt format.
138 byte[] TxSize { get; set; }
141 public interface ITxOutItem
144 /// Reference to transaction item.
146 long nMerkleNodeID { get; set; }
151 OutputFlags outputFlags { get; set; }
154 /// Output number in VarInt format.
156 byte[] OutputNumber { get; set; }
159 /// Output value in VarInt format.
161 byte[] OutputValue { get; set; }
164 /// Second half of script which contains spending instructions.
166 byte[] scriptPubKey { get; set; }
169 /// Getter for output number.
174 /// Getter for output value.
176 ulong nValue { get; }
179 /// Getter ans setter for IsSpent flag.
181 bool IsSpent { get; set; }