Skip to content

bx ec to address

evoskuil edited this page Oct 14, 2014 · 24 revisions

Convert an EC public key to a Bitcoin address.

$ bx ec-to-address --help
Usage: bx ec-to-address [-h] [--config VALUE] [--version VALUE]         
[EC_PUBLIC_KEY]

Info: Convert an EC public key to a Bitcoin address.

Options (named):

-c [--config]        The path to the configuration settings file.        
-h [--help]          Get a description and instructions for this command.
-v [--version]       The desired Bitcoin address version.                

Arguments (positional):

EC_PUBLIC_KEY        The Base16 EC public key to convert. If not         
                     specified the key is read from STDIN.

Example 1

compressed key

$ bx ec-to-address 0247140d2811498679fe9a0467a75ac7aa581476c102d27377bc0232635af8ad36
1EKJFK8kBmasFRYY3Ay9QjpJLm4vemJtC1

Example 2

compressed key, --version 42

$ bx ec-to-address -v 42 0247140d2811498679fe9a0467a75ac7aa581476c102d27377bc0232635af8ad36
J8Wdbser1M3fbdQB4nxXn1FLmwtYXKovfA

Example 3

uncompressed key

$ bx ec-to-address 0447140d2811498679fe9a0467a75ac7aa581476c102d27377bc0232635af8ad36e87bb04f401be3b770a0f3e2267a6c3b14a3074f6b5ce4419f1fcdc1ca4b1cb6
197FLrycah42jKDgfmTaok7b8kNHA7R2ih

Example 4

uncompressed key, --version 42

$ bx ec-to-address -v42 0447140d2811498679fe9a0467a75ac7aa581476c102d27377bc0232635af8ad36e87bb04f401be3b770a0f3e2267a6c3b14a3074f6b5ce4419f1fcdc1ca4b1cb6
J3JahRViQGWq5X5KhPSyB1YdZwBu2EQzFR

Example 5

bx seed | bx ec-new | bx ec-to-public | bx ec-to-address -v42
b688d3e5ea4f3ff7859c281570e8535a
771c66610eddfab64fb24f54e60ae303c44efaab592947b3fa3b5de21373e277
035730c857f567ad4c335e321306dc8782c518297376f25696028b70156787455c
J7mztYdoPufKyJAtAsuor8tdHHthfsWc2c

BX Menu

Clone this wiki locally