blockchain

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDifficulty added in v0.2.0

func CalculateDifficulty(blockHash string) (*big.Float, error)

CalculateDifficulty calculates the difficulty of a block based on its hash

Types

type Difficulty

type Difficulty struct {
	RawValue float64
	Unit     string
}

func HashDifficulty added in v0.2.0

func HashDifficulty(hash string) (Difficulty, error)

func ParseDifficulty

func ParseDifficulty(raw string) (Difficulty, error)

func (Difficulty) Format added in v0.2.0

func (d Difficulty) Format() string

Format returns a human-readable representation of difficulty with appropriate units

func (Difficulty) String

func (d Difficulty) String() string

Jump to

Keyboard shortcuts

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