Documentation ¶
Index ¶
- func IsPositive(b BigUInt) bool
- func IsZero(b BigUInt) bool
- type BigUInt
- func (b *BigUInt) Add(x, y *BigUInt) *BigUInt
- func (b *BigUInt) Cmp(i *BigUInt) int
- func (b *BigUInt) Div(x, y *BigUInt) *BigUInt
- func (b *BigUInt) Exp(x, y, m *BigUInt) *BigUInt
- func (b *BigUInt) Marshal() ([]byte, error)
- func (b *BigUInt) Mul(x, y *BigUInt) *BigUInt
- func (b *BigUInt) Size() int
- func (b *BigUInt) Sub(x, y *BigUInt) *BigUInt
- func (b *BigUInt) Uint64() uint64
- func (b *BigUInt) Unmarshal(by []byte) error
- type LocalAddress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPositive ¶
Types ¶
type BigUInt ¶
BigUInt is a simple wrapper on bigint to support marshaling to protobufs
func (*BigUInt) Div ¶
Div sets z to the quotient x/y for y != 0 and returns z. If y == 0, a division-by-zero run-time panic occurs. Div implements Euclidean division (unlike Go); see DivMod for more details.
func (*BigUInt) Exp ¶
Exp sets z = x**y mod |m| (i.e. the sign of m is ignored), and returns z. If y <= 0, the result is 1 mod |m|; if m == nil or m == 0, z = x**y.
Modular exponentation of inputs of a particular size is not a cryptographically constant-time operation.
type LocalAddress ¶
type LocalAddress []byte
func (LocalAddress) Compare ¶
func (a LocalAddress) Compare(other LocalAddress) int
func (LocalAddress) Hex ¶
func (a LocalAddress) Hex() string
From ethereum with finalized sha3 Note: only works with addresses up to 256 bit
func (LocalAddress) Marshal ¶
func (a LocalAddress) Marshal() ([]byte, error)
Marshal converts to a byte buffer for protobufs
func (LocalAddress) Size ¶
func (a LocalAddress) Size() int
Size returns the number of bytes for deterministic marshaling
func (LocalAddress) String ¶
func (a LocalAddress) String() string
func (*LocalAddress) Unmarshal ¶
func (a *LocalAddress) Unmarshal(data []byte) error
Unmarshal unmarshals protobuf data