nonce

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2021 License: AGPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MaxNonceValue is the maximum value that the Account.Nonce can have
	// (40 bits: MaxNonceValue=2**40-1)
	MaxNonceValue = 0xffffffffff
)

Variables

View Source
var ErrNonceOverflow = errors.New("Nonce overflow, max value: 2**40 -1")

ErrNonceOverflow is used when a given nonce overflows the maximum capacity of the Nonce (2**40-1)

Functions

This section is empty.

Types

type Nonce

type Nonce uint64

Nonce represents the nonce value in a uint64, which has the method Bytes that returns a byte array of length 5 (40 bits).

func FromBytes

func FromBytes(b [5]byte) Nonce

FromBytes returns Nonce from a [5]byte

func (Nonce) BigInt

func (n Nonce) BigInt() *big.Int

BigInt returns the *big.Int representation of the Nonce value

func (Nonce) Bytes

func (n Nonce) Bytes() ([5]byte, error)

Bytes returns a byte array of length 5 representing the Nonce

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL