gasprices

package
v1.0.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gasprices provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg *Configuration) (*Client, error)

func (*Client) GetGasPriceEIP1559

func (api *Client) GetGasPriceEIP1559(ctx context.Context) (*Eip1559GasPriceResponse, error)

GetGasPriceEIP1559 Get gas prices for specified network using EIP1559 spec if applicable

func (*Client) GetGasPriceLegacy

func (api *Client) GetGasPriceLegacy(ctx context.Context) (*GetGasPriceLegacyResponse, error)

GetGasPriceLegacy Get gas prices for specified network in legacy node (not EIP1559)

type Configuration

type Configuration struct {
	ApiKey string
	ApiURL string
	API    api
}

func NewConfiguration

func NewConfiguration(params ConfigurationParams) (*Configuration, error)

type ConfigurationParams

type ConfigurationParams struct {
	ChainId uint64
	ApiUrl  string
	ApiKey  string
}

type Eip1559GasPriceResponse

type Eip1559GasPriceResponse struct {
	BaseFee string                  `json:"baseFee"`
	High    Eip1559GasValueResponse `json:"high"`
	Instant Eip1559GasValueResponse `json:"instant"`
	Low     Eip1559GasValueResponse `json:"low"`
	Medium  Eip1559GasValueResponse `json:"medium"`
}

Eip1559GasPriceResponse defines model for Eip1559GasPriceResponse.

type Eip1559GasValueResponse

type Eip1559GasValueResponse struct {
	MaxFeePerGas         string `json:"maxFeePerGas"`
	MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"`
}

Eip1559GasValueResponse defines model for Eip1559GasValueResponse.

type GetGasPriceLegacyResponse

type GetGasPriceLegacyResponse struct {
	Standard string `json:"standard"`
	Fast     string `json:"fast"`
	Instant  string `json:"instant"`
}

GetGasPriceLegacyResponse is used instead of codegen struct to right now as params for API handle

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL