Crate nanopow_rs [] [src]

Functions

check_work

Take an input block hash or public key in the form of a 32-character hexadecimal encoded string and a 16-character hex encoded string of a work value and returns a boolean of whether the work is valid for the input hash.

generate_work

Takes an input block hash or public key in the form of a 32-character hexadecimal encoded string and returns an 16-character hex-encoded string of the generated work. Runs a maximum of max_iters distributed across all threads (one thread runs max_iters/numcpus iters) and returns None if no work was found. If max_iters is None, runs until valid work is found.