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: 0

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