Skip to content

Commit

Permalink
Sync snarkOS documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleobot committed Jul 27, 2020
1 parent 5f56626 commit 776bc8b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,37 @@ Returns information about a record from serialized record hex.
curl --data-binary '{"jsonrpc": "2.0", "id":"documentation", "method": "decoderecord", "params": ["record_hexstring"] }' -H 'content-type: application/json' http://127.0.0.1:3030/
```

## decryptrecord
Decrypts the record ciphertext and returns the hex encoded bytes of the record.

### Arguments

| Parameter | Type | Required | Description |
|:-------------------:|:------:|:--------:|:---------------------------------------------------:|
| `record_ciphertext` | string | Yes | The encrypted record |
| `account_view_key` | string | Yes | The account view key used to decrypt the ciphertext |

### Response

| Parameter | Type | Description |
|:---------:|:------:|:---------------------------- |
| `result` | string | The hex-encoded record bytes |


### Example
```
curl --user username:password --data-binary '{
"jsonrpc":"2.0",
"id": "1",
"method": "decryptrecord",
"params": [
{
"record_ciphertext": "record_ciphertext_string",
"account_view_key": "account_view_key_string"
}
]
}' -H 'content-type: application/json' http://127.0.0.1:3030/
```
## getbestblockhash
Returns the block hash of the head of the best valid chain.

Expand Down

0 comments on commit 776bc8b

Please sign in to comment.