Skip to content

Commit 012afdc

Browse files
authored
Merge pull request #953 from LIT-Protocol/feature/jss-128-naga-include-unified-status-page-links-to-the-doc
feat(docs): add Network Status resource and update introduction with …
2 parents f892898 + 1b35b9f commit 012afdc

File tree

3 files changed

+116
-2
lines changed

3 files changed

+116
-2
lines changed

docs/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@
122122
{
123123
"group": "Resources",
124124
"pages": [
125-
"sdk/resources/supported-evm-chains"
125+
"sdk/resources/supported-evm-chains",
126+
"sdk/resources/network-status"
126127
]
127128
}
128129
]

docs/sdk/introduction.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@ The Lit JS SDK provides a comprehensive toolkit for integrating Lit Protocol's d
3636

3737
- **[PKP Permissions](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-permissions)**: - Manage PKP permissions
3838
- **[PKP Viem Account](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-viem-account)**: - Manage PKP Viem account
39-
- **[PKP View Helpers](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-view-helpers)**: - View PKP permissions
39+
- **[PKP View Helpers](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-view-helpers)**: - View PKP permissions
40+
41+
### 5. Network Status & Monitoring
42+
43+
- **[Network Status](/sdk/resources/network-status)**: - Monitor real-time uptime and performance of Lit Protocol networks
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Network Status & Health Monitoring
3+
---
4+
5+
# Network Status
6+
7+
Monitor the real-time health and uptime of Lit Protocol's core network endpoints across different environments.
8+
9+
## Status Pages
10+
11+
### Development Network
12+
13+
**[Naga Dev Network Status](https://uptime.getlit.dev/naga-dev)**
14+
15+
Live monitoring dashboard for the development network, tracking real-time metrics for all core SDK operations.
16+
17+
### Test Network
18+
19+
**[Naga Test Network Status](https://uptime.getlit.dev/naga-test)**
20+
21+
Live monitoring dashboard for the test network, providing visibility into network health and performance.
22+
23+
## Monitored Operations
24+
25+
These dashboards track the uptime and performance of core SDK methods:
26+
27+
| Operation | Description |
28+
| ------------------ | ---------------------------------------------------- |
29+
| **decrypt** | Decryption operations for encrypted data |
30+
| **executeJs** | JavaScript execution in Lit Actions |
31+
| **handshake** | Node handshake and connection establishment |
32+
| **pkpSign** | PKP signing operations for transactions and messages |
33+
| **signSessionKey** | Session key signing for authentication |
34+
35+
## Programmatic Access
36+
37+
<Warning>
38+
**Experimental Feature**: The Lit Status SDK is currently in active development and should be considered experimental. APIs and features may change without notice.
39+
</Warning>
40+
41+
You can access network metrics programmatically using the [Lit Status SDK](https://uptime-docs.vercel.app/docs/sdk) for read-only monitoring and analytics.
42+
43+
### Prerequisites
44+
45+
To access the Status API, you'll need a read-only API key. Request access by filling out the [Lit Protocol Contact Form](https://docs.google.com/forms/d/e/1FAIpQLScBVsg-NhdMIC1H1mozh2zaVX0V4WtmEPSPrtmqVtnj_3qqNw/viewform).
46+
47+
### Installation
48+
49+
```bash
50+
npm install @lit-protocol/lit-status-sdk
51+
```
52+
53+
### Example Usage
54+
55+
```typescript
56+
import { createLitStatusClient } from '@lit-protocol/lit-status-sdk';
57+
58+
(async () => {
59+
const client = createLitStatusClient({
60+
url: process.env.API_URL,
61+
apiKey: process.env.READ_KEY,
62+
});
63+
64+
// Get available filter options
65+
const filterOptions = await client.getFilterOptions();
66+
console.log('Available networks:', filterOptions.networks);
67+
console.log('Available functions:', filterOptions.functions);
68+
69+
// Register and retrieve function references
70+
const functions = await client.getOrRegisterFunctions({
71+
network: 'naga-dev',
72+
product: 'js-sdk/naga',
73+
functions: ['executeJs', 'pkpSign', 'decrypt'],
74+
});
75+
76+
// Get recent metrics for a specific function
77+
const executeJsMetrics = await client.getFunctionMetrics(
78+
functions['executeJs'].id,
79+
{
80+
startDate: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours
81+
endDate: new Date(),
82+
}
83+
);
84+
85+
console.log('ExecuteJs Metrics:', {
86+
uptime: `${executeJsMetrics.uptime}%`,
87+
successRate: `${executeJsMetrics.successRate}%`,
88+
avgResponseTime: `${executeJsMetrics.averageResponseTime}ms`,
89+
totalExecutions: executeJsMetrics.totalExecutions,
90+
});
91+
92+
// Get time-series data for charting
93+
const timeSeries = await client.getFunctionMetricsTimeSeries(
94+
functions['executeJs'].id,
95+
{
96+
startDate: new Date(Date.now() - 24 * 60 * 60 * 1000),
97+
endDate: new Date(),
98+
},
99+
'hour'
100+
);
101+
102+
timeSeries.buckets.forEach((bucket) => {
103+
console.log(
104+
`${bucket.timestamp}: ${bucket.successRate}% success, ` +
105+
`${bucket.averageResponseTime}ms avg`
106+
);
107+
});
108+
})();
109+
```

0 commit comments

Comments
 (0)