pybtctool1
Command interface for bitcoin signatures and transactions
Usage
pybtctool [-sBbJj]
COMMAND
[,
COMMAND_ARG] ...
Overview
pybtctool has a set of commands for interacting with the Bitcoin network.
With a command, you can generate a signature, hash, seed, or address; serialise or deserialise standard data formats; query the blockchain; and many more operations.
Options
-
-s -
The -s option lets you read arguments from the command line.
-
-b -
The -b option lets you read binary data as an argument.
-
-j
-J -
The -j option lets you read JSON from the command line (-J to split a JSON list into multiple arguments).
Commands
Presently supported commands are:
Key manipulation
|
privkey -> pubkey |
|---|---|
|
privkey -> pubkey |
|
pubkey -> address |
|
pubkey -> address |
|
privkey -> address |
|
privkey -> address |
Key arithmetic
|
key1 key2 -> key1 + key2 (works on privkeys or pubkeys) |
|---|---|
|
pubkey privkey -> returns pubkey * privkey |
ECDSA operations
|
message privkey -> sig |
|---|---|
|
message sig pubkey -> True/False |
|
message sig -> pubkey |
Random data
|
-> privkey |
|---|---|
|
-> electrum seed |
Electrum operations
|
seed -> secret exponent |
|---|---|
|
seed or secret exponent i type -> privkey |
|
seed or secret exponent -> master public key |
|
seed or secret exponend or mpk -> pubkey |
BIP-32 operations
|
seed -> bip32 master key |
|---|---|
|
private or public bip32 key i -> child key |
|
private bip32 key -> public bip32 key |
|
private or public bip32_key -> privkey or pubkey |
Transaction operations
|
hex or bin transaction -> JSON tx |
|---|---|
|
JSON tx -> hex or bin tx |
|
inputs outputs -> tx |
|
inputs outputs change_addr fee -> tx |
|
tx i privkey -> tx with index i signed with privkey |
|
tx i script privkey -> signature |
|
tx i script sigs -> tx with index i signed with sigs |
|
script -> P2SH address |
|
pubkeys k n -> k-of-n multisig script from pubkeys |
|
tx i script sig pub -> True/False |
|
hex or bin tx -> hash |
Blockchain operations
|
address1 address2 etc. -> outputs to those addresses |
|---|---|
|
address1 address2 etc. -> unspent outputs to those addresses |
|
txash -> tx if present |
|
hex or bin tx -> tries to push to blockchain.info/pushtx |
Serialisation operations
|
JSON list or object prop -> desired property of that json object |
|---|---|
|
JSON list prop -> like |
|
JSON list start end -> given slice of the list |
|
JSON list -> number of elements |
|
JSON list -> sum of all values |