-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from XDagger/feature/rpc
Feature/rpc #13
- Loading branch information
Showing
95 changed files
with
5,595 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# XDAGJ RPC Service Tutorial | ||
|
||
This section describes XDAGJ RPC service. | ||
|
||
- [System environment](#system-environment) | ||
- [Usage](#usage) | ||
|
||
## System environment | ||
|
||
```yaml | ||
JDK : v15 | ||
script : xdag.sh | ||
jar : xdagj-0.x.y-shaded.jar | ||
``` | ||
Please make sure that the above environment is already available in your operating system, and the JDK version must be 15 | ||
## Usage | ||
If you want to open the rpc service,you need to set "isRPCEnabled = true" in your configuration file. | ||
The configuration file is located in `src/main/resources/xdag-XXX.config`, if you do not modify it, the default configuration is disabled. | ||
|
||
- Show XDAG synchronization status | ||
|
||
request | ||
```js | ||
curl http://localhost:4444/ -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"xdag_syncing\",\"params\":[],\"id\":1}" | ||
``` | ||
response | ||
```json | ||
{"jsonrpc":"2.0","id":1,"result":{"currentBlock":"0x30331","highestBlock":"0x30331"}} | ||
``` | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.