openrpc: sync with updated spec

This commit is contained in:
Luke Williams 2019-11-04 12:40:37 +01:00
parent 9320e20489
commit 4753ebd341

View file

@ -115,11 +115,8 @@ const OpenRPCSchema = `
"params": [], "params": [],
"result": { "result": {
"name": "quantity", "name": "quantity",
"description": "number of connected peers.",
"schema": { "schema": {
"title": "numConnectedPeers", "$ref": "#/components/schemas/Integer"
"description": "Hex representation of number of connected peers",
"type": "string"
} }
} }
}, },
@ -142,7 +139,10 @@ const OpenRPCSchema = `
"summary": "Returns the number of most recent block.", "summary": "Returns the number of most recent block.",
"params": [], "params": [],
"result": { "result": {
"$ref": "#/components/contentDescriptors/BlockNumber" "name": "blockNumber",
"schema": {
"$ref": "#/components/schemas/BlockNumber"
}
} }
}, },
{ {
@ -171,7 +171,7 @@ const OpenRPCSchema = `
"params": [], "params": [],
"result": { "result": {
"name": "chainId", "name": "chainId",
"description": "hex format integer of the current chain id. Defaults are ETC=61, ETH=1, Morden=62.", "description": "hex format integer of the current chain id. Defaults are UBQ=8, ETC=61, ETH=1",
"schema": { "schema": {
"title": "chainId", "title": "chainId",
"type": "string", "type": "string",
@ -218,7 +218,7 @@ const OpenRPCSchema = `
}, },
{ {
"name": "eth_getBalance", "name": "eth_getBalance",
"summary": "Returns Ubiq balance of a given or account or contract in wei.", "summary": "Returns the UBQ balance of a given account or contract in wei.",
"params": [ "params": [
{ {
"name": "address", "name": "address",
@ -229,11 +229,7 @@ const OpenRPCSchema = `
} }
}, },
{ {
"name": "blockNumber", "$ref": "#/components/contentDescriptors/BlockNumber"
"description": "A BlockNumber at which to request the balance",
"schema": {
"$ref": "#/components/schemas/BlockNumber"
}
} }
], ],
"result": { "result": {
@ -380,11 +376,7 @@ const OpenRPCSchema = `
} }
}, },
{ {
"name": "blockNumber", "$ref": "#/components/contentDescriptors/BlockNumber"
"description": "A BlockNumber of which the code existed",
"schema": {
"$ref": "#/components/schemas/BlockNumber"
}
} }
], ],
"result": { "result": {
@ -615,15 +607,7 @@ const OpenRPCSchema = `
"result": { "result": {
"name": "transactionCount", "name": "transactionCount",
"schema": { "schema": {
"title": "nonceOrNull", "$ref": "#/components/schemas/Integer"
"oneOf": [
{
"$ref": "#/components/schemas/Nonce"
},
{
"$ref": "#/components/schemas/Null"
}
]
} }
} }
}, },
@ -1202,7 +1186,7 @@ const OpenRPCSchema = `
}, },
"BlockNumberTag": { "BlockNumberTag": {
"type": "string", "type": "string",
"description": "The optional block height description", "description": "The block's height description",
"enum": [ "enum": [
"earliest", "earliest",
"latest", "latest",
@ -1635,7 +1619,7 @@ const OpenRPCSchema = `
"Integer": { "Integer": {
"type": "string", "type": "string",
"pattern": "^0x[a-fA-F0-9]+$", "pattern": "^0x[a-fA-F0-9]+$",
"description": "Hex representation of the integer" "description": "Hex representation of an integer"
}, },
"Address": { "Address": {
"type": "string", "type": "string",
@ -1830,6 +1814,6 @@ const OpenRPCSchema = `
} }
} }
} }
} }
` `