subbridge_childOperator
Returns true if adding a mainbridge peer is done successfully.
The childOperator method adds a new remote node to the peer list. The node will try to maintain connectivity to these nodes at all times, reconnecting every once in a while if the remote connection goes down.
The method accepts a single argument, the kni URL of the remote peer to start tracking and returns a BOOL indicating whether the peer was accepted for tracking or some error occurred.
JSONRPC: subbridge_childOperator
Request
- application/json
Body
Default value: subbridge_childOperator
Method name
Default value: 1
Request ID, Random or Auto incrementation
Default value: 2.0
JSON-RPC Version (2.0)
Responses
- 200
true if the peer was accepted, false otherwise.
- application/json
- Schema
- Example (from schema)
Schema
Default value: 2.0
error
object
Child chain operator account address.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": "0x5C1C757a6Cb6c6FcEFE398674D8209FDA2A74Df4"
}
- curl
- python
- nodejs
- java
- CURL
curl -L -X POST 'http://localhost:8551/subbridge/childOperator' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"method": "subbridge_childOperator",
"id": 1,
"jsonrpc": "2.0",
"params": [
null
]
}'