MsgInv class
Bitcoin inventory message for announcing available data This message is used to announce the knowledge of one or more objects. It can be received unsolicited, or in reply to getblocks.
- Inheritance
-
- Object
- WireMessage
- RegisterableMessage
- MsgInv
Constructors
-
MsgInv({List<
InvVect> ? invList}) - MsgInv.block(Hash blockHash)
-
Create inventory message for block
factory
- MsgInv.single(InvVect item)
-
Create inventory message with single item
factory
- MsgInv.transaction(Hash txHash)
-
Create inventory message for transaction
factory
Properties
-
blocks
→ List<
Hash> -
Get blocks in this inventory
no setter
- command → String
-
Get the command string for this message type
no setteroverride
- hasBlocks → bool
-
Check if inventory contains blocks
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasTransactions → bool
-
Check if inventory contains transactions
no setter
-
invList
↔ List<
InvVect> -
getter/setter pair
- maxPayloadLength → int
-
Get maximum payload length for this message type
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transactions
→ List<
Hash> -
Get transactions in this inventory
no setter
Methods
-
addBlock(
Hash blockHash) → void - Add block inventory
-
addInvVect(
InvVect inv) → void - Add inventory item
-
addTransaction(
Hash txHash) → void - Add transaction inventory
-
contains(
Hash hash) → bool - Check if inventory contains a specific hash
-
decode(
Uint8List data, int protocolVersion, MessageEncoding encoding) → void -
Decode message from bytes
override
-
encode(
int protocolVersion, MessageEncoding encoding) → Uint8List -
Encode message to bytes
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
int protocolVersion, BitcoinNetwork network) → Uint8List -
Serialize complete message with header
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
deserialize(
Uint8List data, int protocolVersion, MessageEncoding encoding) → MsgInv - Factory method for deserialization
-
registerWithFactory(
) → void - Register this message type with the factory