Skip to main content

GasStation

type 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`.

type GasStation struct {
// contains filtered or unexported fields
}

func LiftFromExternalGasStation​

func LiftFromExternalGasStation(handle uint64) *GasStation

func NewGasStation​

func NewGasStation(url string, reservationDuration *time.Duration, headers *map[string][]string, httpOptions *HttpClientOptions) (*GasStation, error)

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.

func (*GasStation) DebugString​

func (_self *GasStation) DebugString() string

func (*GasStation) Destroy​

func (object *GasStation) Destroy()

func (*GasStation) Url​

func (_self *GasStation) Url() string

The URL this station is reached at.