You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,9 @@ To interact with Hgraph's services, you'll need to authenticate your requests. T
27
27
To authenticate using an API key, include your API key in the `x-api-key header` of each request. Here's how you can set it up:
28
28
29
29
```javascript
30
-
consthgraph=newHGraphSDK({
30
+
importHgraphSDKfrom'@hgraph.io/sdk';
31
+
32
+
consthgraph=newHgraphSDK({
31
33
headers: {
32
34
'x-api-key':'your-api-key-here',
33
35
},
@@ -41,17 +43,17 @@ For enhanced security, especially in front-end applications, we are rolling out
41
43
Learn more about JWTs at [jwt.io](https://jwt.io/).
42
44
43
45
:::note Early access
44
-
JWT authentication is in the early access phase. If you're interested in implementing this method, please [reach out to support](/support) for assistance.
46
+
JWT authentication is in the early access phase. If you're interested in implementing this method, please [reach out to support](https://docs.hgraph.com/support) for assistance.
45
47
:::
46
48
47
49
##### Example usage
48
50
49
51
Once you have your JWT, you can authenticate your requests as follows:
50
52
51
53
```javascript
52
-
importHGraphSDKfrom'@hgraph.io/sdk';
54
+
importHgraphSDKfrom'@hgraph.io/sdk';
53
55
54
-
consthgraph=newHGraphSDK({
56
+
consthgraph=newHgraphSDK({
55
57
headers: {
56
58
Authorization:`Bearer your-jwt-token-here`,
57
59
},
@@ -139,10 +141,10 @@ To test the WebSocket connection and ensure that everything is set up correctly,
139
141
Replace `<YOUR_API_KEY>` with your actual API key and run:
This command initiates a WebSocket connection to the GraphQL endpoint at `wss://api.hgraph.dev/v1/graphql` using your API key for authentication.
147
+
This command initiates a WebSocket connection to the GraphQL endpoint at `wss://testnet.hedera.api.hgraph.dev/v1/graphql` using your API key for authentication.
146
148
147
149
**Note:** If you don't have `wscat` installed, you can install it globally using:
148
150
@@ -154,4 +156,4 @@ npm install -g wscat
154
156
155
157
This Software Development Kit (SDK) is actively being developed in conjunction with the [Hgraph API](https://hgraph.com) to ensure seamless integration and compatibility between the two. We are committed to adopting [Semantic Versioning](https://semver.org) standards, which will provide clear and predictable updates, making it easier for developers to manage dependencies and stay informed about changes.
156
158
157
-
> Before we release version 1.0, updates may introduce breaking changes as we refine the software. To maintain stability in production, we recommend pinning dependencies to an exact version using `--save-exact` when installing the package.
159
+
> Before we release version 1.0, updates may introduce breaking changes as we refine the software. To maintain stability in production, we recommend pinning dependencies to an exact version using `--save-exact` when installing the package.
0 commit comments