When using the Bridge and Compliance Servers together, it is possible to make a POST/payment request to the Bridge Server adding the extra memo field as part of the request. This would tell the Bridge Server to use the Compliance Server.
Now, in most of the documentation available it is said that the extra_memo field should follow the Stellar Attachment Convention. But, it is not completely clear to me how the rest of the information needed by the Compliance Server is provided by the Bridge Server.
According to the Compliance Protocol, the Compliance Server needs to get a request in the form of data={data value}&sig={signature value}. And data is a block with the following fields:
- sender
- needed_info
- tx
- attachment
So, assuming that a payment request is made via the Bridge Server using the extra_memo field, my assumptions of how the Bridge Server builds the info needed by the Compliance Server are the following:
- sender: This field is part of the /payment request to the Bridge Server
- attachment: This field is part of the /payment request to the Bridge Server (extra_memo)
- tx: This is something that the Bridge Server can build based on the provided info in the request to the /payment endpoint
Now my questions:
- How does the Bridge Server pass the need_info field?
- How does the Bridge Server pass the sig={signature value} field needed as part of the request to the /send endpoint of the Compliance Server?
- Does the Bridge Server handle adding the hash of the attachment to the tx memo by itself before submitting it to Horizon?