Documentation ¶
Index ¶
- type Uint256
- func (u *Uint256) Add(a, b *Uint256) (*Uint256, error)
- func (u *Uint256) AddMod(a, b, m *Uint256) (*Uint256, error)
- func (u *Uint256) Clone() *Uint256
- func (u *Uint256) Cmp(a *Uint256) int
- func (u *Uint256) Div(a, b *Uint256) (*Uint256, error)
- func (u *Uint256) Eq(a *Uint256) bool
- func (u *Uint256) FromBigInt(a *big.Int) (*Uint256, error)
- func (u *Uint256) FromUint32Array(z [8]uint32) error
- func (u *Uint256) FromUint64(a uint64) (*Uint256, error)
- func (u *Uint256) Gt(a *Uint256) bool
- func (u *Uint256) Gte(a *Uint256) bool
- func (u *Uint256) Lt(a *Uint256) bool
- func (u *Uint256) Lte(a *Uint256) bool
- func (u *Uint256) MarshalBinary() ([]byte, error)
- func (u *Uint256) MarshalString() (string, error)
- func (u *Uint256) Mod(a, m *Uint256) (*Uint256, error)
- func (u *Uint256) Mul(a, b *Uint256) (*Uint256, error)
- func (u *Uint256) MulMod(a, b, m *Uint256) (*Uint256, error)
- func (u *Uint256) SetOne() *Uint256
- func (u *Uint256) SetZero() *Uint256
- func (u *Uint256) String() string
- func (u *Uint256) Sub(a, b *Uint256) (*Uint256, error)
- func (u *Uint256) ToUint32() (uint32, error)
- func (u *Uint256) ToUint32Array() ([8]uint32, error)
- func (u *Uint256) ToUint64() (uint64, error)
- func (u *Uint256) UnmarshalBinary(data []byte) error
- func (u *Uint256) UnmarshalString(s string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Uint256 ¶
type Uint256 struct {
// contains filtered or unexported fields
}
Uint256 is an unsigned 256-bit integer
func BaseDatasizeConst ¶
func BaseDatasizeConst() *Uint256
BaseDatasizeConst returns constants.BaseDatasizeConst as Uint256
func DSPIMinDeposit ¶
func DSPIMinDeposit() *Uint256
DSPIMinDeposit returns constants.DSPIMinDeposit as Uint256
func (*Uint256) FromBigInt ¶
FromBigInt converts big.Int into Uint256
func (*Uint256) FromUint32Array ¶
FromUint32Array takes in an array of uint32 objects and make a Uint256
func (*Uint256) FromUint64 ¶
FromUint64 converts a uint64 into Uint256
func (*Uint256) MarshalBinary ¶
MarshalBinary marshals Uint256 to a byte slice
func (*Uint256) MarshalString ¶
MarshalString returns 64 hex-encoded string of Uint256 object
func (*Uint256) ToUint32 ¶
ToUint32 returns the lowest 32 bits of u and an error if the operation overflows
func (*Uint256) ToUint32Array ¶
ToUint32Array converts Uint256 into an array of uint32 objects; note that the order is reversed, so that the lower-order uint32 objects have smaller indices.
func (*Uint256) ToUint64 ¶
ToUint64 returns the lowest 64 bits of u and an error if the operation overflows
func (*Uint256) UnmarshalBinary ¶
UnmarshalBinary unmarshals a byte slice to a Uint256 object
func (*Uint256) UnmarshalString ¶
UnmarshalString marshals hex-encoded string to Uint256 object