Documentation
¶
Index ¶
Constants ¶
const EncodedLen = 33
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int is a signed integer in the inclusive range [-maxUint256; maxUint256]. It stores sign separately from the absolute uint256 magnitude.
func DecodeBytes ¶
DecodeBytes parses signed uint256 byte format.
func MustParseDecimal ¶
MustParseDecimal parses s and panics on error.
func ParseDecimal ¶
ParseDecimal parses a base-10 signed integer in the inclusive range [-maxUint256; maxUint256].
func ParseNormalizedDecimal ¶
ParseNormalizedDecimal parses already normalized base-10 digits with separately provided sign. digits must be non-empty and contain only decimal digits without leading sign.
func (*Int) EncodeBytes ¶
func (z *Int) EncodeBytes() [EncodedLen]byte
EncodeBytes stores z in a signed uint256 byte format: 1 sign byte followed by 32 bytes of magnitude. Negative values are stored as bitwise-inverted magnitude bytes.
func (*Int) FillBytes ¶
FillBytes writes z in signed uint256 byte format into dst. dst must be at least EncodedLen bytes long.
func (*Int) SetFromDecimal ¶
SetFromDecimal parses a base-10 signed integer in the inclusive range [-maxUint256; maxUint256].