package
0.0.0-20250204070817-3c82b7ad6a9f
Repository: https://github.com/0chain/gosdk_common.git
Documentation: pkg.go.dev
# Functions
AddBalance adds c and b, returning an error if the values overflow.
AutoFormatBalance returns a string representation of the balance with the most.
No description provided by the author
FormatBalance returns a string representation of the balance with the given unit.
No description provided by the author
No description provided by the author
No description provided by the author
Now current datetime.
No description provided by the author
No description provided by the author
ParseTime parse a time string with 4 formats
+1h5m : now (local timezone) + 1h5m +3900 : now (local timezone) +3900s 1647858200 : Unix timestamp 2022-03-21 10:21:38 : parse UTC date string with YYYY-MM-dd HH:mm:ss
Parameters - now is the current time - input is the time string to parse.
ToBalance converts ZCN tokens to Balance.
No description provided by the author
# Variables
No description provided by the author
ErrNegativeValue is returned if a float value is a negative number.
ErrTooLarge is returned if a value is greater than math.MaxInt64.
ErrTooManyDecimals is returned if a value has more than 10 decimal places.
ErrUint64AddOverflow is returned if when adding uint64 values overflow uint64.
ErrUint64OverflowsFloat64 is returned if when converting a uint64 to a float64 overflow float64.
No description provided by the author
# Type aliases
Balance represents client's balance in Züs native token fractions (SAS = 10^-10 ZCN).
No description provided by the author
A Key represents an identifier.
A Size represents a size in bytes.
Timestamp represents Unix time (e.g.