Set up the SDK

After you have installed the SDK, you first need to set it up.

To get started, you have to instantiate and configure the SDK.

import Chainge, {ConfigOptions} from '@chainge/sdk'
const config: ConfigService = {
  appKey: '', // required, your appKey 
  secret: '', // optional, your secret
  signUrl: '', // optional, url of the signature service
}

secret and signUrl are both ways to sign services.

When secret is set, signUrl is ignored and your signature capability is done locally, but this is not secure and is not recommended.

signUrl is the method of your signature service. You can build this service yourself, or use our service by default. This is safer and recommended.

For an example of a signature service, see here.

Next Steps

Check out how to use.

Last updated