In my scenario I've setup two FI's.
Setting up sanction callbacks - I created fetch_info, sanctions and ask_user directories inside the compliance folder. I'm assuming the Javascript examples go inside these folders? (yes/no)

1.Does the Go server run these scripts when a request is sent or do I need to setup say a nodejs server as well? 2. In pretending to be the FI, do I ned to setup another DB to deliver the info (name, address, birth etc) back and if so please provide the best method (step by step) to do this.

Many Thanks in advance. also referenced Question about 'extra_memo' field in the Bridge Server for the Compliance Protocol

I don't exactly know what you mean by:

I created fetch_info, sanctions and ask_user directories inside the compliance folder

But the more standard approach would be:

  1. In the compliance configuration (compliance.cfg) file you add the sanctions, ask_user and fetch_info urls under the [callbacks] section

  2. Those url are endpoints of your main api server or a separate server you created for this specific purpose

  3. The compliance server will then make POST requests to those endpoints

Simply stated, you only touch the compliance.cfg configuration file and let the compliance server run. But you need to implement the those callbacks in your own infrastructure

  • Instead of setting up a separate callbacks server I set the urls of the endpoints to the same compliance server .eg compliance.com/askinfo. – Det Sep 5 at 7:12
  • Humm, I don't know if that approach might work, but it seems to me different to what it is explained in the tutorials. – yulemata Sep 6 at 8:14

So, a step by step way of doing this would be:

  1. Download and configure (bridge.cfg) the bridge server. Make sure to add the receive callback as well

  2. Download and configure (compliance.cfg) the compliance server. Add all the urls for fetch_info, ask_user and sanctions callbacks

  3. Implement the bridge receive callback as endpoint in your application server (i.e Node.js). This endpoint will be called by Horizon when your receiving account in the Stellar Network receives a tx. You will use this callback to update your customer account outside the Stellar Network. This because FI have their own legacy infrastructure (with customer databases, sanctions databases, etc), and when joining the stellar network they will, in general, use a single account to receive payments on behalf of their customers.

  4. Implement the compliance callbacks as endpoints in your application server. The compliance server will be making calls to these endpoints to get the information it needs to exchange with the compliance server of the other FI (i.e fetch_info) or to validate if it will accept an incoming payment (i.e sanctions)

  5. Add your compliance server url to the configuration file of the bridge server

  6. Run your bridge, compliance and application server and start receiving and sending payments

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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