Skip to content

Latest commit

 

History

History
97 lines (50 loc) · 2.12 KB

peculium_core_difficulty.md

File metadata and controls

97 lines (50 loc) · 2.12 KB

Module peculium_core_difficulty

Bitcoin Difficulty Utilities. Copyright (c) 2013 Alexander Færøy

Authors: Alexander Færøy (ahf@0x90.dk).

Description

This module contains utilities for calculating the Bitcoin difficulty.

Data Types

Function Index

block_work/1Calculates the amount of block work from the compact bits representation.
from_bits/1Calculates the difficulty from the compact bits representation.
max_difficulty/0Returns the max difficulty.
target/1Calculates the target from the compact bits.

Function Details

block_work/1


block_work(Bits::uint32_t()) -> number()



Calculates the amount of block work from the compact bits representation.

from_bits/1


from_bits(Bits::uint32_t()) -> number()



Calculates the difficulty from the compact bits representation.

max_difficulty/0


max_difficulty() -> number()



Returns the max difficulty.

target/1


target(Bits::uint32_t()) -> number()



Calculates the target from the compact bits.