Hi there. I'm trying to figure out the best way to include a signature in a struct. For example, if I have a struct like:
struct SignedTransaction { transaction @0 :Transaction; signature @1 :Signature; } I'd like to be able to sign the transaction bytes (i.e. the packed Transaction on its own). Clearly I can just replace the transaction field with the message bytes of building the Transaction separately, but I expect packing would be less efficient, plus it creates a level of indirection to access the transaction. Basically, I'd like to: 1. Build the transaction Struct separately 2. Pack it to bytes and get the signature 3. Create a SignedTransaction, using the already constructed Transaction. 4. When deserializing, I'd need to be able to pull out the packed Transaction to verify the signature. Is there any simple way to do this? Other ideas? Thanks, John -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CA%2BxOWV-TX32ptA5SGE497zWzty1qiNJ0LkhojnEdK%2BSaHVKvYw%40mail.gmail.com.