digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__bitcoin_transaction {
label="BitcoinTransaction";
graph[style=dotted];
bitcoin_transaction__seq [label=<
pos | size | type | id |
0 | 4 | u4le | version |
4 | 1 | u1 | num_vins |
5 | ... | Vin | vins |
repeat num_vins times |
... | 1 | u1 | num_vouts |
... | ... | Vout | vouts |
repeat num_vouts times |
... | 4 | u4le | locktime |
>];
subgraph cluster__vin {
label="BitcoinTransaction::Vin";
graph[style=dotted];
vin__seq [label=<
pos | size | type | id |
0 | 32 | | txid |
32 | 4 | u4le | output_id |
36 | 1 | u1 | len_script |
37 | len_script | ScriptSignature | script_sig |
... | 4 | | end_of_vin |
>];
subgraph cluster__script_signature {
label="BitcoinTransaction::Vin::ScriptSignature";
graph[style=dotted];
script_signature__seq [label=<
pos | size | type | id |
0 | 1 | u1 | len_sig_stack |
1 | ... | DerSignature | der_sig |
... | 1 | u1→SighashType | sig_type |
... | 1 | u1 | len_pubkey_stack |
... | 65 | PublicKey | pubkey |
>];
subgraph cluster__der_signature {
label="BitcoinTransaction::Vin::ScriptSignature::DerSignature";
graph[style=dotted];
der_signature__seq [label=<
pos | size | type | id |
0 | 1 | | sequence |
1 | 1 | u1 | len_sig |
2 | 1 | | sep_1 |
3 | 1 | u1 | len_sig_r |
4 | len_sig_r | | sig_r |
... | 1 | | sep_2 |
... | 1 | u1 | len_sig_s |
... | len_sig_s | | sig_s |
>];
}
subgraph cluster__public_key {
label="BitcoinTransaction::Vin::ScriptSignature::PublicKey";
graph[style=dotted];
public_key__seq [label=<
pos | size | type | id |
0 | 1 | u1 | type |
1 | 32 | | x |
33 | 32 | | y |
>];
}
}
}
subgraph cluster__vout {
label="BitcoinTransaction::Vout";
graph[style=dotted];
vout__seq [label=<
pos | size | type | id |
0 | 8 | u8le | amount |
8 | 1 | u1 | len_script |
9 | len_script | | script_pub_key |
>];
}
}
bitcoin_transaction__seq:vins_type -> vin__seq [style=bold];
bitcoin_transaction__seq:num_vins_type -> bitcoin_transaction__seq:vins__repeat [color="#404040"];
bitcoin_transaction__seq:vouts_type -> vout__seq [style=bold];
bitcoin_transaction__seq:num_vouts_type -> bitcoin_transaction__seq:vouts__repeat [color="#404040"];
vin__seq:len_script_type -> vin__seq:script_sig_size [color="#404040"];
vin__seq:script_sig_type -> script_signature__seq [style=bold];
script_signature__seq:der_sig_type -> der_signature__seq [style=bold];
script_signature__seq:pubkey_type -> public_key__seq [style=bold];
der_signature__seq:len_sig_r_type -> der_signature__seq:sig_r_size [color="#404040"];
der_signature__seq:len_sig_s_type -> der_signature__seq:sig_s_size [color="#404040"];
vout__seq:len_script_type -> vout__seq:script_pub_key_size [color="#404040"];
}