.ds command pybtctool .ds COMMAND PYBTCTOOL .\" ========== .TH "\*[COMMAND]" 1 "2017-09-09" "pybitcointools" . .\" ========== .SH NAME .B \*[command] \- command interface for Bitcoin signatures and transactions . .\" ========== .SH SYNOPSIS . .SY \*[command] .OP \-sBbJj .I COMMAND .RB [ , .IR COMMAND_ARG ] \f[R].\|.\|.\f[] .YS . .\" ========== .SH DESCRIPTION . .P .B \*[command] has a set of commands for interacting with the Bitcoin network. . .P 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. . .\" ========== .SH OPTIONS . .TP .B \-s The -s option lets you read arguments from the command line. . .TP .B \-b The -b option lets you read binary data as an argument. . .TP .B \-j .TQ .B \-J The -j option lets you read JSON from the command line (-J to split a JSON list into multiple arguments). . .\" ========== .SH COMMANDS . .P Presently supported commands are: . .\" ---------- .SS Key manipulation . .TP .B privkey_to_pubkey .I privkey -> pubkey . .TP .B privtopub .I privkey -> pubkey . .TP .B pubkey_to_address .I pubkey -> address . .TP .B pubtoaddr .I pubkey -> address . .TP .B privkey_to_address .I privkey -> address . .TP .B privtoaddr .I privkey -> address . .\" ---------- .SS Key arithmetic . .TP .B add .I key1 key2 -> key1 + key2 (works on privkeys or pubkeys) . .TP .B multiply .I pubkey privkey -> returns pubkey * privkey . .\" ---------- .SS ECDSA operations . .TP .B ecdsa_sign .I message privkey -> sig . .TP .B ecdsa_verify .I message sig pubkey -> True/False . .TP .B ecdsa_recover .I message sig -> pubkey . .\" ---------- .SS Random data . .TP .B random_key -> privkey . .TP .B random_electrum_seed -> electrum seed . .\" ---------- .SS Electrum operations . .TP .B electrum_stretch .I seed -> secret exponent . .TP .B electrum_privkey .I "seed or secret exponent" i type -> privkey . .TP .B electrum_mpk .I "seed or secret exponent" -> master public key . .TP .B electrum_pubkey .I "seed or secret exponend or mpk" -> pubkey . .\" ---------- .SS BIP-32 operations . .TP .B bip32_master_key .I seed -> bip32 master key . .TP .B bip32_ckd .I "private or public bip32 key" i -> child key . .TP .B bip32_privtopub .I "private bip32 key" -> public bip32 key . .TP .B bip32_extract_key .I "private or public bip32_key" -> privkey or pubkey . .\" ---------- .SS Transaction operations . .TP .B deserialize .I "hex or bin transaction" -> JSON tx . .TP .B serialize .I "JSON tx" -> hex or bin tx . .TP .B mktx .I inputs outputs -> tx . .TP .B mksend .I inputs outputs change_addr fee -> tx . .TP .B sign .I tx i privkey -> tx with index i signed with privkey . .TP .B multisign .I tx i script privkey -> signature . .TP .B apply_multisignatures .I tx i script sigs -> tx with index i signed with sigs . .TP .B scriptaddr .I script -> P2SH address . .TP .B mk_multisig_script .I pubkeys k n -> k-of-n multisig script from pubkeys . .TP .B verify_tx_input .I tx i script sig pub -> True/False . .TP .B tx_hash .I "hex or bin tx" -> hash . .\" ---------- .SS Blockchain operations . .TP .B history .I address1 address2 etc. -> outputs to those addresses . .TP .B unspent .I address1 address2 etc. -> unspent outputs to those addresses . .TP .B fetchtx .I txash -> tx if present . .TP .B pushtx .I "hex or bin tx" -> tries to push to blockchain.info/pushtx . .\" ---------- .SS Serialisation operations . .TP .B access .I "JSON list or object" prop -> desired property of that json object . .TP .B multiaccess .I "JSON list" prop -> like \f[B]access\f[], but mapped across each list element . .TP .B slice .I "JSON list" start end -> given slice of the list . .TP .B count .I "JSON list" -> number of elements . .TP .B sum .I "JSON list" -> sum of all values . .\" ========== .SH SEE ALSO . .P .UR https://github.com/vbuterin/pybitcointools Project page for ‘pybitcointools’ .UE . . .\" Copyright © 2017 Ben Finney . .\" This is free software: you may copy, modify, and/or distribute this work .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; version 3 of that license or any later version. .\" No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details. . .\" Local variables: .\" coding: utf-8 .\" mode: nroff .\" End: .\" vim: fileencoding=utf-8 filetype=nroff :