chain

package
v0.0.0-...-fd23662 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 7 Imported by: 11

Documentation

Index

Constants

View Source
const ChainInfoBytesSize = 8
View Source
const SEPARATOR = "|"

Variables

This section is empty.

Functions

func GetChainRecords

func GetChainRecords(chainType types.ChainType) types.ChainRecordsType

func GetDisplayedName

func GetDisplayedName(chainInfo ChainInfo) string

Types

type ChainInfo

type ChainInfo struct {
	ChainType types.ChainType `json:"chain_type"`
	ChainID   uint64          `json:"chain_id"`
}

func NewChainInfoFromBytes

func NewChainInfoFromBytes(bytes []byte) *ChainInfo

func (*ChainInfo) Bytes

func (dc *ChainInfo) Bytes() []byte

func (*ChainInfo) FromString

func (c *ChainInfo) FromString(s string) error

func (ChainInfo) MarshalTo

func (c ChainInfo) MarshalTo(data []byte) (int, error)

func (ChainInfo) Size

func (ChainInfo) Size() int

func (*ChainInfo) ToBytes

func (dc *ChainInfo) ToBytes() ChainInfoBytes

func (*ChainInfo) Unmarshal

func (c *ChainInfo) Unmarshal(data []byte) error

type ChainInfoBytes

type ChainInfoBytes [ChainInfoBytesSize]byte

func (ChainInfoBytes) Bytes

func (c ChainInfoBytes) Bytes() []byte

func (ChainInfoBytes) ChainID

func (c ChainInfoBytes) ChainID() uint64

func (ChainInfoBytes) ChainType

func (c ChainInfoBytes) ChainType() types.ChainType

func (*ChainInfoBytes) FromString

func (c *ChainInfoBytes) FromString(s string) error

func (ChainInfoBytes) MarshalTo

func (c ChainInfoBytes) MarshalTo(data []byte) (int, error)

func (ChainInfoBytes) Size

func (ChainInfoBytes) Size() int

func (ChainInfoBytes) String

func (c ChainInfoBytes) String() string

func (*ChainInfoBytes) Unmarshal

func (c *ChainInfoBytes) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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