typedefs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashLength          = 16
	WordLength          = 128
	BranchElementLength = 32
)

Variables

This section is empty.

Functions

func BigToBase62

func BigToBase62(num *big.Int) string

return 11 chars base 62 representation of a big int base chars are 0-9 a-z A-Z

func BytesToBig

func BytesToBig(data []byte) *big.Int

Types

type BranchElement

type BranchElement [BranchElementLength]byte

func BranchElementFromHash

func BranchElementFromHash(a, b SPHash) BranchElement

func (BranchElement) Big

func (h BranchElement) Big() *big.Int

func (BranchElement) Bytes

func (h BranchElement) Bytes() []byte

func (BranchElement) Hex

func (h BranchElement) Hex() string

func (BranchElement) Str

func (h BranchElement) Str() string

type EpochData

type EpochData struct {
	Epoch                   *big.Int
	FullSizeIn128Resolution *big.Int
	BranchDepth             *big.Int
	MerkleNodes             []*big.Int
}

type SPHash

type SPHash [HashLength]byte

func (SPHash) Big

func (h SPHash) Big() *big.Int

func (SPHash) Bytes

func (h SPHash) Bytes() []byte

func (SPHash) Hex

func (h SPHash) Hex() string

func (SPHash) Str

func (h SPHash) Str() string

type Word

type Word [WordLength]byte

func (Word) ToUint256Array

func (w Word) ToUint256Array() []*big.Int

Jump to

Keyboard shortcuts

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