models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBech32HRP

func SetBech32HRP(networkID uint32)

SetBech32HRP sets the package-wide beck32HRP to use for Address marshaling

Types

type Address

type Address StringShortID

func ToAddress

func ToAddress(id ids.ShortID) Address

ToAddress converts an ids.ShortID into an Address

func (Address) Equals

func (addr Address) Equals(oAddr2 Address) bool

Equals returns true if and only if the two Addresses represent the same

func (Address) MarshalJSON

func (addr Address) MarshalJSON() ([]byte, error)

type ChainInfo

type ChainInfo struct {
	ID          StringID `json:"chainID"`
	Alias       string   `json:"chainAlias"`
	VM          string   `json:"vm"`
	AVAXAssetID StringID `json:"avaxAssetID"`
	NetworkID   uint32   `json:"networkID"`
}

ChainInfo represents an overview of data about a given chain

type StringID

type StringID string

StringID represents a 256bit hash encoded as a base58 string

func ToStringID

func ToStringID(id ids.ID) StringID

ToStringID converts an ids.ID into a StringID

func (StringID) Equals

func (rid StringID) Equals(oRID StringID) bool

Equals returns true if and only if the two stringIDs represent the same ID

type StringShortID

type StringShortID string

StringShortID represents a 160bit hash encoded as a base58 string

func ToShortStringID

func ToShortStringID(id ids.ShortID) StringShortID

ToShortStringID converts an ids.ShortID into a StringShortID

func (StringShortID) Equals

func (rid StringShortID) Equals(oRID StringShortID) bool

Equals returns true if and only if the two stringShortIDs represent the same ID

Jump to

Keyboard shortcuts

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