utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BN

type BN big.Int

BN is a wrapper over big.Int to implement only unmarshalText for json decoding.

func NewBNFromInt64

func NewBNFromInt64(i int64) *BN

func (*BN) Hex

func (b *BN) Hex() string

func (*BN) Int

func (b *BN) Int() *big.Int

Int returns b's *big.Int form

func (*BN) MarshalText

func (b *BN) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler

func (*BN) UnmarshalText

func (b *BN) UnmarshalText(text []byte) (err error)

UnmarshalText implements the encoding.TextUnmarshaler interface.

type M

type M map[string]string

M is a type shorthand for param input

type Time

type Time time.Time

Time is a wrapper over big.Int to implement only unmarshalText for json decoding.

func (*Time) FormatDate

func (t *Time) FormatDate() string

func (*Time) MarshalText

func (t *Time) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler

func (*Time) Time

func (t *Time) Time() time.Time

Time returns t's time.Time form

func (*Time) UnmarshalText

func (t *Time) UnmarshalText(text []byte) (err error)

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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