Skip to main content

Class: GasStation

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

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

Extends​

  • UniffiAbstractObject

Implements​

Constructors​

Constructor​

new GasStation(
url,
reservationDuration?,
headers?,
httpOptions?
): GasStation;

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.

Parameters​

url​

string

reservationDuration?​

number | undefined = undefined

headers?​

Map<string, string[]> | undefined = undefined

httpOptions?​

HttpClientOptions | undefined = undefined

Returns​

GasStation

Overrides​

UniffiAbstractObject.constructor

Properties​

[destructorGuardSymbol]​

readonly [destructorGuardSymbol]: UniffiGcObject;

[pointerLiteralSymbol]​

readonly [pointerLiteralSymbol]: bigint;

[uniffiTypeNameSymbol]​

readonly [uniffiTypeNameSymbol]: "GasStation" = "GasStation";

Methods​

toDebugString()​

toDebugString(): string;

Returns​

string


toString()​

toString(): string;

Returns a string representation of an object.

Returns​

string


uniffiDestroy()​

uniffiDestroy(): void;

Explicitly tell Rust to destroy the native peer that backs this object.

Once this method has been called, any following method calls will throw an error.

Can be called more than once.

Returns​

void

Overrides​

UniffiAbstractObject.uniffiDestroy


uniffiUse()​

uniffiUse<T>(block): T;

A convenience method to use this object, then destroy it after its use.

Type Parameters​

T​

T

Parameters​

block​

(obj) => T

Returns​

T

Inherited from​

UniffiAbstractObject.uniffiUse


url()​

url(): string;

The URL this station is reached at.

Returns​

string

Implementation of​

GasStationLike.url


instanceOf()​

static instanceOf(obj_): obj_ is GasStation;

Parameters​

obj_​

any

Returns​

obj_ is GasStation