1

I want to integrate stellar with a Salesforce application. and I am stuck at generating a public key and secret key. I am a little confused regarding SDKs, how can I use an SDK in the apex? Can I store in static resources?

  • I know close to absolutely zero about Salesforce. But from the brief amount I read it sounds like you need to wrap any of the SDKs in a webservice and host it somewhere before you can call into it. Or rewrite the SDK in Apex. My info might be wrong or out of date. – Synesso Apr 21 at 21:32
0

Since there is no existing SDK for Apex, by far the easiest way to get this to work is to use an external service that can create keys and perform the work you want to be triggered by Salesforce via an Apex Callout.

For an example:

  1. Create a web service in Python that uses the Python SDK and exposes an HTTP endpoint called /generate-key that returns a new public and private key in a JSON response.

  2. Make a call from Apex for that, and store those keys where makes sense.

It is noteworthy that storing private keys on SFDC's cloud does mean they'll have access to your account, and it might be better for your web service to handle the Stellar side of things, and just use SFDC for various triggers when it makes sense to do so in order to be more secure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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