Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cherry1603 committed Mar 13, 2023
1 parent 51b86f4 commit 6d83f95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/XDAGJ_RPC.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| Function namE | parameter | example | describe |
| --------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------------------------------------------- |
| Function name | parameter | example | describe |
|-----------------------------------| ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------------------------------------------- |
| **xdag_getBlockByHash** | BlockHash(String) | Req: <br />curl http://127.0.0.1:10001/ -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"xdag_getBlockByHash\",\"params\":[\"K/SSa8tdBR68IPdf7ArdWVNbJonW+kkR\"],\"id\":1}" <br />Resp: <br />{"jsonrpc":"2.0","id":1,"result":{"height":5,"balance":"0.000000000","blockTime":1652541119999,"timeStamp":1692202106879,"state":"Main","hash":"17c7ff3cb08b76b41149fad689265b5359dd0aec5ff720bc1e055dcb6b92f42b","address":"K/SSa8tdBR68IPdf7ArdWVNbJonW+kkR","remark":"XdagJ","diff":"0x227e96893d","type":"Main","flags":"3f","refs":[{"direction":2,"address":"K/SSa8tdBR68IPdf7ArdWVNbJonW+kkR","hashlow":"00000000000000001149fad689265b5359dd0aec5ff720bc1e055dcb6b92f42b","amount":"0.000000000"},{"direction":1,"address":"MzJG2KZdVOM16EmvDTZ8diuDlW0BScOc","hashlow":"00000000000000009cc349016d95832b767c360daf49e835e3545da6d8463233","amount":"0.000000000"}],"transactions":[{"direction":2,"hashlow":"00000000000000001149fad689265b5359dd0aec5ff720bc1e055dcb6b92f42b","address":"K/SSa8tdBR68IPdf7ArdWVNbJonW+kkR","amount":"1024.000000000","time":1652541119999,"remark":"XdagJ"},{"direction":1,"hashlow":"0000000000000000a040e909b697cfa5062a968f8acf9f00bb74520644e37455","address":"VXTjRAZSdLsAn8+Kj5YqBqXPl7YJ6UCg","amount":"1024.000000000","time":1652544234516,"remark":""}]}} | Enter blockhash to return the block information |
| **xdag_getBlockByNumber** | BlockHeight (String) | Req: <br />curl http://127.0.0.1:10001/ -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"xdag_blockNumber\",\"params\":[],\"id\":1}" <br />Resp: <br />{"jsonrpc":"2.0","id":1,"result":{"height":6,"balance":"0.000000000","blockTime":1652541375999,"timeStamp":1692202369023,"state":"Main","hash":"b6d9ae965c74b53ae521e9149fade12d82366ed3b6aed65282100c6e8e59c5d9","address":"2cVZjm4MEIJS1q620242gi3hrZ8U6SHl","remark":"XdagJ","diff":"0x23e5005c0a","type":"Main","flags":"3f","refs":[{"direction":2,"address":"2cVZjm4MEIJS1q620242gi3hrZ8U6SHl","hashlow":"0000000000000000e521e9149fade12d82366ed3b6aed65282100c6e8e59c5d9","amount":"0.000000000"},{"direction":1,"address":"K/SSa8tdBR68IPdf7ArdWVNbJonW+kkR","hashlow":"00000000000000001149fad689265b5359dd0aec5ff720bc1e055dcb6b92f42b","amount":"0.000000000"},{"direction":1,"address":"3asjCLlpKDXzRzHjrS5FjlHJtNkpziLt","hashlow":"0000000000000000ed22ce29d9b4c9518e452eade33147f3352869b90823abdd","amount":"0.000000000"}],"transactions":[{"direction":2,"hashlow":"0000000000000000e521e9149fade12d82366ed3b6aed65282100c6e8e59c5d9","address":"2cVZjm4MEIJS1q620242gi3hrZ8U6SHl","amount":"1024.000000000","time":1652541375999,"remark":"XdagJ"},{"direction":1,"hashlow":"0000000000000000da8fe5e906dd98d34b64fb26139d1b8845acd9b461b2a8e5","address":"5aiyYbTZrEWIG50TJvtkS9OY3Qbp5Y/a","amount":"1024.000000000","time":1652544234518,"remark":""}]}} | Enter block height to return block information |
| **xdag_blockNumber** | Null | Req: <br />curl http://127.0.0.1:10001/ -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"xdag_blockNumber\",\"params\":[],\"id\":1}" <br />Resp: <br />{"jsonrpc":"2.0","id":1,"result":"5"} | Used to return the current main block height |
Expand Down

0 comments on commit 6d83f95

Please sign in to comment.