The communication between two different blockchain clients happens as follows:
All the data send between nodes is serialized as JSON.
The data usually follows this pattern:
__type__: <Type of data>
__data__: <Data content>
- Block
__type__: <Type of data>
__header__: <Header>
__transactions__: <Transactions>
- Tuple/List
__type__: <Tuple|List>
__<Index>__: <Data at index>
- Dict
__type__: 'Dict'
__<key>__: <Data at key>
- Bytes (current Codec: utf-8)
__type__: 'Bytes'
__encoding__: <Codec>
__data__: <Decoded data content>
- Hex-Bytes (Used for NaCl Keys/Signatures)
Data is encoded(nacl.encoding.HexEncoder) before decoding with codec
__type__: 'Hex-Bytes'
__encoding__: <Codec>
__data__: <Decoded data content>
- SigningKey
Data is encoded(nacl.encoding.HexEncoder) before decoding with codec
__type__: 'SigningKey'
__encoding__: <Codec>
__seed__: <Decoded seed of the key>