Documentation
¶
Index ¶
- Variables
- func CheckSumHex(data []byte) string
- func DecodeQuoteString(str string) ([]byte, error)
- func DecodeQuoteStringWithLen(str string, expectedLen int) ([]byte, error)
- func DecodeString(str string) ([]byte, error)
- func DecodeStringWithLen(str string, expectedLen int) ([]byte, error)
- func EncodeToQuoteString(bytes []byte) string
- func EncodeToString(bytes []byte) string
- func MarshalCBOR(v interface{}) ([]byte, error)
- func MarshalJSONData(data []byte) json.RawMessage
- func MustMarshalCBOR(v interface{}) []byte
- func Sum256(msg []byte) []byte
- func UnmarshalCBOR(data []byte, v interface{}) error
- func UnmarshalCBORWithLen(data []byte, expectedLen int) ([]byte, error)
- func UnmarshalJSONData(data json.RawMessage) []byte
- func ValidCBOR(data []byte) error
- func ValidLink(link string) bool
- func ValidMessage(msg string) bool
- func ValidName(name string) bool
- type Address
- func (id Address) AsKey() string
- func (id Address) Bytes() []byte
- func (id Address) GoString() string
- func (id Address) MarshalCBOR() ([]byte, error)
- func (id Address) MarshalJSON() ([]byte, error)
- func (id Address) MarshalText() ([]byte, error)
- func (id Address) Ptr() *Address
- func (id Address) String() string
- func (id Address) ToStakeSymbol() (s StakeSymbol)
- func (id *Address) UnmarshalCBOR(data []byte) error
- func (id *Address) UnmarshalJSON(b []byte) error
- func (id *Address) UnmarshalText(b []byte) error
- func (id Address) Valid() bool
- type DataID
- func (id DataID) Bytes() []byte
- func (id DataID) GoString() string
- func (id DataID) MarshalCBOR() ([]byte, error)
- func (id DataID) MarshalJSON() ([]byte, error)
- func (id DataID) MarshalText() ([]byte, error)
- func (id DataID) String() string
- func (id *DataID) UnmarshalCBOR(data []byte) error
- func (id *DataID) UnmarshalJSON(b []byte) error
- func (id *DataID) UnmarshalText(b []byte) error
- func (id DataID) Valid() bool
- func (id DataID) VersionKey(version uint64) []byte
- type ErrPrefix
- type Hash
- func (id Hash) Bytes() []byte
- func (id Hash) GoString() string
- func (id Hash) MarshalCBOR() ([]byte, error)
- func (id Hash) MarshalJSON() ([]byte, error)
- func (id Hash) MarshalText() ([]byte, error)
- func (id Hash) String() string
- func (id *Hash) UnmarshalCBOR(data []byte) error
- func (id *Hash) UnmarshalJSON(b []byte) error
- func (id *Hash) UnmarshalText(b []byte) error
- func (id Hash) Valid() bool
- type IDList
- type IDg
- type ModelID
- func (id ModelID) Bytes() []byte
- func (id ModelID) GoString() string
- func (id ModelID) MarshalCBOR() ([]byte, error)
- func (id ModelID) MarshalJSON() ([]byte, error)
- func (id ModelID) MarshalText() ([]byte, error)
- func (id ModelID) String() string
- func (id *ModelID) UnmarshalCBOR(data []byte) error
- func (id *ModelID) UnmarshalJSON(b []byte) error
- func (id *ModelID) UnmarshalText(b []byte) error
- func (id ModelID) Valid() bool
- type RawData
- type Set
- type StakeSymbol
- func (id StakeSymbol) Address() Address
- func (id StakeSymbol) Bytes() []byte
- func (id StakeSymbol) GoString() string
- func (id StakeSymbol) MarshalCBOR() ([]byte, error)
- func (id StakeSymbol) MarshalJSON() ([]byte, error)
- func (id StakeSymbol) MarshalText() ([]byte, error)
- func (id StakeSymbol) Ptr() *StakeSymbol
- func (id StakeSymbol) String() string
- func (id *StakeSymbol) UnmarshalCBOR(data []byte) error
- func (id *StakeSymbol) UnmarshalJSON(b []byte) error
- func (id *StakeSymbol) UnmarshalText(b []byte) error
- func (id StakeSymbol) Valid() bool
- type TokenSymbol
- func (id TokenSymbol) Address() Address
- func (id TokenSymbol) AsKey() string
- func (id TokenSymbol) Bytes() []byte
- func (id TokenSymbol) GoString() string
- func (id TokenSymbol) MarshalCBOR() ([]byte, error)
- func (id TokenSymbol) MarshalJSON() ([]byte, error)
- func (id TokenSymbol) MarshalText() ([]byte, error)
- func (id TokenSymbol) Ptr() *TokenSymbol
- func (id TokenSymbol) String() string
- func (id *TokenSymbol) UnmarshalCBOR(data []byte) error
- func (id *TokenSymbol) UnmarshalJSON(b []byte) error
- func (id *TokenSymbol) UnmarshalText(b []byte) error
- func (id TokenSymbol) Valid() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var AddressEmpty = Address{}
View Source
var DataIDEmpty = DataID{}
View Source
var DecMode, _ = DecOpts.DecMode()
View Source
var DecOpts = cbor.DecOptions{
DupMapKey: cbor.DupMapKeyQuiet,
IndefLength: cbor.IndefLengthForbidden,
MaxArrayElements: 100_000,
MaxMapPairs: 1_000_000,
UTF8: cbor.UTF8DecodeInvalid,
}
View Source
var EncMode, _ = EncOpts.EncMode()
View Source
var EncOpts = cbor.EncOptions{
Sort: cbor.SortLengthFirst,
Time: cbor.TimeRFC3339Nano,
ShortestFloat: cbor.ShortestFloat16,
NaNConvert: cbor.NaNConvert7e00,
InfConvert: cbor.InfConvertFloat16,
IndefLength: cbor.IndefLengthForbidden,
BigIntConvert: cbor.BigIntConvertNone,
}
View Source
var HashEmpty = Hash{}
View Source
var ModelIDEmpty = ModelID{}
View Source
var NativeToken = TokenSymbol{}
View Source
var StakeEmpty = StakeSymbol{}
Functions ¶
func CheckSumHex ¶
func DecodeQuoteString ¶
func DecodeString ¶
DecodeString [str] to bytes from raw base64url.
func EncodeToQuoteString ¶
func EncodeToString ¶
EncodeToString bytes to a string using raw base64url format.
func MarshalCBOR ¶
func MarshalJSONData ¶
func MarshalJSONData(data []byte) json.RawMessage
func MustMarshalCBOR ¶
func MustMarshalCBOR(v interface{}) []byte
func UnmarshalCBOR ¶
func UnmarshalJSONData ¶
func UnmarshalJSONData(data json.RawMessage) []byte
func ValidMessage ¶
Types ¶
type Address ¶
type Address [20]byte
Address ==========
func AddressFrom ¶
func (Address) MarshalCBOR ¶
func (Address) MarshalJSON ¶
func (Address) MarshalText ¶
func (Address) ToStakeSymbol ¶
func (id Address) ToStakeSymbol() (s StakeSymbol)
func (*Address) UnmarshalCBOR ¶
func (*Address) UnmarshalJSON ¶
func (*Address) UnmarshalText ¶
type DataID ¶
type DataID [32]byte
DataID ==========
func DataIDFrom ¶
func (DataID) MarshalCBOR ¶
func (DataID) MarshalJSON ¶
func (DataID) MarshalText ¶
func (*DataID) UnmarshalCBOR ¶
func (*DataID) UnmarshalJSON ¶
func (*DataID) UnmarshalText ¶
func (DataID) VersionKey ¶
type Hash ¶
type Hash [32]byte
Hash ==========
func HashFromBytes ¶
func HashFromData ¶
func (Hash) MarshalCBOR ¶
func (Hash) MarshalJSON ¶
func (Hash) MarshalText ¶
func (*Hash) UnmarshalCBOR ¶
func (*Hash) UnmarshalJSON ¶
func (*Hash) UnmarshalText ¶
type IDList ¶
type IDList[T IDg] []T
func AddressToStakeSymbol ¶
func AddressToStakeSymbol(ids ...Address) IDList[StakeSymbol]
func (IDList[T]) CheckDuplicate ¶
func (IDList[T]) CheckValid ¶
type ModelID ¶
type ModelID [20]byte
ModelID ==========
func ModelIDFrom ¶
func ModelIDFromHash ¶
func (ModelID) MarshalCBOR ¶
func (ModelID) MarshalJSON ¶
func (ModelID) MarshalText ¶
func (*ModelID) UnmarshalCBOR ¶
func (*ModelID) UnmarshalJSON ¶
func (*ModelID) UnmarshalText ¶
type StakeSymbol ¶
type StakeSymbol [20]byte
StakeSymbol
func StakeFrom ¶
func StakeFrom(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 [20]byte
TokenSymbol
func TokenFrom ¶
func TokenFrom(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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.