The signing service is basically a JSON
RPC
server that is by default available at:
http://localhost:20000/cli
The signing server only supports POST
method queries
The request sent to the signing server is structured as follows:
{qid: "XXX", // Request ID. The response will echo back the same qidmethod: "XXX", // Requested method nameaccount: "XXX", // Account for signpwd: "XXX", // Account passwordparams: {} // Input parameters for the requested method}
The response sent by the signing server has the following structure:
{qid: "XXX", // Request IDmethod: "XXX", // Requested method nameresult: { // Response resultsigned_tx: "XXX" // Signed transaction},error_code: 0, // Error codeļ¼zero represents success, non-zero represents failureerror_info: "" // Error description}
In case an error occurs, the error_code
field will contain one of the following error codes:
Error code | Error description |
1001 | Invalid |
1002 | Invalid |
1003 | Invalid request parameter |
1004 | Unsupported method |
1005 | Account is locked |
1006 | Invalid transactions |
1007 |
|
1008 |
|
9999 | Unknown error |
Please refer to the following links to find the relevant functions:
Library | Link |
Account information | āhttps://dev-docs.ont.io/#/docs-en/SignServer/04-api-account-methodsā |
Signing methods | āhttps://dev-docs.ont.io/#/docs-en/SignServer/05-api-signing-methodsā |
Convenience methods | āhttps://dev-docs.ont.io/#/docs-en/SignServer/06-api-signing-convinience-methodsā |