Cluster class

Cluster

Annotations
  • @JsonSerializable.new()

Constructors

Cluster(Uri uri)
The RPC URL of a cluster.
const
Cluster.fromJson(Map<String, dynamic> json)
Creates an instance of this class from the constructor parameters defined in the json object.
factory
Cluster.http(String host, {int? port})
Creates a HTTP RPC URL for host.
factory
Cluster.https(String host, {int? port})
Creates a HTTPS RPC URL for host.
factory
Cluster.ws(String host, {int? port})
Creates a WS RPC URL for host.
factory
Cluster.wss(String host, {int? port})
Creates a WSS RPC URL for host.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String?
The cluster's chain id parsed from the Uri.host.
no setter
name → String?
The cluster's name parsed from the Uri.host.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uri → Uri
The endpoint.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialises this class into a JSON object.
toString() → String
A string representation of this object.
override
toWebsocket([int? port]) → Cluster
Creates a new Cluster from this for a websocket server.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

devnet → Cluster
The devnet cluster's HTTP endpoint.
no setter
localhost → Cluster
The default localhost HTTP endpoint (http://127.0.0.1:8899).
no setter
mainnet → Cluster
The mainnet cluster's HTTP endpoint.
no setter
testnet → Cluster
The testnet cluster's HTTP endpoint.
no setter