Skip to content

Commit

Permalink
Merge pull request #17 from fr1t2/main
Browse files Browse the repository at this point in the history
Final push QRL documentation revision
  • Loading branch information
jplomas committed Mar 8, 2024
2 parents 5d166f8 + fa9e647 commit 20a738f
Show file tree
Hide file tree
Showing 264 changed files with 5,324 additions and 3,630 deletions.
1 change: 0 additions & 1 deletion site-layout.md → _site-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ getting-started
↳ qrandomx
↳ qip
↳ qrl-cli
↳ vote-qrl
↳ helpers/
↳ node-helpers
↳ validate-address
Expand Down
12 changes: 0 additions & 12 deletions blog/2019-05-28-first-blog-post.md

This file was deleted.

44 changes: 0 additions & 44 deletions blog/2019-05-29-long-blog-post.md

This file was deleted.

20 changes: 0 additions & 20 deletions blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
25 changes: 0 additions & 25 deletions blog/2021-08-26-welcome/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions blog/authors.yml

This file was deleted.

21 changes: 7 additions & 14 deletions docs/API/api-overview.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
docstatus: DRAFT
id: qrl-api-overview
title: QRL API Overview
hide_title: false
hide_table_of_contents: false
sidebar_label: API Overview
sidebar_position: 1
pagination_label: API Overview
custom_edit_url: https://github.com/fr1t2/documentation/edit/main/docs/API/api-overview.md
custom_edit_url: https://github.com/theqrl/documentation/edit/main/docs/API/api-overview.md
description: QRL API Overview
keywords:
- docs
Expand All @@ -25,25 +24,19 @@ import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';


The QRL API's are the portal into the inner workings of the Quantum Resistant Ledger's blockchain and wallet functions.

These API allow developers and advanced users access to core functions and information from the blockchain.
The QRL API's are the developers portal into the inner workings of the Quantum Resistant Ledger's blockchain. These API's allow developers and advanced users access to core functions and information from the blockchain.

:::info
While there is no authentication required to interact with most of the QRL's API's, you will need to be able to reach the API service IP and Port of the node you are attempting to connect to.
While there is no authentication required to interact with most of the QRL's API's, you will need access to an API service IP and Port of a node running on the QRL network.

Best practice is to [run your own QRL node](/use/node/overview).
:::

## gRPC

The QRL API is organized around [gRPC (Google Remote Procedure Call)](https://grpc.io/). GRPC uses [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview) for serializing structured data.

Every function requires an object as parameter and returns another object as response. Our qrl.proto file lists the different objects as messages in two categories, request (named \*Req) and response (named \*Resp).
The QRL API is organized around [gRPC (Google Remote Procedure Call)](https://grpc.io/). GRPC uses [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview) for serializing structured data. Every function requires an object as parameter and returns another object as response. Our qrl.proto file lists the different objects as messages in two categories, request (*Req*) and response (*Resp*).

:::info
More information on GRPC can be found in [their official documentation](https://grpc.io/)
:::

<Tabs defaultValue="public"
groupID="syntaxSelection"
Expand Down Expand Up @@ -92,17 +85,17 @@ More information on GRPC can be found in [their official documentation](https://
</TabItem>
<TabItem value="walletd-rest">
<h2>Walletd Rest Proxy - API</h2>
<p>The QRL WalletD Rest Proxy makes integrating QRL even easier</p>
<p>The QRL Wallet Daemon Rest Proxy makes integrating QRL even easier</p>
<span>
<section class="row list_node_modules-@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module">
<article class="col col--12 margin-bottom--lg">
<a class="card padding--lg cardContainer_node_modules-@docusaurus-theme-classic-lib-theme-DocCard-styles-module" href="/api/walletd-rest-proxy">
<h2 class="text--truncate cardTitle_node_modules-@docusaurus-theme-classic-lib-theme-DocCard-styles-module"
title="Wallet Daemon Rest Proxy">
QRL Walletd Rest Proxy API
QRL Walletd-Rest Proxy API
</h2>
<p class="text--truncate cardDescription_node_modules-@docusaurus-theme-classic-lib-theme-DocCard-styles-module"
title="QRL Wallet Daemon Proxy API.">The QRL WalletD Rest Proxy API documentation</p>
title="QRL Wallet Daemon Proxy API.">The QRL WalletD-Rest Proxy API documentation</p>
</a>
</article>
</section>
Expand Down
37 changes: 17 additions & 20 deletions docs/API/explorer-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
docstatus: 30%
id: explorer-api
title: QRL API - Explorer
hide_title: false
Expand Down Expand Up @@ -100,7 +99,7 @@ def getblockByNumber(block_number):
jsonResponse = getBlockResp
return(jsonResponse)

getblockByNumber("34556")
print(getblockByNumber("34556"))
```


Expand Down Expand Up @@ -149,7 +148,7 @@ def getTransactionByHash(tx_hash):
jsonResponse = getTXResp
return(jsonResponse)

getTransactionByHash("c9656d989bce2000c794314b73882b0ebb99fa1fe58e7a466a8a64e7b851a4c6")
print(getTransactionByHash("c9656d989bce2000c794314b73882b0ebb99fa1fe58e7a466a8a64e7b851a4c6"))
```

## Address
Expand Down Expand Up @@ -194,7 +193,7 @@ def getAddress(address):
jsonResponse = getAddressResp
return(jsonResponse)

getAddress("Q01040007a591a62c23ed27adfe3df8eb812ee5e4b73e47fb8471e8d78ecd9b4cadc325ca36d86e")
print(getAddress("Q01040007a591a62c23ed27adfe3df8eb812ee5e4b73e47fb8471e8d78ecd9b4cadc325ca36d86e"))
```


Expand Down Expand Up @@ -240,7 +239,7 @@ def getEmission():
return(jsonResponse)


getEmission()
print(getEmission())
```


Expand Down Expand Up @@ -284,7 +283,7 @@ def getEmissionText():
return(jsonResponse)


getEmissionText()
print(getEmissionText())
```

## Reward
Expand Down Expand Up @@ -329,7 +328,7 @@ def getReward():
return(jsonResponse)


getReward()
print(getReward())
```

## Reward Text
Expand Down Expand Up @@ -370,7 +369,7 @@ def getRewardText():
return(jsonResponse)


getRewardText()
print(getRewardText())
```

## RewardShor
Expand Down Expand Up @@ -413,7 +412,7 @@ def getRewardShor():
return(jsonResponse)


getRewardShor()
print(getRewardShor())
```

## RewardShor Text
Expand Down Expand Up @@ -454,7 +453,7 @@ def getRewardShorText():
return(jsonResponse)


getRewardShorText()
print(getRewardShorText())
```


Expand Down Expand Up @@ -502,7 +501,7 @@ def getBlockheight():
return(jsonResponse)


getBlockheight()
print(getBlockheight())
```


Expand Down Expand Up @@ -544,8 +543,7 @@ def getBlockheightText():
jsonResponse = getBlockheightTextResp
return(jsonResponse)


getBlockheightText()
print(getBlockheightText())
```


Expand Down Expand Up @@ -594,7 +592,7 @@ def getStatus():
return(json.dumps(jsonResponse, indent=4, sort_keys=True))


getStatus()
print(getStatus())
```


Expand All @@ -618,30 +616,29 @@ Get the mining status information for the current QRL block.


:::info
`/api/status` requests will only return in JSON format.
`/api/miningstats` requests will only return in JSON format.
Parse the response using json tools in a language of your choice.
:::


**cURL Example**

```bash
curl -XGET https://explorer.theqrl.org/api/status
curl -XGET https://explorer.theqrl.org/api/miningstats
```

**Python Example**

```python
def getStatus():
def getMiningStats():
import requests
import json
request = requests.get("https://explorer.theqrl.org/api/status")
request = requests.get("https://explorer.theqrl.org/api/miningstats")
response = request.text
getStatusResp = json.loads(response)
jsonResponse = getStatusResp
#return(jsonResponse)
return(json.dumps(jsonResponse, indent=4, sort_keys=True))


getStatus()
print(getMiningStats())
```

0 comments on commit 20a738f

Please sign in to comment.