You need to build a service for signature generation.
Here, the Node example is used to show how to generate a valid signature. Please note that the parameters should be obtained in the same way as in the example.
The request method getSign must be POST. The accepted arguments must be of the form body and headers. Method return values must be appKey and sign.
The second parameter of the generateSign signature method must be named expireTime and timestamp.
When you after the success of the service deployment, you may get a url like this: http://localhost:3000/getSign. You can then use the resulting URL for signUrl in Set Up the SDK:
import Chainge from'@chainge/sdk';constconfig= { signUrl:'http://localhost:3000/getSign',// required. expireTime:5000,// optional. The default value is 5000 ms, range 1000 ~ 20000}constchainge=newChainge(config);
If you follow this procedure you get to here. Congratulations, your SDK instance is now available.