hyperlane

package
v1.15.24 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(baseUrl string, opts ...ApiOption) Api

func (Api) ChainMetadata

func (api Api) ChainMetadata(ctx context.Context) (map[uint64]ChainMetadata, error)

type ApiOption

type ApiOption func(api *Api)

func WithRateLimit

func WithRateLimit(rps int) ApiOption

func WithTimeout

func WithTimeout(timeout time.Duration) ApiOption

type BlockExplorer

type BlockExplorer struct {
	ApiUrl string `yaml:"apiUrl"`
	Family string `yaml:"family"`
	Name   string `yaml:"name"`
	Url    string `yaml:"url"`
}

type ChainMetadata

type ChainMetadata struct {
	DomainId       uint64          `yaml:"domainId"`
	DisplayName    string          `yaml:"displayName"`
	BlockExplorers []BlockExplorer `yaml:"blockExplorers"`
	NativeToken    NativeToken     `yaml:"nativeToken"`
}

type IApi

type IApi interface {
	ChainMetadata(ctx context.Context) (map[uint64]ChainMetadata, error)
}

type NativeToken

type NativeToken struct {
	Decimals uint64 `yaml:"decimals"`
	Name     string `yaml:"name"`
	Symbol   string `yaml:"symbol"`
}

Jump to

Keyboard shortcuts

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