Basics
Last updated
Last updated
Domain - https://router.chainspot.io/
Test domain - https://testrouter.chainspot.io/
Required headings - {Accepts: application/json, ApiKey: your-api-key}
Before you can use the client API, you need to submit an application to add a client to the system. After registration, the client is provided with the following private data:
Keys | Description |
---|---|
To make a transfer the client should perform 2 actions (call 2 API methods):
Send a request to create a transfer, and receive the data of the created transfer
Initialize the transfer you need to sign, and send the transaction on the side of the Web 3.0 wallet that you use
Transfer initialization request without a private key. At first, it is necessary to sign the received transfer data with the address private key (the logic of data signing is described below)
Transfer initialization request with a private key. You need to encrypt the private key, or use an encrypted private key obtained from support (the second option is less secure, we recommend implementing the algorithm for encrypting the private key yourself, the logic of encryption will be described below)
After successful execution of these methods, the transfer will be initiated, and after that, the amount will be sent to your address in the destination network (execution time depends on many factors, not all of them depend on our service).
After creating a transaction, a method of obtaining the status of the transaction will be available, which can be used to obtain the actual data of the execution of the transfer.
Additional methods are also available:
Method for obtaining a list of supported networks and tokens
Method for obtaining a list of supported token pairs
Important!
If you selected the request for initialization of the transfer without a private key, you need to make sure that after the creation of the transaction and before the initiation of the transfer there should be no new transactions on the address, otherwise, the transfer will not succeed. This is due to the parameter /nonce/, which is needed to sign the transaction.
Api key
The key to access the API of the system, without it API methods will not work. In the header of each request, you need to add the field {
ApiKey:
“your-api-key”}
Encryption key
The key needed to encrypt the private key for its subsequent submission to the system (one of the options for conducting the transfer)