commons

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAINNET = "MAINNET"

Functions

func ChainIdToString

func ChainIdToString(chainId *proto.ChainId) string

func Hex2Int

func Hex2Int(hexStr string) (uint64, error)

func Hex2Uint64OrZero

func Hex2Uint64OrZero(hexStr string) uint64

func StringToChainId

func StringToChainId(chainId string) *proto.ChainId

Types

type Config

type Config struct {
	// The port for the server to listen on
	Port int `json:"port"`

	// The host for the server to listen on
	Host string `json:"host"`
}

type UInt64HexString

type UInt64HexString uint64

func (UInt64HexString) AsNumber

func (v UInt64HexString) AsNumber() uint64

func (UInt64HexString) MarshalJSON

func (v UInt64HexString) MarshalJSON() ([]byte, error)

func (*UInt64HexString) UnmarshalJSON

func (v *UInt64HexString) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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