WsEndpoint class
WebSocket endpoint for real-time blockchain updates
Constructors
-
WsEndpoint({required List<
String> urls, required WsConfig config})
Properties
- config → WsConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Whether the WebSocket is currently connected
no setter
- isPaused → bool
-
Whether the WebSocket is paused (for mobile apps)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subscriptions → WsSubscriptions
-
final
-
urls
→ List<
String> -
final
Methods
-
close(
) → void - Close the WebSocket connection
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pause the WebSocket connection (for mobile apps) Stops reconnection attempts and closes the connection
-
resume(
) → Future< void> - Resume the WebSocket connection (for mobile apps)
-
subscribeToAddress(
String address) → void - Subscribe to address updates (eCash address format)
-
subscribeToBlocks(
) → void - Subscribe to block updates
-
subscribeToLokadId(
String lokadId) → void - Subscribe to lokad ID updates
-
subscribeToPlugin(
String pluginName, String groupHex) → void - Subscribe to plugin updates
-
subscribeToScript(
String scriptType, String scriptPayload) → void - Subscribe to script/address updates
-
subscribeToTokenId(
String tokenId) → void - Subscribe to token ID updates
-
subscribeToTxid(
String txid) → void - Subscribe to transaction ID updates
-
subscribeToTxs(
) → void - Subscribe to all transaction updates
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribeFromAddress(
String address) → void - Unsubscribe from address updates
-
unsubscribeFromBlocks(
) → void - Unsubscribe from block updates
-
unsubscribeFromLokadId(
String lokadId) → void - Unsubscribe from lokad ID updates
-
unsubscribeFromPlugin(
String pluginName, String groupHex) → void - Unsubscribe from plugin updates
-
unsubscribeFromScript(
String scriptType, String scriptPayload) → void - Unsubscribe from script/address updates
-
unsubscribeFromTokenId(
String tokenId) → void - Unsubscribe from token ID updates
-
unsubscribeFromTxid(
String txid) → void - Unsubscribe from transaction ID updates
-
unsubscribeFromTxs(
) → void - Unsubscribe from all transaction updates
-
waitForOpen(
) → Future< void> - Wait for the WebSocket to be connected
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited