Documentation ¶
Index ¶
- type Int256
- func (u *Int256) Add(augend, addend *Int256) (*Int256, error)
- func (u *Int256) Copy() *Int256
- func (u *Int256) DecodeRLP(s *rlp.Stream) error
- func (u *Int256) EncodeRLP(w io.Writer) error
- func (u *Int256) Equals(v *Int256) bool
- func (u *Int256) MarshalJSON() ([]byte, error)
- func (u *Int256) Mul(multiplicand, multiplier *Int256) (*Int256, error)
- func (u *Int256) String() string
- func (u *Int256) Sub(minuend, subtrahend *Int256) (*Int256, error)
- func (u *Int256) UnmarshalJSON(b []byte) error
- func (u *Int256) Value() *big.Int
- type Uint256
- func (u *Uint256) Add(augend, addend *Uint256) (*Uint256, error)
- func (u *Uint256) Cmp(v *Uint256) int
- func (u *Uint256) Copy() *Uint256
- func (u *Uint256) DecodeRLP(s *rlp.Stream) error
- func (u *Uint256) EncodeRLP(w io.Writer) error
- func (u *Uint256) Equals(v *Uint256) bool
- func (u *Uint256) MarshalJSON() ([]byte, error)
- func (u *Uint256) Mul(multiplicand, multiplier *Uint256) (*Uint256, error)
- func (u *Uint256) String() string
- func (u *Uint256) Sub(minuend, subtrahend *Uint256) (*Uint256, error)
- func (u *Uint256) UnmarshalJSON(b []byte) error
- func (u *Uint256) Value() *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int256 ¶
type Int256 struct {
// contains filtered or unexported fields
}
Int256 represents an signed integer of 256 bits
func Int256From ¶
Int256From creates a Int256 struct based on the given int64 param any int64 is valid as a Int256
func NewInt256 ¶
NewInt256 creates a Int256 struct with an initial underlying value of the given param returns an error when the value cannot be correctly set
func (*Int256) Add ¶
Add sets u to augend + addend and returns u as the sum returns an error when the value cannot be correctly set
func (*Int256) Copy ¶
Copy creates and returns a new Int256 instance, with its underlying value set matching the receiver
func (*Int256) DecodeRLP ¶
DecodeRLP implements the rlp.Decoder interface it makes sure the value field is decoded even though it is private
func (*Int256) EncodeRLP ¶
EncodeRLP implements the rlp.Encoder interface it makes sure the value field is encoded even though it is private
func (*Int256) Equals ¶
Equals returns true if the two Int256 structs have the same underlying values, false otherwise
func (*Int256) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface it specifies how to marshal a Int256 struct so that it can be written to disk
func (*Int256) Mul ¶
Mul sets u to multiplicand * multiplier and returns u as the product returns an error when the value cannot be correctly set
func (*Int256) Sub ¶
Sub sets u to minuend - subtrahend and returns u as the difference returns an error when the value cannot be correctly set
func (*Int256) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface it specifies how to unmarshal a Int256 struct so that it can be reconstructed from disk
type Uint256 ¶
type Uint256 struct {
// contains filtered or unexported fields
}
Uint256 represents an unsigned integer of 256 bits
func NewUint256 ¶
NewUint256 creates a Uint256 struct with an initial underlying value of the given param returns an error when the value cannot be correctly set
func Uint256From ¶
Uint256From creates a Uint256 struct based on the given uint64 param any uint64 is valid as a Uint256
func (*Uint256) Add ¶
Add sets u to augend + addend and returns u as the sum returns an error when the value cannot be correctly set
func (*Uint256) Cmp ¶
Cmp calls the underlying Cmp method for the big.Int stored in a Uint256 struct as its value field
func (*Uint256) Copy ¶
Copy creates and returns a new Int256 instance, with its underlying value set matching the receiver
func (*Uint256) DecodeRLP ¶
DecodeRLP implements the rlp.Decoder interface it makes sure the value field is decoded even though it is private
func (*Uint256) EncodeRLP ¶
EncodeRLP implements the rlp.Encoder interface it makes sure the value field is encoded even though it is private
func (*Uint256) Equals ¶
Equals returns true if the two Uint256 structs have the same underlying values, false otherwise
func (*Uint256) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface it specifies how to marshal a Uint256 struct so that it can be written to disk
func (*Uint256) Mul ¶
Mul sets u to multiplicand * multiplier and returns u as the product returns an error when the value cannot be correctly set
func (*Uint256) Sub ¶
Sub sets u to minuend - subtrahend and returns u as the difference returns an error when the value cannot be correctly set
func (*Uint256) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface it specifies how to unmarshal a Uint256 struct so that it can be reconstructed from disk