Regarding the attachment convention, is my interpretation correct?
- Attachments are sent outside of the ledger. The sha256 hash of the attachment data is included in the transaction's memo field only for the receiver to verify the integrity of the actual attachment data received through other means?
Sometimes there is a need to send more information about a transaction than fits in the provided memo field, for example: KYC info, an invoice, a short note. Such data shouldn’t be placed in the ledger because of it’s size or private nature. Instead, you should create what we call an Attachment. A Stellar attachment is simply a JSON document. The sha256 hash of this attachment is included as a memo hash in the transaction. The actual attachment document can be sent to the receiver through some other channel, most likely through the receiver’s Auth server.
Attachments have a flexible structure. They can include the following fields but these are optional and there can be extra information attached.
A few follow ups..
I noticed 'route' parameters defined in the attachment structure for the transaction and operations.. How does the Stellar network (federation server?) use that info? (ie, is that an automatic behavior, or up to a custom implementation?)
Are there limits to the size / fields allowed in the 'sender_info' object? KYC data is used in the example, but am I correct to assume that could really be anything?