Questions tagged [borsh]

Binary Object Representation Serializer for Hashing

borsh - 'Binary Object Representation Serializer for Hashing' is a serialization format for security-critical projects. It is commonly used in blockchains including Solana and NEAR. See borsh on GitHub.

1 questions
0
votes
0 answers

How can I calculate the size of a buffer filled by borsh without having to fill it first?

I have what I consider to be a small chicken/egg problem. I have some working code that makes a buffer-layout Structure, adapted from this example on SolDev. The code then makes a Buffer, and uses the structure.encode() to encode some data into the…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494