#crypto #bitcoin

bin+lib hal

hal - the Bitcoin companion

16 releases (4 breaking)

0.5.2 Jan 14, 2020
0.4.4 Oct 1, 2019
0.3.0 Jul 26, 2019
0.1.1 Mar 24, 2019
0.0.5 May 5, 2015

#254 in Cryptography

Download history 23/week @ 2019-10-12 37/week @ 2019-10-19 25/week @ 2019-10-26 59/week @ 2019-11-02 26/week @ 2019-11-09 45/week @ 2019-11-16 16/week @ 2019-11-23 41/week @ 2019-11-30 101/week @ 2019-12-07 4/week @ 2019-12-14 3/week @ 2019-12-21 26/week @ 2019-12-28 5/week @ 2020-01-04 88/week @ 2020-01-11 34/week @ 2020-01-18

155 downloads per month
Used in hal-elements

CC0 license

97KB
2.5K SLoC

hal -- the Bitcoin companion

hal is a command line tool that provides all kinds of Bitcoin-related utilities.

Installation

$ cargo install hal

Summary of commands:

  • address

    • inspect: get information about addresses
    • create: create addresses using public keys or scripts
  • bech32

    • decode: parse the elements of the Bech32 format
    • encode: encode data in the Bech32 format
  • bip32

    • derive: derive keys and addresses from extended keys
    • inspect: inspect a BIP-32 xpub or xpriv
  • bip39

    • generate: generate a new BIP-39 mnemonic
    • get-seed: get the seed value and BIP-32 master key for a given BIP-39 mnemonic
  • block

    • create: create a binary block from JSON
    • decode: decode a binary block to JSON
  • key

    • generate: generate a random keypair
    • inspect: inspect private keys
    • verify: verify signatures
  • ln

    • invoice
      • decode: decode Lightning invoices
  • message

    • sign: sign a message using Bitcoin Signed Message
    • verify: verify a Bitcoin Signed Message
    • recover: recover the pubkey or address that signed a message
  • psbt

    • create: create a PSBT from a raw unsigned transaction
    • decode: decode a PSBT to JSON
    • edit: edit a PSBT inline
    • finalize: finalize a PSBT into a fully signed transaction
    • merge: merge multiple PSBTs into one
  • script

    • decode: decode a PSBT to JSON
    • coming soon: script descriptor support
  • tx

    • create: create a binary transaction from JSON
    • decode: decode a binary transaction to JSON

Extensions

hal allows the use of extensions that can be installed separately.

Known extensions:

Ideas:

  • optional Trezor and Ledger integration

Dependencies

~7.5MB
~138K SLoC