Skip to content

bx base58check decode

Eric Voskuil edited this page Oct 3, 2015 · 19 revisions

Convert a Base58Check value to its component parts.

$ bx base58check-decode --help
Usage: bx base58check-decode [-h] [--config VALUE] [--format VALUE]      
[BASE58CHECK]                                                            

Info: Convert a Base58Check value to its component parts.                

Options (named):

-c [--config]        The path to the configuration settings file.        
-f [--format]        The output format. Options are 'info', 'json' and   
                     'xml', defaults to 'info'.                          
-h [--help]          Get a description and instructions for this command.

Arguments (positional):

BASE58CHECK          The Base58Check value to decode. If not specified   
                     the value is read from STDIN.

See Base58Check encoding for a detailed description of the encoding.

See also base58check-encode.

Example 1

version 0

$ bx base58check-decode 173RKgkk7fMbYUYBGyyAHeZ6rwfKRMn17h7DtGsmpEdab8TV6UB
wrapper
{
    checksum 1020266843
    payload 031bab84e687e36514eeaf5a017c30d32c1f59dd4ea6629da7970ca374513dd006
    version 0
}

Example 2

version 42

$ bx base58check-decode 7DTXS6pY6a98XH2oQTZUbbd1Z7P4NzkJqfraixprPutXQVTkwBGw
wrapper
{
    checksum 3840642601
    payload 031bab84e687e36514eeaf5a017c30d32c1f59dd4ea6629da7970ca374513dd006
    version 42
}

Example 3

$ bx base58check-decode 12ANjYr7zPnxRdZfnmC2e6jjHDpBY
wrapper
{
    checksum 530125139
    payload 5361746f736869204e616b616d6f746f
    version 0
}

Notice that the following commands produce the equivalent result.

$ bx base58-decode 12ANjYr7zPnxRdZfnmC2e6jjHDpBY | bx wrap-decode
005361746f736869204e616b616d6f746f5311991f
wrapper
{
    checksum 530125139
    payload 5361746f736869204e616b616d6f746f
    version 0
}

Extract the payload value.

$ bx base16-decode 5361746f736869204e616b616d6f746f
Satoshi Nakamoto

Example 4

piped input

$ echo 12ANjYr7zPnxRdZfnmC2e6jjHDpBY | bx base58check-decode
12ANjYr7zPnxRdZfnmC2e6jjHDpBY 
wrapper
{
    checksum 530125139
    payload 5361746f736869204e616b616d6f746f
    version 0
}

BX Menu

Clone this wiki locally