@@ -38,47 +38,17 @@ For this operation, depending on the `keyId` parameter, there's two possible for
3838##### Authorized format
3939
4040This format is only valid for the BTC and tBTC key ids (see corresponding section for
41- details). In addition, there are two different sub-formats that can be used for authorized
42- signing: legacy and segwit. These are shown in the following subsections.
43-
44- ###### Legacy BTC transactions
45-
46- This sub-format is to be used when signing legacy (i.e., non-segwit) Bitcoin transaction
47- inputs.
48-
49- ```
50- {
51- "command": "sign",
52- "keyId": "xxxxx", // (*)
53- "message": {
54- "sighashComputationMode": "legacy",
55- "tx": "hhhh", // (**)
56- "input": i // (***)
57- },
58- "auth": {
59- "receipt": "hhhh",
60- "receipt_merkle_proof": [
61- "hhhh", "hhhh", ..., "hhhh"
62- ]
63- },
64- "version": 5
65- }
66- ```
67-
68- ###### Segwit BTC transactions
69-
70- This sub-format is to be used when signing segwit Bitcoin transaction inputs.
41+ details).
7142
7243```
7344{
7445 "command": "sign",
75- "keyId": "xxxxx", // (* )
46+ "keyId": "xxxxx", // (i )
7647 "message": {
77- "sighashComputationMode": "segwit",
78- "tx": "hhhh", // (**)
79- "input": i, // (***)
80- "witnessScript": "hhhh", // (x)
81- "outpointValue": i // (xx)
48+ "tx": "hhhh", // (ii)
49+ "input": i, // (iii)
50+ "witnessScript": "hhhh", // (iv)
51+ "outpointValue": i // (v)
8252 },
8353 "auth": {
8454 "receipt": "hhhh",
@@ -91,15 +61,15 @@ This sub-format is to be used when signing segwit Bitcoin transaction inputs.
9161```
9262
9363```
94- // (* ) the given string must be the
64+ // (i ) the given string must be the
9565// BIP44 path of the key to use for signing.
9666// See valid BIP44 paths below (BTC and tBTC for this format).
97- // (** ) the fully serialized BTC transaction
67+ // (ii ) the fully serialized BTC transaction
9868// that needs to be signed.
99- // (*** ) the input index of the BTC transaction
69+ // (iii ) the input index of the BTC transaction
10070// that needs to be signed.
101- // (x ) the witness script for the input that needs to be signed.
102- // (xx ) the outpoint value (i.e., amount of the UTXO) for the input
71+ // (iv ) the witness script for the input that needs to be signed.
72+ // (v ) the outpoint value (i.e., amount of the UTXO) for the input
10373// that needs to be signed.
10474//
10575// For the signing process to be successful, the computed receipts trie root
0 commit comments