forked from Qitmeer/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Qitmeer/docs
- Loading branch information
Showing
98 changed files
with
4,078 additions
and
1,095 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,31 @@ | ||
name: github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.74.3' | ||
|
||
- name: Build | ||
run: | | ||
cd Document | ||
hugo | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./Document/public |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Document/public/ | ||
.DS_Store | ||
.* |
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,30 @@ | ||
--- | ||
title: Qitmeer JSON RPC 说明 | ||
weight: 5 | ||
--- | ||
|
||
### Qitmeer JSON RPC 命令列表 | ||
|
||
- [getBlockByOrder](getblockbyorder) | ||
- [getBlockByNum](getblockbynum) | ||
- [getBlock](getblock) | ||
- [getBlockV2](getblockv2) | ||
- [getBlockHeader](getblockheader) | ||
- [getBlockCount](#getblockcount) | ||
- [getBlockTotal](#getblocktotal) | ||
- [getBlockBestHash](#getblockbesthash) | ||
- [getBlockhashByRange](#getblockhashbyrange) | ||
- [isOnMainChain](#isonmainchain) | ||
- [getMainChainHeight](#getmainchainheight) | ||
- [getOrphansTotal](#getorphanstotal) | ||
- [getTips](#gettips) | ||
- [getMempool](#getmempool) | ||
- [getPeerInfo](#getpeerinfo) | ||
- [getNodeInfo](#getnodeinfo) | ||
- [isBlue](#isblue) | ||
- [getFees](#getfees) | ||
- [getRawTransaction](#getrawtransaction) | ||
- [sendRawTransaction](#sendrawtransaction) | ||
|
||
|
||
|
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,54 @@ | ||
--- | ||
title: Qitmeer JSON RPC | ||
weight: 5 | ||
--- | ||
|
||
### JSON-RPC API Reference | ||
|
||
#### Block | ||
- [getBestBlockHash](getbestblockhash) | ||
- [getBlock](getblock) | ||
- [getBlockByNum](getblockbynum) | ||
- [getBlockByOrder](getblockbyorder) | ||
- [getBlockCount](getblockcount) | ||
- [getBlockhash](getblockhash) | ||
- [getBlockhashByRange](getblockhashbyrange) | ||
- [getBlockHeader](getblockheader) | ||
- [getBlockTotal](getblocktotal) | ||
- [getCoinbase](getcoinbase) | ||
- [getMainChainHeight](getmainchainheight) | ||
- [getOrphansTotal](getorphanstotal) | ||
- [isBlue](isblue) | ||
- [isCurrent](iscurrent) | ||
- [isOnMainChain](isonmainchain) | ||
- [tips](tips) | ||
|
||
#### Chain | ||
- [getNodeInfo](getnodeinfo) | ||
- [getPeerInfo](getpeerinfo) | ||
|
||
|
||
#### Miner | ||
|
||
- [getBlockTemplate](getblocktemplate) | ||
- [submitBlock](submitblock) | ||
|
||
#### Transaction | ||
|
||
- [createRawTransaction](createrawtransaction) | ||
- [decodeRawTransaction](decoderawtransaction) | ||
- [getRawTransaction](getrawtransaction) | ||
- [getUtxo](getutxo) | ||
- [sendRawTransaction](sendrawtransaction) | ||
- [txSign](txsign) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
38 changes: 38 additions & 0 deletions
38
Document/content/JSON RPC API/createRawTransaction/_index.en.md
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,38 @@ | ||
--- | ||
title: createRawTransaction | ||
weight: 3 | ||
--- | ||
|
||
### createRawTransaction | ||
Returns a new transaction spending the provided inputs and sending to the provided addresses.The transaction inputs are not signed in the created transaction. | ||
|
||
#### Parameters | ||
1. `inputs: (array of object)` transaction inputs. | ||
- `txid: (string)` The transaction id | ||
- `vout: (numeric)` The output number | ||
2. `amounts: (object)` addresses as keys and output amounts as values. | ||
3. `lockTime: (numeric, optional, default=0)` Raw locktime. Non-0 value also locktime-activates inputs | ||
|
||
#### Returns | ||
##### `(string)` hex-encoded bytes of the serialized transaction | ||
|
||
#### Example | ||
|
||
##### Request | ||
```bash | ||
|
||
curl -sku "test:test" -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"createRawTransaction","params":[ [{"Txid":"cfd933e4590a3cfbcf94e9220c77834fe8a869414c51e3bd0ce5af23592e80f9", "Vout":1}], {"Tme9dVJ4GeWRninBygrA6oDwCAGYbBvNxY7":90000000}],"id":1}' http://127.0.0.1:18131 | jq | ||
|
||
``` | ||
|
||
##### Response | ||
```js | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": "0100000001f9802e5923afe50cbde3514c4169a8e84f83770c22e994cffb3c0a59e433d9cf01000000ffffffff01804a5d05000000001976a914a6b8fe2348fad076b7fd1b34b7e5b35db96dc2a088ac00000000000000001141cb5f0100" | ||
} | ||
|
||
``` | ||
|
||
|
66 changes: 66 additions & 0 deletions
66
Document/content/JSON RPC API/decodeRawTransaction/_index.en.md
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,66 @@ | ||
--- | ||
title: decodeRawTransaction | ||
weight: 3 | ||
--- | ||
|
||
### decodeRawTransaction | ||
Returns a JSON object representing the provided serialized, hex-encoded transaction. | ||
|
||
#### Parameters | ||
1. `hexTx: (string)` serialized, hex-encoded transaction. | ||
|
||
#### Returns | ||
##### `(object)` | ||
- `txid: (string)` the transaction id. | ||
- `txhash: (string)` the hash of the transaction. | ||
- `locktime: (numeric)` the transaction lock time. | ||
- `version: (numeric)` the block version. | ||
- `vin: (array of objects, coinbase)` the transaction inputs . | ||
- `coinbase: (string)` the hex-encoded bytes of the signature script. | ||
- `sequence: (numeric)` the script sequence number. | ||
- vin (array of objects, coinbase, non-coinbase) | ||
(json object) | ||
{"coinbase": "data", "sequence": n, ...} | ||
- `vout: (array of objects)` the transaction outputs . | ||
|
||
#### Example | ||
|
||
##### Request | ||
```bash | ||
curl --data '{"method":"decodeRawTransaction","params":["01000000013376e251a4e058e8d70ecc27fbe02a1c4b17ed722294dc1d644dd24e009ef9dd00000000ffffffff0100e40b54020000001976a9146bd68046854813036fa042958e7f5ca29606e8d088ac00000000000000000100"],"jsonrpc":"2.0","id":1}' -s -k -u "test:test" -H 'Content-Type: application/json' http://127.0.0.1:1234 |jq . | ||
``` | ||
|
||
##### Response | ||
```js | ||
{ | ||
"txid": "0d21c787536b02e3df82bd72c8dceb525049013cb249eee1d73090183c9a8965", | ||
"txhash": "b718e91241840992175195758628f3b6ec61019be0fa202d9b4b4652a6b96fd7", | ||
"version": 1, | ||
"locktime": 0, | ||
"vin": [ | ||
{ | ||
"txid": "ddf99e004ed24d641ddc942272ed174b1c2ae0fb27cc0ed7e858e0a451e27633", | ||
"vout": 0, | ||
"sequence": 4294967295, | ||
"scriptSig": { | ||
"asm": "", | ||
"hex": "" | ||
} | ||
} | ||
], | ||
"vout": [ | ||
{ | ||
"amount": 10000000000, | ||
"scriptPubKey": { | ||
"asm": "OP_DUP OP_HASH160 6bd68046854813036fa042958e7f5ca29606e8d0 OP_EQUALVERIFY OP_CHECKSIG", | ||
"hex": "76a9146bd68046854813036fa042958e7f5ca29606e8d088ac", | ||
"reqSigs": 1, | ||
"type": "pubkeyhash", | ||
"addresses": [ | ||
"RmG6xQsV7gnS4JZmoq5FgmyEbmUQRenrTCo" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
``` |
25 changes: 25 additions & 0 deletions
25
Document/content/JSON RPC API/getBestBlockHash/_index.cn.md
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,25 @@ | ||
--- | ||
title: getBestBlockHash | ||
weight: 1 | ||
--- | ||
|
||
## getBestBlocktHash | ||
### 函数名:getBestBlockHash | ||
### 说明:无参数,获取当前最大区块Order的区块hash | ||
### 实例 | ||
|
||
``` | ||
curl -s -k -u test:test -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"getBestBlockHash","params":[],"id":1}' https://127.0.0.1:18131 | ||
``` | ||
输出 | ||
``` | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": "000044c83486609eee3c5bb46cd539eb022ea05ed86c40ef4e6710357f225ea3" | ||
} | ||
``` | ||
|
||
|
||
|
27 changes: 27 additions & 0 deletions
27
Document/content/JSON RPC API/getBestBlockHash/_index.en.md
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,27 @@ | ||
--- | ||
title: getBestBlockHash | ||
weight: 1 | ||
--- | ||
|
||
### getBestBlockHash | ||
Returns the hash of the of the best (most recent) block in the longest block chain. | ||
|
||
#### Parameters | ||
None | ||
#### Returns | ||
##### `(string)` - best block hash | ||
|
||
#### Example | ||
|
||
##### Request | ||
```bash | ||
curl --data '{"method":"getBestBlockHash","params":[],"jsonrpc":"2.0","id":1}' -s -k -u "rpcuser:rpcpass" -H 'Content-Type: application/json' http://127.0.0.1:18131 | ||
``` | ||
|
||
##### Response | ||
```js | ||
"000005c905e232a3320c35e38ec2a7f8f9d03e3cc28faef007cc46f273835f4b" | ||
``` | ||
|
||
|
||
|
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,55 @@ | ||
--- | ||
title: getBlock | ||
weight: 1 | ||
--- | ||
|
||
## getBlock | ||
### 函数名:getBlock {blockhash} {verbose} {inclTx} {fullTx} | ||
### 说明:根据区块hash获取区块 | ||
- blockhash : 256位区块hash | ||
- verbose: 是否显示详细信息,默认为false | ||
- inclTx: 是否包含交易信息,默认为true | ||
- fullTx:是否显示完整交易信息,默认为true | ||
|
||
#### 实例: | ||
``` | ||
curl -s -k -u test:test -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"getBlock","params":["98294db0634d5afed36554a60d4565a6507e3a78dfb8cc66cc08ba29f328c682",true,true,false],"id":1}' https://127.0.0.1:18131 | ||
``` | ||
输出 | ||
``` | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": { | ||
"hash": "98294db0634d5afed36554a60d4565a6507e3a78dfb8cc66cc08ba29f328c682", | ||
"txsvalid": true, | ||
"confirmations": 338, | ||
"version": 12, | ||
"weight": 682, | ||
"height": 20831, | ||
"txRoot": "040807f45457c94ed905bf72ed923154a5e951278e80a5c0eb2de0d7b269c5c1", | ||
"order": 21300, | ||
"transactions": [ | ||
"5844ca2e091f8c2a770f4a0ff23318ae780b9e3a9b2076cc27b8c493dce30c03", | ||
"c259a4dfb7eaaae92ab246f14762541581671135cd6030ac29d8c34cf77e9f32" | ||
], | ||
"stateRoot": "0000000000000000000000000000000000000000000000000000000000000000", | ||
"bits": "1a1c60ed", | ||
"difficulty": 438067437, | ||
"pow": { | ||
"pow_name": "qitmeer_keccak256", | ||
"pow_type": 6, | ||
"nonce": 1457503796 | ||
}, | ||
"timestamp": "2020-07-01T12:48:52+08:00", | ||
"parentroot": "000073e5c2787d1d2a04358c8b2fad422a602a38a6070570c2d8b724c054987f", | ||
"parents": [ | ||
"000073e5c2787d1d2a04358c8b2fad422a602a38a6070570c2d8b724c054987f" | ||
], | ||
"children": [ | ||
"00018c75188cc658705af615684b095bbc85a2dde6772e4bf3929b5d5505f5fb" | ||
] | ||
} | ||
} | ||
``` | ||
|
Oops, something went wrong.