Documentation
¶
Index ¶
- func AddInt[T constraints.Integer](a, b T) (T, error)
- func Decode2CBigInt(bytes []byte) *big.Int
- func Dup(b []byte) []byte
- func Encode2CBigInt(n *big.Int) []byte
- func EnsureTimeout(tm tm, expected uint64)
- func FromBase58JSON(value []byte, size int, name string) ([]byte, error)
- func FromBase58JSONUnchecked(value []byte, name string) ([]byte, error)
- func FromHexJSON(value []byte, size int, name string) ([]byte, error)
- func FromHexJSONUnchecked(value []byte, name string) ([]byte, error)
- func GetStatePath() (string, error)
- func MulInt[T constraints.Integer](a, b T) (T, error)
- func ReplaceInvalidUtf8Chars(s string) string
- func SafeIntToUint32(v int) uint32
- func SubInt[T constraints.Integer](a, b T) (T, error)
- func ToBase58JSON(b []byte) []byte
- func ToBase64JSON(b []byte) []byte
- func ToHexJSON(b []byte) []byte
- func UnixMillisFromTime(t time.Time) int64
- func UnixMillisToTime(ts int64) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInt ¶ added in v0.10.0
func AddInt[T constraints.Integer](a, b T) (T, error)
AddInt makes safe sum for arbitrary integer type.
func Decode2CBigInt ¶ added in v0.11.0
Decode2CBigInt decodes two's complement representation of BigInt from bytes slice.
func Encode2CBigInt ¶ added in v0.11.0
Encode2CBigInt encodes BigInt into a two's complement representation.
func EnsureTimeout ¶ added in v0.8.0
func EnsureTimeout(tm tm, expected uint64)
EnsureTimeout ensures that no way when expected can be higher than current, but if somehow its happened...
func FromBase58JSONUnchecked ¶ added in v0.10.0
func FromHexJSON ¶ added in v0.10.0
func FromHexJSONUnchecked ¶ added in v0.10.0
func GetStatePath ¶
func MulInt ¶ added in v0.11.0
func MulInt[T constraints.Integer](a, b T) (T, error)
MulInt makes safe mul for arbitrary integer type.
func ReplaceInvalidUtf8Chars ¶ added in v0.8.0
ReplaceInvalidUtf8Chars replaces invalid utf8 characters with '?' to reproduce JVM behaviour.
func SafeIntToUint32 ¶ added in v0.11.0
func SubInt ¶ added in v0.11.0
func SubInt[T constraints.Integer](a, b T) (T, error)
SubInt makes safe sub for arbitrary integer type.
func ToBase58JSON ¶
func ToBase64JSON ¶ added in v0.6.0
func UnixMillisFromTime ¶ added in v0.10.0
func UnixMillisToTime ¶ added in v0.10.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.