Skip to main content

Module utils

Module utils 

Source
Expand description

General utility functions, conversions, and helper tools.

Functions§

asset_entropy
Calculates new sha256 midstate and binds generated entropy to the specific outpoint.
btc2sat
Converts BTC amount into Satoshi.
hash_script
Computes the SHA-256 hash of a given script and returns the resulting 32-byte array.
random_mnemonic
Generates a radom menemonic with 12 words.
sat2btc
Converts Satoshi amount into BTC.
tap_data_hash
Hashes arbitrary data with and additional TapData and tags.
tr_unspendable_key
Generates a hardcoded “unspendable” Taproot public key.