package
0.43.4
Repository: https://github.com/vegaprotocol/liqbot.git
Documentation: pkg.go.dev

# Functions

DecChain offers the same chainable interface for decimals.
DecimalFromFloat ...
DecimalFromInt64 ...
DecimalFromString ...
DecimalFromUint ...
DecimalZero ...
IntFromUint ...
Max returns the largest of the 2 numbers.
MaxD ...
MaxDecimal ...
MaxUint returns max value for uint256.
Min returns the smallest of the 2 numbers.
MinD ...
NewDecimalFromBigInt ...
NewDecimalFromFloat ...
NewInt creates a new Int with the value of the int64 passed as a parameter.
NewIntFromUint creates a new Int with the value of the uint passed as a parameter.
NewUint creates a new Uint with the value of the uint64 passed as a parameter.
Sum just removes the need to write num.NewUint(0).Sum(x, y, z) so you can write num.Sum(x, y, z) instead, equivalent to x + y + z.
UintChain returns a Uint that supports chainable operations The Uint passed to the constructor is the value that will be updated, so be careful Things like x := NewUint(0).Add(y, z) x.Mul(x, foo) can be written as: x := UintChain(NewUint(0)).Add(y, z).Mul(foo).Get().
UintDecChain returns a chainable decimal from a given uint this moves the conversion stuff out from the caller.
UintFromBig construct a new Uint with a big.Int returns true if overflow happened.
UintFromBytes allows for the conversion from Uint.Bytes() back to a Uint.
UintFromDecimal returns a decimal version of the Uint, setting the bool to true if overflow occurred.
UintFromString created a new Uint from a string interpreted using the give base.
UintToString convert a uint to uint64 return "0" if nil.
UintToUint64 convert a uint to uint64 return 0 if nil.
Zero ...

# Constants

constants.
constants.
constants.

# Structs

DChain ...
Int a wrapper to a signed big int.
UChain ...
Uint A wrapper for a big unsigned int.

# Type aliases

Decimal is a shopspring.Decimal.
DecRounding ...