Skip to content

Commit 8c2a084

Browse files
Tyler Lastovichgitbook-bot
Tyler Lastovich
authored andcommitted
GitBook: [#118] Testing Sandbox
1 parent 67f11a8 commit 8c2a084

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [Authentication](api/authentication.md)
2727
* [Disambiguation Service](api/disambiguation-service.md)
2828
* [API Submission and Verification FAQ](api/superagent-faq.md)
29+
* [Testing Sandbox](api/testing-sandbox.md)
2930
* [GraphQL API](overview/README.md)
3031
* [Data Schema](overview/data-schema.md)
3132
* [GraphQL Examples](api/overview/calls-with-graphql.md)

api/testing-sandbox.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
description: Safely test submissions and verifications to the Golden protocol
3+
---
4+
5+
# Testing Sandbox
6+
7+
The Golden protocol offers an isolated testing environment that closely reflects the production knowledge graph, verification, and submission processes. This environment allows for the creation and testing of tools without the risk of losing testnet points or appearing as a bad actor on the protocol. Compared to the production environment we have made a few changes to this sandbox, namely:
8+
9+
* **Instant feedback on verification voting**: verification consensus has been modified to only require 1 vote and triples retrieved from the verification queue are pulled from an `accepted` or `rejected` statuses. This allows you to check out the accuracy of your automated verification tools before staking on production.
10+
* **Rolling graph data**: data displayed on the testing environment will not be updated in live time. This data will be pulled from the production environment on a regular basis.
11+
12+
## Usage
13+
14+
To use the sandbox simply replace the production API endpoint with the testing endpoint and use the [overview](../overview/ "mention") or [godel-python-sdk](../godel-python-sdk/ "mention") as normal. 
15+
16+
{% hint style="info" %}
17+
**Testing API endpoint**: [`https://sandbox.dapp.golden.xyz/`](https://sandbox.dapp.golden.xyz/) 
18+
{% endhint %}
19+
20+
Production API endpoint for reference: [`https://dapp.golden.xyz/`](https://sandbox.dapp.golden.xyz/) 
21+
22+
23+
24+
Setting up the [godel-python-sdk](../godel-python-sdk/ "mention") to use the testing sandbox:
25+
26+
```python
27+
from godel import GoldenAPI
28+
29+
JWT_TOKEN = #YOUR_JWT_TOKEN_HERE
30+
API_URL = "https://sandbox.dapp.golden.xyz/graphql" # <== Testing sandbox endpoint
31+
goldapi = GoldenAPI(url=API_URL)
32+
goldapi.set_jwt_token(jwt_token=JWT_TOKEN)
33+
```
34+
35+
#### Visual interface
36+
37+
The sandbox also offers the GraphiQL visual interface where you can build and test queries through the browser. See: [https://sandbox.dapp.golden.xyz/graphiql](https://sandbox.dapp.golden.xyz/graphiql)
38+

0 commit comments

Comments
 (0)