Documentation ¶
Index ¶
- Variables
- type Data
- type Data20
- type Data256
- type Data32
- type Data8
- type HexUint
- type Len20
- type Len256
- type Len32
- type Len8
- type Quantity
- func (q Quantity) BigInt() *big.Int
- func (q Quantity) Bytes() []byte
- func (q Quantity) Hex() string
- func (q Quantity) IsUint64() bool
- func (q Quantity) IsZero() bool
- func (q Quantity) MarshalJSON() ([]byte, error)
- func (q Quantity) Uint64() uint64
- func (q *Quantity) UnmarshalCBOR(b []byte) error
- func (q *Quantity) UnmarshalJSON(b []byte) error
- func (d Quantity) WriteHexBytes(dst []byte) []byte
- type VarData
- type VarLen
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VarDataFromBytes = DataFromBytes[VarLen] Data8FromBytes = DataFromBytes[Len8] Data20FromBytes = DataFromBytes[Len20] Data32FromBytes = DataFromBytes[Len32] Data256FromBytes = DataFromBytes[Len256] )
View Source
var ( VarDataFromHex = DataFromHex[VarLen] Data8FromHex = DataFromHex[Len8] Data20FromHex = DataFromHex[Len20] Data32FromHex = DataFromHex[Len32] Data256FromHex = DataFromHex[Len256] )
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data[LD tp.LengthDescriptor] struct { tp.Data[LD] }
func DataFromBytes ¶
func DataFromBytes[LD tp.LengthDescriptor](b []byte) Data[LD]
func DataFromHex ¶
func DataFromHex[LD tp.LengthDescriptor](s string) Data[LD]
func (Data[LD]) MarshalJSON ¶
func (*Data[LD]) UnmarshalCBOR ¶
func (*Data[LD]) UnmarshalJSON ¶
func (Data[LD]) WriteHexBytes ¶
type HexUint ¶
type HexUint uint64
Special type for convenient uint64-to-hex conversion Only used in responses, not for db storage
func (HexUint) MarshalJSON ¶
func (*HexUint) UnmarshalJSON ¶
func (HexUint) WriteHexBytes ¶
type Quantity ¶
func QuantityFromBigInt ¶
func QuantityFromBytes ¶
func QuantityFromHex ¶
func QuantityFromUint64 ¶
func (Quantity) MarshalJSON ¶
func (*Quantity) UnmarshalCBOR ¶
func (*Quantity) UnmarshalJSON ¶
func (Quantity) WriteHexBytes ¶
type VarLen ¶
type VarLen = tinypack.VariadicLength
Click to show internal directories.
Click to hide internal directories.