This document highlights all the details regarding ela json rpc interfaces. It follows json-rpc 2.0 protocol but also remains compatible with version 1.0. This that means both named and positional params are acceptable.
"id" is optional, which will be sent back in the result samely if you add it in a request - it's needed when you want to distinguish between different requests.
"jsonrpc" is optional and tells which version this request uses. In version 2.0, it's required, while in version 1.0, it doesn't exist.
getbestblockhash
Return the hash of the most recent block
result:
Example
Request:
Copy {
"jsonrpc": "2.0",
"method":"getbestblockhash",
"params": [],
"id": 1
}
Response:
Copy {
"id": 1,
"jsonrpc": "2.0",
"result": "68692d63a8bfc8887553b97f99f09e523d34a2b599bf5b388436b2ddc85ed76e",
"error": null
}
getblockhash
Return the hash of the specific blockchain height.
Parameter
Result
Example
Request:
Copy {
"method" : "getblockhash" ,
"params" :{ "height" : 1 }
}
Response:
Copy {
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : "3893390c9fe372eab5b356a02c54d3baa41fc48918bbddfbac78cf48564d9d72" ,
"error" : null
}
getblock
Return the block information of the specific blockchain hash.
Parameter
Example
Request:
Copy {
"method":"getblock",
"params":{
"blockhash":"f3a7469bb59452ab665f8b8870e1fb30e6a7181e2ea70f377e218d5b13cfa8ed",
"verbosity": 0},
}
Response when verbosity is 0:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result": "00000000c0433b918f500392869aa14cf7a909430fd94502b5c9f05421c9da7519bd6a65219184ea3c0a2973b90b8402c8405b76d7fbe10a268f6de7e4f48e93f5d03df7c31e095bffff7f2000000000d107000001000000010000000000000000000000000000000000000000000000000000000000000000000000002cfabe6d6d3ca6bcc86bada4642fea709731f1653bd34b28ab15b790e102e14e0d7bd138d80100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff7f00000000000000000000000000000000000000000000000000000000000000000ce39baabcdbb4adce38c5f23314c5f63a536bbcc8f0a47c7054c36ca27f5acd771d095b00000000020000000101000000000403454c4101000846444170b0e427d2010000000000000000000000000000000000000000000000000000000000000000ffffffffffff02b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a31b2913000000000000000000129e9cf1c5f336fcf3a6c954444ed482c5d916e506b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a341b52c000000000000000000219e9cc4320c3018ced30242b25c03e13a1b2f57c7d107000000"
}
Response when verbosity is 1:
Copy {
"id" : null ,
"error" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"hash" : "3893390c9fe372eab5b356a02c54d3baa41fc48918bbddfbac78cf48564d9d72" ,
"confirmations" : 5156 ,
"strippedsize" : 498 ,
"size" : 498 ,
"weight" : 1992 ,
"height" : 1 ,
"version" : 0 ,
"versionhex" : "00000000" ,
"merkleroot" : "764691821f937fd566bcf533611a5e5b193008ea1ba1396f67b7b0da22717c02" ,
"tx" : [
"764691821f937fd566bcf533611a5e5b193008ea1ba1396f67b7b0da22717c02"
] ,
"time" : 1524737598 ,
"mediantime" : 1524737598 ,
"nonce" : 0 ,
"bits" : 545259519 ,
"difficulty" : "1" ,
"chainwork" : "00001423" ,
"previousblockhash" : "8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405" ,
"nextblockhash" : "aa98305779686e66294a9b667e6ac77f5231bb2ce09fe7d9ca641775413ecb5a" ,
"auxpow": "01000000010000000000000000000000000000000000000000000000000000000000000000000000002cfabe6d6d3893390c9fe372eab5b356a02c54d3baa41fc48918bbddfbac78cf48564d9d720100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0000000000000000000000000000000000000000000000000000000000000000a19035123a440356c0a41a85fe26865620fb4c34dcf1b83b46b5e11efcbbdd893ea6e15a0000000000000000"
}
}
Response when verbosity is 2:
result format except 'tx' is the same as it is when verbosity=1
result format in 'tx' please see interface 'getrawtransaction'
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"hash" : "3ca6bcc86bada4642fea709731f1653bd34b28ab15b790e102e14e0d7bd138d8" ,
"confirmations" : 1 ,
"strippedsize" : 498 ,
"size" : 498 ,
"weight" : 1992 ,
"height" : 2001 ,
"version" : 0 ,
"versionhex" : "00000000" ,
"merkleroot" : "219184ea3c0a2973b90b8402c8405b76d7fbe10a268f6de7e4f48e93f5d03df7" ,
"tx" : [
{
"txid" : "219184ea3c0a2973b90b8402c8405b76d7fbe10a268f6de7e4f48e93f5d03df7" ,
"hash" : "219184ea3c0a2973b90b8402c8405b76d7fbe10a268f6de7e4f48e93f5d03df7" ,
"size" : 192 ,
"vsize" : 192 ,
"version" : 0 ,
"locktime" : 2001 ,
"vin" : [
{
"txid" : "0000000000000000000000000000000000000000000000000000000000000000" ,
"vout" : 65535 ,
"sequence" : 4294967295
}
] ,
"vout" : [
{
"value" : "0.01255707" ,
"n" : 0 ,
"address" : "8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta" ,
"assetid" : "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3" ,
"outputlock" : 0
} ,
{
"value" : "0.02929985" ,
"n" : 1 ,
"address" : "EXca4DJwqCXa6vbJmpovwatHiP8HRTVS1Z" ,
"assetid" : "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3" ,
"outputlock" : 0
}
] ,
"blockhash" : "3ca6bcc86bada4642fea709731f1653bd34b28ab15b790e102e14e0d7bd138d8" ,
"confirmations" : 1 ,
"time" : 1527324355 ,
"blocktime" : 1527324355 ,
"type" : 0 ,
"payloadversion" : 4 ,
"payload" : {
"CoinbaseData" : "ELA"
} ,
"attributes" : [
{
"usage" : 0 ,
"data" : "46444170b0e427d2"
}
] ,
"programs" : []
}
] ,
"time" : 1527324355 ,
"mediantime" : 1527324355 ,
"nonce" : 0 ,
"bits" : 545259519 ,
"difficulty" : "1" ,
"chainwork" : "00000000" ,
"previousblockhash" : "c0433b918f500392869aa14cf7a909430fd94502b5c9f05421c9da7519bd6a65" ,
"nextblockhash" : "0000000000000000000000000000000000000000000000000000000000000000" ,
"auxpow": "01000000010000000000000000000000000000000000000000000000000000000000000000000000002cfabe6d6d3ca6bcc86bada4642fea709731f1653bd34b28ab15b790e102e14e0d7bd138d80100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff7f00000000000000000000000000000000000000000000000000000000000000000ce39baabcdbb4adce38c5f23314c5f63a536bbcc8f0a47c7054c36ca27f5acd771d095b0000000002000000"
}
}
getblockcount
Get block count
Example
Request:
Copy {
"method" : "getblockcount"
}
Response:
Copy {
"jsonrpc" : "2.0" ,
"id" : null ,
"error" : null ,
"result" : 171454
}
getrawtransaction
Get transaction information of the given transaction hash.
Parameter
Results
Example
Request:
Copy {
"method" : "getrawtransaction" ,
"params" : [ "caa0d52ea2b90a08480834b97c271a8b847aadf90057318a33ccc8674b77c796" ]
}
Response when verbosity is ture:
Copy {
"id" : null ,
"error" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"txid" : "6864bbf52a3e140d40f1d707bae31d006265efc54dcb58e34037645060ce3e16" ,
"hash" : "6864bbf52a3e140d40f1d707bae31d006265efc54dcb58e34037645060ce3e16" ,
"size" : 192 ,
"vsize" : 192 ,
"version" : 0 ,
"locktime" : 1000 ,
"vin" : [
{
"txid" : "0000000000000000000000000000000000000000000000000000000000000000" ,
"vout" : 65535 ,
"sequence" : 4294967295
}
] ,
"vout" : [
{
"value" : "0.01255707" ,
"n" : 0 ,
"address" : "8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta" ,
"assetid" : "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3" ,
"outputlock" : 0
} ,
{
"value" : "0.02929985" ,
"n" : 1 ,
"address" : "ENTogr92671PKrMmtWo3RLiYXfBTXUe13Z" ,
"assetid" : "b037db964a231458d2d6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a3" ,
"outputlock" : 0
}
] ,
"blockhash" : "0000000000000000000000000000000000000000000000000000000000000000" ,
"confirmations" : 4158 ,
"time" : 1524737766 ,
"blocktime" : 1524737766 ,
"type" : 0 ,
"payloadversion" : 4 ,
"payload" : {
"CoinbaseData" : "ELA"
} ,
"attributes" : [
{
"usage" : 0 ,
"data" : "b52165c186769037"
}
] ,
"programs" : []
}
}
Response when verbosity is false:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result": "000403454c4101000846444170b0e427d2010000000000000000000000000000000000000000000000000000000000000000ffffffffffff02b037db964a231458d2d 6ffd5ea18944c4f90e63d547c5d3b9874df66a4ead0a31b2913000000000000000000129e9cf1c5f336fcf3a6c954444ed482c5d916e506b037db964a231458d2d6ffd 5ea18944c4f90e63d547c5d3b9874df66a4ead0a341b52c000000000000000000219e9cc4320c3018ced30242b25c03e13a1b2f57c7d107000000"
}
getrawmempool
Return hashes of transactions in the memory pool.
Example
Request:
Copy {
"method" : "getrawmempool"
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result":["5da460632a154fe75df0d5ec98560e4bc1115374a37a75e984a534f8da3ca941", "5da460632a154fe75df0d5ec98560e4bc1115374a37a75e984a534f8da3ca941"]
}
Request:
Copy {
"method" : "getrawmempool" ,
"params" :{
"state" : "all"
}
}
Response:
Copy {
"jsonrpc" : "2.0" ,
"result" : [
{
"txid" : "7bc35c1bb5d21c74cb94b73e2774c1be77a460b7ba1a5d8e73baa1721bb8c98d" ,
"hash" : "7bc35c1bb5d21c74cb94b73e2774c1be77a460b7ba1a5d8e73baa1721bb8c98d" ,
"size" : 369 ,
"vsize" : 369 ,
"version" : 0 ,
"type" : 5 ,
"payloadversion" : 0 ,
"payload" : {
"blockheight" : 366174 ,
"sideblockhash" : "50e95c5452808282249827971def9b6d01a83a62251aada221b20ea66755f44b" ,
"sidegenesishash" : "a3c455a90843db2acd22554f2768a8d4233fafbf8dd549e6b261c2786993be56" ,
"signature": "fdcb69746140a2c9b42c91642e5f887c7859c3709c189a83ed09ac2305d524d66e3b77dff3e9c070323d312afb8efedc60ce41c12e6684e0db5088bad1683a92"
} ,
"attributes" : [
{
"usage" : 0 ,
"data" : "38303631373539313233303934363232343938"
}
] ,
"vin" : [
{
"txid" : "754552520bbc5241fe5e59aae333a7e72d65c1d4ecec3a123cab3c773186a6b2" ,
"vout" : 0 ,
"sequence" : 0
}
] ,
"vout" : [
{
"value" : "0.00300000" ,
"n" : 0 ,
"address" : "EfJDXdRiPk8aiSFwQ4Wf6BCddxgLS4o5hG" ,
"assetid" : "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0" ,
"outputlock" : 0 ,
"type" : 0 ,
"payload" : null
}
] ,
"locktime" : 688434 ,
"programs" : [
{
"code" : "21036eac18a8fe9722f5afee095334b3970496a92024f832530a51f6f1faba36a881ac" ,
"parameter": "407943915fb2d4938479757dea9cd75e957a9bfe9b45fd973139dd101e1ce4cba3520360ecb2a5da90652fbe05682bb6c7548075225effc87aadc272c27eddcc83"
}
] ,
"blockhash" : "" ,
"confirmations" : 0 ,
"time" : 0 ,
"blocktime" : 0
}
] ,
"id" : null ,
"error" : null
}
getreceivedbyaddress
Get the balance of an address
Parameter
Example
Request:
Copy {
"method" : "getreceivedbyaddress" ,
"params" :{ "address" : "8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta" }
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : "33000000"
}
listunspent
List all utxo of given addresses
Parameter
If not set, utxotype will use "mixed" as default value. If you set utxotype to "mixed" or not set will get all utxos ignore the type if set utxotype to "vote" will get vote utxos if set utxotype to "normal" will get normal utxos without vote
Example
Request:
Copy {
"method" : "listunspent" ,
"params" :{ "addresses" : [ "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3" , "EeEkSiRMZqg5rd9a2yPaWnvdPcikFtsrjE" ]}
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : [
{
"assetid" : "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0" ,
"txid" : "9132cf82a18d859d200c952aec548d7895e7b654fd1761d5d059b91edbad1768" ,
"vout" : 0 ,
"address" : "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3" ,
"amount" : "33000000" ,
"confirmations" : 1102 ,
"outputlock" : 0
} ,
{
"assetid" : "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0" ,
"txid" : "3edbcc839fd4f16c0b70869f2d477b56a006d31dc7a10d8cb49bd12628d6352e" ,
"vout" : 0 ,
"address" : "8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3" ,
"amount" : "0.01255707" ,
"confirmations" : 846 ,
"outputlock" : 0
}
]
}
setloglevel
Set log level
Parameter
Example
Request:
Copy {
"method" : "setloglevel" ,
"params" : {
"level" : 0
}
}
Response:
Copy {
"id" : null ,
"jsonrpc" : "2.0" ,
"error" : null ,
"result" : "log level has been set to 0"
}
getconnectioncount
Get peer's count of this node
Example
Request:
Copy {
"method" : "getconnectioncount"
}
Response:
Copy {
"id" : null ,
"error" : null ,
"jsonrpc" : "2.0" ,
"result" : 0
}
getneighbors
Get peer's info
Example
Request:
Copy {
"method" : "getneighbors"
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : [
"127.0.0.1:64890 (inbound)" ,
"127.0.0.1:64880 (inbound)" ,
"127.0.0.1:64822 (inbound)" ,
"127.0.0.1:22338 (outbound)" ,
"127.0.0.1:23338 (outbound)" ,
"127.0.0.1:24338 (outbound)"
]
}
getnodestate
Get node state
Result
neighbor:
Example
Request:
Copy {
"method" : "getnodestate"
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"compile" : "v0.2.2-231-g75d2-dirty" ,
"height" : 0 ,
"version" : 20000 ,
"services" : "SFNodeNetwork|SFTxFiltering|SFNodeBloom" ,
"port" : 21338 ,
"rpcport" : 21336 ,
"restport" : 21334 ,
"wsport" : 21335 ,
"neighbors" : [
{
"netaddress" : "127.0.0.1:57656" ,
"services" : "SFNodeNetwork|SFTxFiltering|SFNodeBloom" ,
"relaytx" : false ,
"lastsend" : "2019-03-06 14:52:03 +0800 CST" ,
"lastrecv" : "2019-03-06 14:52:18 +0800 CST" ,
"conntime" : "2019-03-06 14:51:33.65298 +0800 CST m=+36.604516146" ,
"timeoffset" : 0 ,
"version" : 20000 ,
"inbound" : true ,
"startingheight" : 0 ,
"lastblock" : 0 ,
"lastpingtime" : "2019-03-06 14:52:03.658121 +0800 CST m=+66.609840707" ,
"lastpingmicros" : 1033
} ,
{
"netaddress" : "127.0.0.1:22338" ,
"services" : "SFNodeNetwork|SFTxFiltering|SFNodeBloom" ,
"relaytx" : false ,
"lastsend" : "2019-03-06 14:52:02 +0800 CST" ,
"lastrecv" : "2019-03-06 14:52:02 +0800 CST" ,
"conntime" : "2019-03-06 14:51:02.097149 +0800 CST m=+5.048492921" ,
"timeoffset" : 0 ,
"version" : 20000 ,
"inbound" : false ,
"startingheight" : 0 ,
"lastblock" : 0 ,
"lastpingtime" : "2019-03-06 14:52:02.104806 +0800 CST m=+65.056516088" ,
"lastpingmicros" : 541
}
]
}
}
sendrawtransaction
Send a raw transaction to node
Parameter
Result
Example
Request:
Copy {
"method" : "sendrawtransaction" ,
"params" : [ "xxxxxx" ]
}
Response:
Copy {
"result" : "764691821f937fd566bcf533611a5e5b193008ea1ba1396f67b7b0da22717c02" ,
"id" : null ,
"jsonrpc" : "2.0" ,
"error" : null
}
togglemining
The switch of mining
Parameter
Example
Request:
Copy {
"method" : "togglemining" ,
"params" :{ "mining" : false }
}
Response:
Copy {
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : "mining stopped" ,
"error" : null
}
discretemining
Generate one or more blocks instantly
Parameter
Example
Request:
Copy {
"method" : "discretemining" ,
"params" :{ "count" : 1 }
}
Response:
Copy {
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : [
"741d8131f0eea94c1c72c8bb1f0e9051a0a98441e131585bf5bf01868bf0ef46"
] ,
"error" : null
}
getmininginfo
Returns a json object containing mining-related information
Result
Example
Request:
Copy {
"method" : "getmininginfo" ,
"params" :{}
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"blocks" : 397720 ,
"currentblocktx" : 7 ,
"difficulty" : "1553768014955882" ,
"networkhashps" : "27618978773646499814" ,
"pooledtx" : 0 ,
"chain" : "mainnet"
}
}
createauxblock
Generate an auxiliary block
Parameter
Example
Request:
named arguments:
Copy {
"method" : "createauxblock" ,
"params" :{ "paytoaddress" : "Ef4UcaHwvFrFzzsyVf5YH4JBWgYgUqfTAB" }
}
positional arguments:
Copy {
"method" : "createauxblock" ,
"params" : [ "Ef4UcaHwvFrFzzsyVf5YH4JBWgYgUqfTAB" ]
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"chainid" : 1224 ,
"height" : 152789 ,
"coinbasevalue" : 175799086 ,
"bits" : "1d36c855" ,
"hash" : "e28a262b38316fddefb0b5c753f7cc0022afe94e95f881576ad6b8f33f4e49fe" ,
"previousblockhash" : "f297d03791f4cf2c6ef093b02a77465ea876b040b7772e56b8e140f3bff73871"
}
}
submitauxblock
Submit the solved auxpow of an auxiliary block
Parameter
Example
Request:
named arguments sample:
Copy {
"method" : "submitauxblock" ,
"params" :{
"blockhash" : "7926398947f332fe534b15c628ff0cd9dc6f7d3ea59c74801dc758ac65428e64" ,
"auxpow": "02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b0313ee0904a880495b742f4254432e434f4d2ffabe6d6d9581ba0156314f1e92fd03430c6e4428a32bb3f1b9dc627102498e5cfbf26261020000004204cb9a010f32a00601000000000000ffffffff0200000000000000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90000000014acac4ee8fdd8ca7e0b587b35fce8c996c70aefdf24c333038bdba7af531266000000000001ccc205f0e1cb435f50cc2f63edd53186b414fcb22b719da8c59eab066cf30bdb0000000000000020d1061d1e456cae488c063838b64c4911ce256549afadfc6a4736643359141b01551e4d94f9e8b6b03eec92bb6de1e478a0e913e5f733f5884857a7c2b965f53ca880495bffff7f20a880495b"
}
}
positional arguments sample:
Copy {
"method" : "submitauxblock" ,
"params" :[
"7926398947f332fe534b15c628ff0cd9dc6f7d3ea59c74801dc758ac65428e64" ,
"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b0313ee0904a880495b742f4254432e434f4d2ffabe6d6d9581ba0156314f1e92fd03430c6e4428a32bb3f1b9dc627102498e5cfbf26261020000004204cb9a010f32a00601000000000000ffffffff0200000000000000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90000000014acac4ee8fdd8ca7e0b587b35fce8c996c70aefdf24c333038bdba7af531266000000000001ccc205f0e1cb435f50cc2f63edd53186b414fcb22b719da8c59eab066cf30bdb0000000000000020d1061d1e456cae488c063838b64c4911ce256549afadfc6a4736643359141b01551e4d94f9e8b6b03eec92bb6de1e478a0e913e5f733f5884857a7c2b965f53ca880495bffff7f20a880495b"
]
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : true
}
getinfo
Return node information. Warning: this interface is ready to be deprecated, so no api information will be supplied.
listproducers
Show producers information
Parameter
"active": get producers in the active state
"inactive": get producers in the inactive state
"canceled": get producers in the canceled state
"illegal": get producers in the illegal state
"returned": get producers in the returned state | if state flag not provided return the producers in pending and active state.
Result
Example
Request:
Copy {
"method" : "listproducers" ,
"params" :{
"start" : 0 ,
"limit" : 3
}
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"producers" : [
{
"ownerpublickey" : "0237a5fb316caf7587e052125585b135361be533d74b5a094a68c64c47ccd1e1eb" ,
"nodepublickey" : "0237a5fb316caf7587e052125585b135361be533d74b5a094a68c64c47ccd1e1eb" ,
"nickname" : "elastos1" ,
"url" : "http://www.elastos1.com" ,
"location" : 401 ,
"active" : true ,
"votes" : "3.11100000" ,
"state" : "Active" ,
"registerheight" : 236 ,
"cancelheight" : 0 ,
"inactiveheight" : 0 ,
"illegalheight" : 0 ,
"index" : 0
} ,
{
"ownerpublickey" : "030a26f8b4ab0ea219eb461d1e454ce5f0bd0d289a6a64ffc0743dab7bd5be0be9" ,
"nodepublickey" : "030a26f8b4ab0ea219eb461d1e454ce5f0bd0d289a6a64ffc0743dab7bd5be0be9" ,
"nickname" : "elastos2" ,
"url" : "http://www.elastos2.com" ,
"location" : 402 ,
"active" : true ,
"votes" : "2.10000000" ,
"state" : "Active" ,
"registerheight" : 225 ,
"cancelheight" : 0 ,
"inactiveheight" : 0 ,
"illegalheight" : 0 ,
"index" : 1
} ,
{
"ownerpublickey" : "0288e79636e41edce04d4fa95d8f62fed73a76164f8631ccc42f5425f960e4a0c7" ,
"nodepublickey" : "0288e79636e41edce04d4fa95d8f62fed73a76164f8631ccc42f5425f960e4a0c7" ,
"nickname" : "elastos3" ,
"url" : "http://www.elastos3.com" ,
"location" : 403 ,
"active" : true ,
"votes" : "0" ,
"state" : "Active" ,
"registerheight" : 216 ,
"cancelheight" : 0 ,
"inactiveheight" : 0 ,
"illegalheight" : 0 ,
"index" : 2
}
] ,
"totalvotes" : "5.21100000" ,
"totalcounts" : 10
}
}
producerstatus
Show producer status
Parameter
Result
0: producer has not registered; 1: producer has confirmed (6 confirms); 2: producer registered but not confirmed (less than 6 confirms)
Example
Request:
Copy {
"method" : "producerstatus" ,
"params" :{
"publickey" : "0237a5fb316caf7587e052125585b135361be533d74b5a094a68c64c47ccd1e1eb"
}
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : 1
}
votestatus
Show producer vote status
Parameter
Result
Note: If the EnableUtxoDB configuration entry is true, then the total field is computed; otherwise the total field returns -1
Example
Request:
Copy {
"method" : "votestatus" ,
"params" :{
"address" : "EZwPHEMQLNBpP2VStF3gRk8EVoMM2i3hda"
}
}
Response:
Copy {
"error" : null ,
"id" : null ,
"jsonrpc" : "2.0" ,
"result" : {
"total" : "4.66088900" ,
"voting" : "0" ,
"pending" : true
}
}
estimatesmartfee
Estimate the transaction fee smartly.
Parameter
Result
Example
Request:
Copy {
"method": "estimatesmartfee",
"params":{
"confirmations": 5
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": 10000
}
getdepositcoin
Get deposit coin by owner public key.
Parameter
Result
Example
Request:
Copy {
"method": "getdepositcoin",
"params":{
"ownerpublickey": "024babfecea0300971a6f0ad13b27519faff0ef595faf9490dc1f5f4d6e6d7f3fb"
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": {
"available": "1",
"deducted": "0",
"deposit": "3",
"assets": "4"
}
}
getcrdepositcoin
Get deposit coin by owner public key, or cid/did.
Parameter
Result
Example
Request:
Copy {
"method": "getcrdepositcoin",
"params":{
"id": "iUzjmMPTYZq2afqtR46coY6B7h2qD1PQbyq"
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": {
"available": "1",
"deducted": "0",
"deposit": "3",
"assets": "4"
}
}
getarbiterpeersinfo
Get dpos peers information.
Result
Example
Request:
Copy {
"method": "getarbiterpeersinfo"
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": [
{
"ownerpublickey": "0243ff13f1417c69686bfefc35227ad4f5f4ca03ccb3d3a635ae8ed67d57c20b97",
"nodepublickey": "0243ff13f1417c69686bfefc35227ad4f5f4ca03ccb3d3a635ae8ed67d57c20b97",
"ip": "127.0.0.1:22339",
"connstate": "2WayConnection"
},
{
"ownerpublickey": "024ac1cdf73e3cbe88843b2d7279e6afdc26fc71d221f28cfbecbefb2a48d48304",
"nodepublickey": "0393e823c2087ed30871cbea9fa5121fa932550821e9f3b17acef0e581971efab0",
"ip": "127.0.0.1:23339",
"connstate": "InboundOnly"
},
{
"ownerpublickey": "0274fe9f165574791f74d5c4358415596e408b704be9003f51a25e90fd527660b5",
"nodepublickey": "03e281f89d85b3a7de177c240c4961cb5b1f2106f09daa42d15874a38bbeae85dd",
"ip": "127.0.0.1:24339",
"connstate": "NoneConnection"
}
]
}
submitsidechainillegaldata
Submit illegal data from side chain.
Parameter
Example
Request:
Copy {
"method":"submitsidechainillegaldata",
"params":{
"illegaldata": "016400000021023a133480176214f88848c6eaa684a54b316849df2b8570b57f3a917f19bbc77a52fdfc072182654f163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c64981855ad8681d0d86d1e91e00167939cb6694d2c422acd208a0072939487f699940353662653933363937386332363162326536343964353864626661663366323364346138363832373466353532326364326164623433303861393535633461330221030a26f8b4ab0ea219eb461d1e454ce5f0bd0d289a6a64ffc0743dab7bd5be0be9210288e79636e41edce04d4fa95d8f62fed73a76164f8631ccc42f5425f960e4a0c7"
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": true
}
getconfirmbyheight
Get block confirm by height of block.
Parameter
Result
Example
Request:
Copy {
"method":"getconfirmbyheight",
"params":{
"height": 300000,
"verbosity": 1
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": {
"blockhash": "65fd07f4069a1ca6833d38e0baa9b0b4a9bac35131feb5c363bd2fb99f8d06d8",
"sponsor": "024ac1cdf73e3cbe88843b2d7279e6afdc26fc71d221f28cfbecbefb2a48d48304",
"viewoffset": 0,
"votes": [
{
"signer": "024babfecea0300971a6f0ad13b27519faff0ef595faf9490dc1f5f4d6e6d7f3fb",
"accept": true
},
{
"signer": "024ac1cdf73e3cbe88843b2d7279e6afdc26fc71d221f28cfbecbefb2a48d48304",
"accept": true
},
{
"signer": "0274fe9f165574791f74d5c4358415596e408b704be9003f51a25e90fd527660b5",
"accept": true
}
]
}
}
getconfirmbyhash
Get block confirm by hash of block.
Parameter
Result
Example
Request:
Copy {
"method":"getconfirmbyhash",
"params":{
"blockhash": "65fd07f4069a1ca6833d38e0baa9b0b4a9bac35131feb5c363bd2fb99f8d06d8",
"verbosity": 1
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": {
"blockhash": "65fd07f4069a1ca6833d38e0baa9b0b4a9bac35131feb5c363bd2fb99f8d06d8",
"sponsor": "024ac1cdf73e3cbe88843b2d7279e6afdc26fc71d221f28cfbecbefb2a48d48304",
"viewoffset": 0,
"votes": [
{
"signer": "024babfecea0300971a6f0ad13b27519faff0ef595faf9490dc1f5f4d6e6d7f3fb",
"accept": true
},
{
"signer": "024ac1cdf73e3cbe88843b2d7279e6afdc26fc71d221f28cfbecbefb2a48d48304",
"accept": true
},
{
"signer": "0274fe9f165574791f74d5c4358415596e408b704be9003f51a25e90fd527660b5",
"accept": true
}
]
}
}
getarbitersinfo
Get arbiters and candidates about current and next turns.
Result
Example
Request:
Copy {
"method": "getarbitersinfo"
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": {
"arbiters": [
"0247984879d35fe662d6dddb4edf111c9f64fde18ccf8af0a51e4b278c3411a8f2",
"032e583b6b578cccb9bbe4a53ab54a3e3e60156c01973b16af52b614813fca1bb2",
"0223b8e8098dd694f4d20ea74800b1260a5a4a0afe7f6a0043c7e459c84ff80fba",
"03982eaa9744a3777860013b6b988dc5250198cb81b3aea157f9b429206e3ae80f",
"0328443c1e4bdb5b60ec1d017056f314ba31f8f9f43806128fac20499a9df27bc2"
],
"candidates": [],
"nextarbiters": [
"0247984879d35fe662d6dddb4edf111c9f64fde18ccf8af0a51e4b278c3411a8f2",
"032e583b6b578cccb9bbe4a53ab54a3e3e60156c01973b16af52b614813fca1bb2",
"0223b8e8098dd694f4d20ea74800b1260a5a4a0afe7f6a0043c7e459c84ff80fba",
"03982eaa9744a3777860013b6b988dc5250198cb81b3aea157f9b429206e3ae80f",
"0328443c1e4bdb5b60ec1d017056f314ba31f8f9f43806128fac20499a9df27bc2"
],
"nextcandidates": [],
"ondutyarbiter": "03982eaa9744a3777860013b6b988dc5250198cb81b3aea157f9b429206e3ae80f",
"currentturnstartheight": 200,
"nextturnstartheight": 212
}
}
getutxosbyamount
Get utxo by a given amount - amount of utxo >= given amount.
Parameter
if not set utxotype will use "mixed" as default value if set utxotype to "mixed" or not set will get all utxos ignore the type if set utxotype to "vote" will get vote utxos if set utxotype to "normal" will get normal utxos without vote if set utxotype to "unused" will get all utxos that are not in tx pool
Example
Request:
Copy {
"method":"getutxosbyamount",
"params":{
"address": "XKUh4GLhFJiqAMTF6HyWQrV9pK9HcGUdfJ",
"amount": "0.25"
}
}
Response:
Copy {
"error": null,
"id": null,
"jsonrpc": "2.0",
"result": [
{
"assetid": "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0",
"txid": "9132cf82a18d859d200c952aec548d7895e7b654fd1761d5d059b91edbad1768",
"vout": 0,
"address": "XKUh4GLhFJiqAMTF6HyWQrV9pK9HcGUdfJ",
"amount": "0.1",
"confirmations": 1102,
"outputlock": 0
},
{
"assetid": "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0",
"txid": "3edbcc839fd4f16c0b70869f2d477b56a006d31dc7a10d8cb49bd12628d6352e",
"vout": 0,
"address": "XKUh4GLhFJiqAMTF6HyWQrV9pK9HcGUdfJ",
"amount": "0.2",
"confirmations": 846,
"outputlock": 0
}
]
}
getamountbyinputs
Get amount of given inputs.
Parameter