3

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:

  1. sender
  2. needed_info
  3. tx
  4. 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:

  1. sender: This field is part of the /payment request to the Bridge Server
  2. attachment: This field is part of the /payment request to the Bridge Server (extra_memo)
  3. 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:

  1. How does the Bridge Server pass the need_info field?
  2. 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?
  3. Does the Bridge Server handle adding the hash of the attachment to the tx memo by itself before submitting it to Horizon?

1 Answer 1

0

How does the Bridge Server pass the need_info field?

It sends it to POST /send endpoint. The actual value of need_info field goes to attachment.transaction.extra as described in Stellar Attachment Convention and code ([1], [2]).

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?

Bridge doesn't pass signature to Compliance. Compliance server signs a message when Bridge requests POST /send endpoint. It's using keys.signing_seed from the config file.

Does the Bridge Server handle adding the hash of the attachment to the tx memo by itself before submitting it to Horizon?

No, it's done in Compliance server.

1
  • Thanks Bartek! Something to be aware of is that the transaction.extra field is not available in the documentation of the Stellar Attachment Convention. Only transaction.sender_info, transaction.route and transaction.note are there.
    – yulemata
    Commented May 26, 2018 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.