bigutil

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 5 Imported by: 0

README

bigutil

Installation

go get github.com/m0t0k1ch1-go/bigutil

Documentation

Index

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 a wrapper for big.Int that represents uint256.

func BigIntToUint256

func BigIntToUint256(x *big.Int) (Uint256, error)

BigIntToUint256 returns the Uint256 that wraps the given big.Int.

func MustBigIntToUint256

func MustBigIntToUint256(x *big.Int) Uint256

MustBigIntToUint256 returns the Uint256 that wraps the given big.Int. It panics for invalid input.

func (Uint256) BigInt

func (i Uint256) BigInt() big.Int

BigInt returns the big.Int.

func (Uint256) MarshalJSON

func (i Uint256) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Uint256) Scan

func (i *Uint256) Scan(src any) error

Scan implements the sql.Scanner interface.

func (Uint256) String

func (i Uint256) String() string

String implements the fmt.Stringer interface.

func (*Uint256) UnmarshalJSON

func (i *Uint256) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (Uint256) Value

func (i Uint256) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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