Skip to main content

GasStation

Namespace: IotaSdk

The IOTA gas station, sponsoring transactions over its HTTP API.

Build one and pass it to a transaction builder's execute_with_gas_station.

public class GasStation : IGasStation, System.IDisposable

Inheritance Object → GasStation
Implements IGasStation, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

GasStation(UInt64)​

public GasStation(ulong pointer)

Parameters​

pointer UInt64

GasStation(String, TimeSpan?, Dictionary<String, String[]>, HttpClientOptions)​

Create a gas station reachable at url.

reservation_duration is how long the station holds the gas it reserves, defaulting to 60 seconds. headers are sent with every request, typically to carry an authorization token. http_options describes the HTTP client the requests go out on.

Request paths are appended to the path of url, so a station served under a path prefix is reached through that prefix. The query of url is sent with every request.

public GasStation(string url, TimeSpan? reservationDuration = null, Dictionary<string, String[]>? headers = null, HttpClientOptions? httpOptions = null)

Parameters​

url String

reservationDuration TimeSpan?

headers Dictionary<String, String[]>?

httpOptions HttpClientOptions?

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

Url()​

The URL this station is reached at.

public string Url()

Returns​

String