Skip to content

Commands Reference

Here's a commands reference page for the e2b command:

e2b - Encrypt-to-Bitcoin

e2b is a command-line tool that allows you to encrypt data and send it to a Bitcoin address. The encrypted data can then be decrypted and recovered using the recipient's private key.

Common CLI Commands

CommandDescription
e2b encrypt <text>Encrypt the provided text and output the encrypted data.
e2b decrypt <encrypted_data>Decrypt the provided encrypted data.
e2b generate-addressGenerate a new Bitcoin address and private key.
e2b info <encrypted_data>Display information about the encrypted data, including the recipient's Bitcoin address.

Useful Snippets

Encrypt text and send to a specific Bitcoin address:

bash
e2b encrypt "This is a secret message" -a 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2

Decrypt encrypted data:

bash
e2b decrypt "6PYRFqXSLk3aqwULSxxxx..."

Generate a new Bitcoin address and private key:

bash
e2b generate-address

Display information about encrypted data:

bash
e2b info "6PYRFqXSLk3aqwULSxxxx..."

Shortcuts and Aliases

AliasCommand
e2b ee2b encrypt
e2b de2b decrypt
e2b ge2b generate-address
e2b ie2b info

Configuration and Settings

The e2b tool can be configured using a configuration file located at ~/.e2b/config.yaml. Here's an example configuration:

yaml
default_address: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2

This sets the default Bitcoin address to be used for encryption.