On this page

latest contributor to this doc

Last Edit:

@gcharang

Send Asked Data

API-v2send_asked_data

The send_asked_data method is a utility RPC used mainly by front-end or plugin components to reply to an earlier ask_for_data request emitted by the node.
When another part of the system (for example, a GUI) needs some data, it calls ask_for_data which broadcasts an internal DataNeeded event with a data_id.
Your component then gathers the requested information and posts it back via send_asked_data.

This RPC is part of the low-level event-bus mechanism and is not used in typical wallet or swap flows. It requires the data_id received from a DataNeeded event.

Parameter* = requiredTypeDescription
data*
object
Arbitrary JSON value satisfying the original request.
data_id*
integer
Identifier supplied by the original DataNeeded event.

Parameter* = requiredTypeDescription
result*
boolean
true on success.

Send Asked Data

POST
send_asked_data
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "send_asked_data",
  "id": 0,
  "params": {
    "data_id": 42,
    "data": {
      "name": "Komodo"
    }
  }
}
{
  "mmrpc": "2.0",
  "result": true,
  "id": 0
}

Parameter* = requiredTypeDescription
Internal
string
Optional. Internal error while delivering data (rare).
NotFound
integer
Optional. No awaiting ask_for_data with the specified data_id.