Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnChainID

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

OnChainID is a uint256 chain identifier stored and encoded as decimal text.

func NewOnChainID

func NewOnChainID(value uint64) OnChainID

NewOnChainID returns an OnChainID from a uint64 value.

func OnChainIDFromSDK

func OnChainIDFromSDK(value sdktypes.BigInt) OnChainID

OnChainIDFromSDK returns an OnChainID from a synapse-go BigInt.

func ParseOnChainID

func ParseOnChainID(name, value string) (OnChainID, error)

ParseOnChainID parses a decimal uint256 chain identifier.

func (OnChainID) Equal

func (id OnChainID) Equal(other OnChainID) bool

func (OnChainID) IsZero

func (id OnChainID) IsZero() bool

IsZero reports that the identifier is the number zero, which is a legal on-chain ID: the first piece of a data set is piece 0. It does not mean the identifier is unset, so never use it as a presence check. Express absence with a nil *OnChainID or a NULL column instead.

func (OnChainID) MarshalJSON

func (id OnChainID) MarshalJSON() ([]byte, error)

func (OnChainID) SDK

func (id OnChainID) SDK() sdktypes.BigInt

SDK returns a defensive copy of id as a synapse-go BigInt.

func (*OnChainID) Scan

func (id *OnChainID) Scan(src any) error

func (OnChainID) String

func (id OnChainID) String() string

func (*OnChainID) UnmarshalJSON

func (id *OnChainID) UnmarshalJSON(data []byte) error

func (OnChainID) Value

func (id OnChainID) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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