ids

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 0x0000000000000000000000000000000000000000
	LDCAccount = Address{}
	// 0xFFfFFFfFfffFFfFFffFFFfFfFffFFFfffFfFFFff
	GenesisAccount = Address{
		255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
		255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
	}
)
View Source
var EmptyAddress = Address{}
View Source
var EmptyDataID = DataID{}
View Source
var EmptyID20 = ID20{}
View Source
var EmptyID32 = ID32{}
View Source
var EmptyModelID = ModelID{}
View Source
var EmptyStake = StakeSymbol{}
View Source
var NativeToken = TokenSymbol{}

Functions

This section is empty.

Types

type Address

type Address ID20

func AddressFromStr

func AddressFromStr(str string) (Address, error)

func (Address) AsKey

func (id Address) AsKey() string

func (Address) Bytes

func (id Address) Bytes() []byte

func (Address) GoString

func (id Address) GoString() string

func (Address) MarshalCBOR

func (id Address) MarshalCBOR() ([]byte, error)

func (Address) MarshalJSON

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

func (Address) MarshalText

func (id Address) MarshalText() ([]byte, error)

func (Address) Ptr

func (id Address) Ptr() *Address

func (Address) String

func (id Address) String() string

func (Address) ToStakeSymbol

func (id Address) ToStakeSymbol() (s StakeSymbol)

func (*Address) UnmarshalCBOR

func (id *Address) UnmarshalCBOR(data []byte) error

func (*Address) UnmarshalJSON

func (id *Address) UnmarshalJSON(b []byte) error

func (*Address) UnmarshalText

func (id *Address) UnmarshalText(b []byte) error

func (Address) Valid

func (id Address) Valid() bool

type DataID

type DataID ID32

func DataIDFromStr

func DataIDFromStr(str string) (DataID, error)

func (DataID) Bytes

func (id DataID) Bytes() []byte

func (DataID) GoString

func (id DataID) GoString() string

func (DataID) MarshalCBOR

func (id DataID) MarshalCBOR() ([]byte, error)

func (DataID) MarshalJSON

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

func (DataID) MarshalText

func (id DataID) MarshalText() ([]byte, error)

func (DataID) Ptr

func (id DataID) Ptr() *DataID

func (DataID) String

func (id DataID) String() string

func (*DataID) UnmarshalCBOR

func (id *DataID) UnmarshalCBOR(data []byte) error

func (*DataID) UnmarshalJSON

func (id *DataID) UnmarshalJSON(b []byte) error

func (*DataID) UnmarshalText

func (id *DataID) UnmarshalText(b []byte) error

func (DataID) Valid

func (id DataID) Valid() bool

func (DataID) VersionKey

func (id DataID) VersionKey(version uint64) []byte

type ID20

type ID20 [20]byte

func (ID20) Bytes

func (id ID20) Bytes() []byte

func (ID20) GoString

func (id ID20) GoString() string

func (ID20) MarshalCBOR

func (id ID20) MarshalCBOR() ([]byte, error)

func (ID20) MarshalJSON

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

func (ID20) MarshalText

func (id ID20) MarshalText() ([]byte, error)

func (ID20) Ptr

func (id ID20) Ptr() *ID20

func (ID20) String

func (id ID20) String() string

func (*ID20) UnmarshalCBOR

func (id *ID20) UnmarshalCBOR(data []byte) error

func (*ID20) UnmarshalJSON

func (id *ID20) UnmarshalJSON(b []byte) error

func (*ID20) UnmarshalText

func (id *ID20) UnmarshalText(b []byte) error

func (ID20) Valid

func (id ID20) Valid() bool

type ID32

type ID32 [32]byte

func ID32FromBytes

func ID32FromBytes(data []byte) (ID32, error)

func ID32FromData

func ID32FromData(data []byte) ID32

func ID32FromStr added in v0.1.0

func ID32FromStr(str string) (ID32, error)

func (ID32) Bytes

func (id ID32) Bytes() []byte

func (ID32) GoString

func (id ID32) GoString() string

func (ID32) MarshalCBOR

func (id ID32) MarshalCBOR() ([]byte, error)

func (ID32) MarshalJSON

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

func (ID32) MarshalText

func (id ID32) MarshalText() ([]byte, error)

func (ID32) Ptr

func (id ID32) Ptr() *ID32

func (ID32) String

func (id ID32) String() string

func (*ID32) UnmarshalCBOR

func (id *ID32) UnmarshalCBOR(data []byte) error

func (*ID32) UnmarshalJSON

func (id *ID32) UnmarshalJSON(b []byte) error

func (*ID32) UnmarshalText

func (id *ID32) UnmarshalText(b []byte) error

func (ID32) Valid

func (id ID32) Valid() bool

type IDList

type IDList[T idT] []T

func NewIDList

func NewIDList[T idT](cap int) IDList[T]

func (IDList[T]) CheckDuplicate

func (list IDList[T]) CheckDuplicate() error

func (IDList[T]) CheckValid

func (list IDList[T]) CheckValid() error

func (IDList[T]) Equal

func (list IDList[T]) Equal(target IDList[T]) bool

func (IDList[T]) Has

func (list IDList[T]) Has(id T) bool

func (IDList[T]) Len

func (list IDList[T]) Len() int

func (IDList[T]) Less

func (list IDList[T]) Less(i, j int) bool

func (IDList[T]) Sort

func (list IDList[T]) Sort()

func (IDList[T]) Swap

func (list IDList[T]) Swap(i, j int)

func (IDList[T]) ToValue added in v0.1.1

func (list IDList[T]) ToValue() value.Value

func (IDList[T]) Valid

func (list IDList[T]) Valid() error

type List

type List[T orderedT] []T

func (List[T]) Len

func (list List[T]) Len() int

func (List[T]) Less

func (list List[T]) Less(i, j int) bool

func (List[T]) Sort

func (list List[T]) Sort()

func (List[T]) Swap

func (list List[T]) Swap(i, j int)

type ModelID

type ModelID ID20

func ModelIDFromHash

func ModelIDFromHash(id ID32) (mid ModelID)

func ModelIDFromStr

func ModelIDFromStr(str string) (ModelID, error)

func (ModelID) Bytes

func (id ModelID) Bytes() []byte

func (ModelID) GoString

func (id ModelID) GoString() string

func (ModelID) MarshalCBOR

func (id ModelID) MarshalCBOR() ([]byte, error)

func (ModelID) MarshalJSON

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

func (ModelID) MarshalText

func (id ModelID) MarshalText() ([]byte, error)

func (ModelID) Ptr

func (id ModelID) Ptr() *ModelID

func (ModelID) String

func (id ModelID) String() string

func (*ModelID) UnmarshalCBOR

func (id *ModelID) UnmarshalCBOR(data []byte) error

func (*ModelID) UnmarshalJSON

func (id *ModelID) UnmarshalJSON(b []byte) error

func (*ModelID) UnmarshalText

func (id *ModelID) UnmarshalText(b []byte) error

func (ModelID) Valid

func (id ModelID) Valid() bool

type Set

type Set[T orderedT] map[T]struct{}

func NewSet

func NewSet[T orderedT](cap int) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(vv ...T)

func (Set[T]) CheckAdd

func (s Set[T]) CheckAdd(vv ...T) error

func (Set[T]) Del added in v0.1.1

func (s Set[T]) Del(v T)

func (Set[T]) Has

func (s Set[T]) Has(v T) bool

func (Set[T]) Len added in v0.1.1

func (s Set[T]) Len() int

func (Set[T]) List

func (s Set[T]) List() List[T]

type StakeSymbol

type StakeSymbol ID20

StakeSymbol

func StakeFromStr

func StakeFromStr(s string) (StakeSymbol, error)

func (StakeSymbol) Address

func (id StakeSymbol) Address() Address

func (StakeSymbol) Bytes

func (id StakeSymbol) Bytes() []byte

func (StakeSymbol) GoString

func (id StakeSymbol) GoString() string

func (StakeSymbol) MarshalCBOR

func (id StakeSymbol) MarshalCBOR() ([]byte, error)

func (StakeSymbol) MarshalJSON

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

func (StakeSymbol) MarshalText

func (id StakeSymbol) MarshalText() ([]byte, error)

func (StakeSymbol) Ptr

func (id StakeSymbol) Ptr() *StakeSymbol

func (StakeSymbol) String

func (id StakeSymbol) String() string

func (*StakeSymbol) UnmarshalCBOR

func (id *StakeSymbol) UnmarshalCBOR(data []byte) error

func (*StakeSymbol) UnmarshalJSON

func (id *StakeSymbol) UnmarshalJSON(b []byte) error

func (*StakeSymbol) UnmarshalText

func (id *StakeSymbol) UnmarshalText(b []byte) error

func (StakeSymbol) Valid

func (id StakeSymbol) Valid() bool

type TokenSymbol

type TokenSymbol ID20

TokenSymbol

func TokenFromStr

func TokenFromStr(s string) (TokenSymbol, error)

func (TokenSymbol) Address

func (id TokenSymbol) Address() Address

func (TokenSymbol) AsKey

func (id TokenSymbol) AsKey() string

func (TokenSymbol) Bytes

func (id TokenSymbol) Bytes() []byte

func (TokenSymbol) GoString

func (id TokenSymbol) GoString() string

func (TokenSymbol) MarshalCBOR

func (id TokenSymbol) MarshalCBOR() ([]byte, error)

func (TokenSymbol) MarshalJSON

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

func (TokenSymbol) MarshalText

func (id TokenSymbol) MarshalText() ([]byte, error)

func (TokenSymbol) Ptr

func (id TokenSymbol) Ptr() *TokenSymbol

func (TokenSymbol) String

func (id TokenSymbol) String() string

func (*TokenSymbol) UnmarshalCBOR

func (id *TokenSymbol) UnmarshalCBOR(data []byte) error

func (*TokenSymbol) UnmarshalJSON

func (id *TokenSymbol) UnmarshalJSON(b []byte) error

func (*TokenSymbol) UnmarshalText

func (id *TokenSymbol) UnmarshalText(b []byte) error

func (TokenSymbol) Valid

func (id TokenSymbol) Valid() bool

Jump to

Keyboard shortcuts

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