-
Notifications
You must be signed in to change notification settings - Fork 177
bx uri decode
Skaht edited this page Mar 10, 2016
·
3 revisions
Decompose a Bitcoin URI into its parts.
$ bx uri-decode --help
Usage: bx uri-decode [-h] [--config VALUE] [--format VALUE] [URI]
Info: Decompose a Bitcoin URI into its 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):
URI The Bitcoin URI to decode. The URI should be quoted
when entered on the command line. If not specified
the URI is read from STDIN.
See also uri-encode.
BIP-21 Examples address
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L"
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
scheme bitcoin
}
BIP-21 Examples address and label
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?label=Luke-Jr"
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
label Luke-Jr
scheme bitcoin
}
BIP-21 Examples address, amount and label
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?amount=20.3&label=Luke-Jr"
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
amount 2030000000
label Luke-Jr
scheme bitcoin
}
BIP-21 Examples address, amount, label and message
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?amount=50&label=Luke-Jr&message=Donation%20for%20project%20xyz"
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
amount 5000000000
label Luke-Jr
message "Donation for project xyz"
scheme bitcoin
}
BIP-21 Examples required but unknown parameters
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?req-somethingyoudontunderstand=50&req-somethingelseyoudontget=999"
Error: the argument ('bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?req-somethingyoudontunderstand=50&req-somethingelseyoudontget=999') for option URI is invalid
BIP-21 Examples optional unknown parameters
$ bx uri-decode "bitcoin:1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L?somethingyoudontunderstand=50&somethingelseyoudontget=999"
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
scheme bitcoin
}
stealth address
$ bx uri-decode "bitcoin:hfFGUXFPKkQ5M6LC6aEUKMsURdhw93bUdYdacEtBA8XttLv7evZkira2i"
uri
{
address hfFGUXFPKkQ5M6LC6aEUKMsURdhw93bUdYdacEtBA8XttLv7evZkira2i
scheme bitcoin
}
piped uri
$ echo "bitcoin:hfFGUXFPKkQ5M6LC6aEUKMsURdhw93bUdYdacEtBA8XttLv7evZkira2i?amount=99999999.99999999" | bx uri-decode
uri
{
address hfFGUXFPKkQ5M6LC6aEUKMsURdhw93bUdYdacEtBA8XttLv7evZkira2i
amount 9999999999999999
scheme bitcoin
}
piped commands
$ bx uri-encode -a 20.3 -l Luke-Jr -m "Donation for project xyz" 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L | bx uri-decode
uri
{
address 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L
amount 2030000000
label Luke-Jr
message "Donation for project xyz"
scheme bitcoin
}
Users | Developers | License | Copyright © 2011-2024 libbitcoin developers
- Home
- Build BX
- General Information
- Developer Information
- Configuration Settings
- Tutorials
- Meta Commands
- Wallet Commands
- Key Encryption Commands
- Stealth Commands
- Messaging Commands
- Transaction Commands
- Online Commands
- Encoding Commands
- Hash Commands
- Math Commands