View Source StarkNet.Client (StarkNet v0.1.1)

A StarkNet client. Used to build and perform requests to the StarkNet gateways.

Link to this section Summary

Functions

Returns a new client that uses the provided Finch module.

Performs a request.

Link to this section Types

Specs

method() :: Finch.Request.method()

Specs

network_name() :: :goerli_alpha | :mainnet_alpha

Specs

request() :: Finch.Request.t()

Specs

response() :: Finch.Response.t()

Specs

t() :: %StarkNet.Client{
  feeder_gateway_url: url(),
  finch: Finch.name(),
  gateway_url: url()
}

Specs

url() :: Finch.Request.url()

Link to this section Functions

Link to this function

new(finch, feeder_gateway_url, gateway_url)

View Source

Specs

new(Finch.name(), url(), url()) :: t()

Returns a new client that uses the provided Finch module.

Link to this function

new_from_network(finch, network)

View Source
Link to this function

run(request, client, opts \\ [])

View Source

Specs

run(StarkNet.Request.t(), t(), keyword()) ::
  {:ok, struct()} | {:error, Exception.t()}

Performs a request.