Skip to content

Commit

Permalink
Sync snarkOS documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleobot committed Sep 19, 2020
1 parent 3bfa2ac commit 5fc061e
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Returns information about a transaction from serialized transaction bytes.
| `local_data_root` | string | The local data root |
| `value balance` | number | The transaction value balance |
| `signatures` | array | The list of transaction signatures |
| `encrypted_records` | array | The list of new encrypted records |
| `transaction_metadata` | object | The transaction metadata |

### Example
Expand Down Expand Up @@ -127,7 +128,7 @@ None

| Parameter | Type | Description |
|:---------:|:------:|:--------------------------------------------:|
| `result` | string | The number of blocks in the best valid chain |
| `result` | number | The number of blocks in the best valid chain |

### Example
```ignore
Expand All @@ -141,7 +142,7 @@ Returns the block hash of a block at the given block height in the best valid ch

| Parameter | Type | Required | Description |
|:-------------- |:------:|:--------:|:-------------------------------------------- |
| `block_height` | string | Yes | The block height of the requested block hash |
| `block_height` | number | Yes | The block height of the requested block hash |

### Response

Expand Down Expand Up @@ -195,6 +196,25 @@ None
curl --data-binary '{"jsonrpc": "2.0", "id":"documentation", "method": "getconnectioncount", "params": [] }' -H 'content-type: application/json' http://127.0.0.1:3030/
```

## getnodeinfo
Returns information about the node.

### Arguments

None

### Response

| Parameter | Type | Description |
|:------------:|:----:|:---------------------------------------------:|
| `is_miner` | bool | Flag indicating if the node is a miner |
| `is_snycing` | bool | Flag indicating if the node currently syncing |

### Example
```ignore
curl --data-binary '{"jsonrpc": "2.0", "id":"documentation", "method": "getnodeinfo", "params": [] }' -H 'content-type: application/json' http://127.0.0.1:3030/
```

## getpeerinfo
Returns the node's connected peers.

Expand Down Expand Up @@ -251,12 +271,14 @@ Returns information about a transaction from a transaction id.
| `old_serial_numbers` | array | The list of old record serial numbers |
| `new_commitments` | array | The list of new record commitments |
| `memo` | string | The transaction memo |
| `network_id` | number | The transaction network id |
| `digest` | string | The merkle tree digest |
| `transaction_proof` | string | The transaction zero knowledge proof |
| `program_commitment` | string | The program verification key commitment |
| `local_data_root` | string | The local data root |
| `value balance` | number | The transaction value balance |
| `signatures` | array | The list of transaction signatures |
| `encrypted_records` | array | The list of new encrypted records |
| `transaction_metadata` | object | The transaction metadata |

### Example
Expand Down

0 comments on commit 5fc061e

Please sign in to comment.