Skip to content

Commit

Permalink
openrpc: add admin_addPeer
Browse files Browse the repository at this point in the history
Signed-off-by: meows <b5c6@protonmail.com>
  • Loading branch information
meowsbits committed Mar 12, 2020
1 parent affbfe9 commit 7cbfe11
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
37 changes: 37 additions & 0 deletions openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
}
},
"methods": [
{
"name": "admin_addPeer",
"description": "adds a peer",
"summary": "Adds a peer",
"params": [
{
"$ref": "#/components/contentDescriptors/Enode"
}
],
"result": {
"name": "addPeerResult",
"description": "whether added",
"schema": {
"$ref": "#/components/schemas/Bool"
}
}
},
{
"name": "web3_clientVersion",
"description": "Returns the version of the current client",
Expand Down Expand Up @@ -1579,6 +1596,11 @@
"type": "null",
"description": "Null"
},
"Bool": {
"title": "bool",
"type": "boolean",
"description": "Bool"
},
"Integer": {
"title": "integer",
"type": "string",
Expand Down Expand Up @@ -1615,9 +1637,24 @@
"type": "string",
"description": "Hex representation of a variable length byte array",
"pattern": "^0x([a-fA-F0-9]?)+$"
},
"Enode": {
"title": "enode",
"type": "string",
"description": "ethereum node address",
"pattern": "^enode://"
}
},
"contentDescriptors": {
"Enode": {
"name": "enode",
"summary": "an ethereum node address",
"description": "An enode",
"required": true,
"schema": {
"$ref": "#/components/schemas/Enode"
}
},
"Block": {
"name": "block",
"summary": "A block",
Expand Down
14 changes: 1 addition & 13 deletions openrpc_describe.log
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
{
"jsonrpc": "2.0",
"id": 1584030881,
"id": 1584032672,
"result": {
"Over": [],
"Under": [
{
"Name": "admin_addPeer",
"Fn": "\u003cfunc(*node.PrivateAdminAPI, string) (bool, error) Value\u003e",
"IsSubscribe": false,
"ErrPos": 1,
"Args": [
{
"Name": "string",
"Kind": "string"
}
]
},
{
"Name": "admin_addTrustedPeer",
"Fn": "\u003cfunc(*node.PrivateAdminAPI, string) (bool, error) Value\u003e",
Expand Down
2 changes: 1 addition & 1 deletion openrpc_set.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"jsonrpc":"2.0","id":1584030881,"result":null}
{"jsonrpc":"2.0","id":1584032672,"result":null}

0 comments on commit 7cbfe11

Please sign in to comment.