near / borsh-construct-py

Python implementation of Binary Object Representation Serializer for Hashing
https://borsh.io/
MIT License
26 stars 8 forks source link

Decoding TCP packet capture message using borsh-construct-py #17

Open singhparshant opened 9 months ago

singhparshant commented 9 months ago

I am trying to deserialise the message data captured using TCP dump in a local near network. As per the documentation, the messages are serialised using borsh protocol. Does anyone know how can i use borsh-construct-py to deserialse the borsh encoded message ? I think this is the format of the message between 2 nodes ?

https://github.com/near/nearcore/blob/fa8749dc60fe0de8e94c3046571731c622326e9f/chain/network-primitives/src/types.rs#L362