Documentation
¶
Index ¶
- type OnChainID
- func (id OnChainID) Equal(other OnChainID) bool
- func (id OnChainID) IsZero() bool
- func (id OnChainID) MarshalJSON() ([]byte, error)
- func (id OnChainID) SDK() sdktypes.BigInt
- func (id *OnChainID) Scan(src any) error
- func (id OnChainID) String() string
- func (id *OnChainID) UnmarshalJSON(data []byte) error
- func (id OnChainID) Value() (driver.Value, error)
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 ¶
NewOnChainID returns an OnChainID from a uint64 value.
func OnChainIDFromSDK ¶
OnChainIDFromSDK returns an OnChainID from a synapse-go BigInt.
func ParseOnChainID ¶
ParseOnChainID parses a decimal uint256 chain identifier.
func (OnChainID) IsZero ¶
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 (*OnChainID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.