-
Notifications
You must be signed in to change notification settings - Fork 176
Commands
Commands are named with several objectives in mind. Congruence with the SX command set and brevity are important considerations, but in many cases these have taken a back seat to internal consistency and transparency.
Commands are generally named so that related commands sort together. In the case of network commands (fetch-
, send-
, validate-
and watch-
) the command's action (verb) starts the name. In other commands (e.g. tx-
, address-
) the primary data type (noun) starts the name. This distinction is primarily based on the congruence objective and also tends to read more naturally.
Commands that convert from one data type to another are named using the "input-to-output" nomenclature. In certain cases the second data type is implied and the -encode
/ -decode
suffixes are used instead. This distinction is a nod to the congruence objective.
Commands that hash data are named only with the type of hash. In these cases the data type of both the input and the output data type is Base16. As is the nature of hashing, these operations are not reversible and are therefore singletons.
Commands pertaining to stealth addresses are prefixed with stealth-
to differentiate them from bitcoin address commands.
Commands preixed or suffixed with validate
have a third result code state: invalid (1). This is in addition to success / valid (0) and failure (-1), which may be returned by any command.
Commands suffixed with -new
create a new instance of whatever type is specified in the command. Other command actions (e.g. -set
, -sign
, -add
, -multiply
, -uncover
) are unique to the contexts in which they are defined.
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