Documentation
External Signature

External Signature

If you prefer not to include credentials in method calls within the SDK, you can use our external signing module https://github.com/cedelabs/sign (opens in a new tab). Please provide your GitHub details so we can grant you access.

Thus, the SDK will only require the public API key (and optionally the uid or custom password created for a specific API key), while the private API key remains under your control or your client's control and is never accessed by the SDK. To learn whether the exchange requires a uid or password, please refer to the getSupportedExchanges method.

You can then pass the signer function from this module to the SDK in the following manner:

const cedeSDK = new CedeSDK("REAL", {
  clientId,
  externalSigner: signer,
});
 
const balances = await getBalances({
  exchangeInstanceId,
  auth: {
    exchangeId,
    apiKey: "ec0674c5-8b387adc-8b23abcc", // public api key
    // Secret api key is not required since it's handled by the external signer
  },
});