API reference

Available API methods

API endpoint

The signing service is basically a JSON RPC server that is by default available at:

http://localhost:20000/cli

The signing server only supports POSTmethod queries

Request structure

The request sent to the signing server is structured as follows:

{
  qid: "XXX",      // Request ID. The response will echo back the same qid
  method: "XXX",   // Requested method name
  account: "XXX",  // Account for sign
  pwd: "XXX",      // Account password
  params: {}       // Input parameters for the requested method
}

Response structure

The response sent by the signing server has the following structure:

{
  qid: "XXX",         // Request ID
  method: "XXX",      // Requested method name
  result: {           // Response result
    signed_tx: "XXX"  // Signed transaction
  },
  error_code: 0,      // Error code,zero represents success, non-zero represents failure
  error_info: ""      // Error description
}

Error codes

In case an error occurs, the error_code field will contain one of the following error codes:

Please refer to the following links to find the relevant functions:

Last updated