MessageFactory class
Registry and factory for Bitcoin protocol messages
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clearRegistry(
) → void - Clear all registered messages (mainly for testing)
-
createMessage(
String command) → WireMessage? - Create a message instance by command (for encoding)
-
deserializeMessage(
String command, Uint8List data, int protocolVersion, MessageEncoding encoding) → WireMessage - Deserialize a message from payload data
-
getSupportedCommands(
) → List< String> - Get all registered commands
-
isSupported(
String command) → bool - Check if a command is supported
-
parseMessage(
Uint8List messageBytes) → WireMessage - Parse a complete message from bytes (header + payload)
-
registerMessage<
T extends WireMessage> (String command, MessageDeserializer deserializer, T constructor()) → void - Register a message type with its deserializer and constructor