2

I am trying to understand Monero by coding a transaction parser and general utilities library in Go. Is there a place I can get a transaction specification for Monero transactions? I know it's based on CryptoNote, but I'd like something like https://en.bitcoin.it/wiki/Transaction to work with.

Also, is there any website I can get raw hex Monero transactions to test against?

user36303
  • 34,858
  • 2
  • 57
  • 123
Jimmy Song
  • 333
  • 1
  • 7

1 Answers1

3

There is no such specification. It's fairly simple though, see src/cryptonote_basic/cryptonote_basic.h, the transaction and block classes.

Most numbers are variable length integers (format in src/common/varint.h), vectors are a number followed by the elements, etc. Fields are concatenated. Hashes, keys, etc, are dumped as is. Objects which can be different types have an identifier determining the type (see VARIANT_TAG at the end of src/cryptonote_basic/cryptonote_basic.h), then the object.

You can find the hex dump of a transaction in the daemon: print_tx SOMETXID

user36303
  • 34,858
  • 2
  • 57
  • 123