forked from jgarzik/txtool
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
113 lines (77 loc) · 2.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Build bitcoin transactions
--------------------------
Usage: txtool [options] COMMAND [command parameters]
Options:
-f, --file Load/store transaction state to/from FILE
Theory of operation
-------------------
All operation revolves around an internal database, which is modified
via execution of a command operation:
1. txtool reads transaction state file (JSON). Default "txstatedb.json".
2. txtool executes command given on command line,
updating transaction state.
3. txtool writes transaction state file, overwriting
previous version.
"transaction state" is anything involving the given transaction being
built, examined or modified.
A session begins when a new database is initialized, using the "init"
command.
txtool command summary
----------------------
dump
Inspect transaction state database.
help
List this command summary.
init
Initialize new transaction state database.
inputs TXID1 VOUT1 TXID2 VOUT2...
Raw transaction building. Append to list of TX inputs.
inputs.clear
Clear list of TX inputs.
multisig N-REQUIRED KEY1 KEY2 KEY3...
Begin new multi-sig tx
nreq N-REQUIRED
Specify number of sigs required for a multisig tx
outputs ADDRESS1 VALUE1 ADDRESS2 VALUE2...
Raw transaction building. Append to list of TX outputs.
outputs.clear
Clear list of TX outputs.
pubkey.get ADDRESS
RPC: Obtain full pubkey, given bitcoin address (pubkey hash),
from bitcoind wallet.
pubkeys KEY1 KEY2 KEY3...
Append to list of pubkeys / bitcoin addresses
pubkeys.clear
Clear list of pubkeys.
raw SERIALIZED-TX
Input serialized transaction from command line
raw.append FILE
Append FILE to in-memory serialized transaction data.
raw.clear
Clear serialized tx data.
raw.create
RPC: create raw transaction, given inputs and outputs.
raw.decode
RPC: decode raw transaction to readable JSON object.
raw.get TXID
RPC: get raw transaction, given hash txid.
raw.read FILE
Input serialized transaction from file.
raw.write FILE
Output serialized transaction to file.
raw.sign [anyonecanpay]
RPC: sign raw transaction, if possible.
Uses keys in bitcoind's wallet.
If the optional argument "anyonecanpay" is supplied,
outputs are locked, but third party inputs may change.
raw.send
RPC: broadcast raw transaction to network,
returning a transaction id.
wallet.msig
Commit in-memory multisig data (N-Required, Keys) to RPC wallet,
returning a multisig payment address.
Encryption (walletpassphrase) note
----------------------------------
The user is expected to authenticate with bitcoind RPC prior to using
this tool, if this tool will require access to private keys for the
operation (e.g. signing).