Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@
{
"group": "Resources",
"pages": [
"sdk/resources/supported-evm-chains"
"sdk/resources/supported-evm-chains",
"sdk/resources/network-status"
]
}
]
Expand Down
6 changes: 5 additions & 1 deletion docs/sdk/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ The Lit JS SDK provides a comprehensive toolkit for integrating Lit Protocol's d

- **[PKP Permissions](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-permissions)**: - Manage PKP permissions
- **[PKP Viem Account](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-viem-account)**: - Manage PKP Viem account
- **[PKP View Helpers](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-view-helpers)**: - View PKP permissions
- **[PKP View Helpers](/sdk/sdk-reference/lit-client/functions/createLitClient/pkp-view-helpers)**: - View PKP permissions

### 5. Network Status & Monitoring

- **[Network Status](/sdk/resources/network-status)**: - Monitor real-time uptime and performance of Lit Protocol networks
109 changes: 109 additions & 0 deletions docs/sdk/resources/network-status.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
title: Network Status & Health Monitoring
---

# Network Status

Monitor the real-time health and uptime of Lit Protocol's core network endpoints across different environments.

## Status Pages

### Development Network

**[Naga Dev Network Status](https://uptime.getlit.dev/naga-dev)**

Live monitoring dashboard for the development network, tracking real-time metrics for all core SDK operations.

### Test Network

**[Naga Test Network Status](https://uptime.getlit.dev/naga-test)**

Live monitoring dashboard for the test network, providing visibility into network health and performance.

## Monitored Operations

These dashboards track the uptime and performance of core SDK methods:

| Operation | Description |
| ------------------ | ---------------------------------------------------- |
| **decrypt** | Decryption operations for encrypted data |
| **executeJs** | JavaScript execution in Lit Actions |
| **handshake** | Node handshake and connection establishment |
| **pkpSign** | PKP signing operations for transactions and messages |
| **signSessionKey** | Session key signing for authentication |

## Programmatic Access

<Warning>
**Experimental Feature**: The Lit Status SDK is currently in active development and should be considered experimental. APIs and features may change without notice.
</Warning>

You can access network metrics programmatically using the [Lit Status SDK](https://uptime-docs.vercel.app/docs/sdk) for read-only monitoring and analytics.

### Prerequisites

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).

### Installation

```bash
npm install @lit-protocol/lit-status-sdk
```

### Example Usage

```typescript
import { createLitStatusClient } from '@lit-protocol/lit-status-sdk';

(async () => {
const client = createLitStatusClient({
url: process.env.API_URL,
apiKey: process.env.READ_KEY,
Comment on lines +59 to +61
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environment variables should be validated before use. Consider adding checks to ensure API_URL and READ_KEY are defined to prevent runtime errors.

Suggested change
const client = createLitStatusClient({
url: process.env.API_URL,
apiKey: process.env.READ_KEY,
const API_URL = process.env.API_URL;
const READ_KEY = process.env.READ_KEY;
if (!API_URL || !READ_KEY) {
throw new Error('Missing required environment variables: API_URL and/or READ_KEY');
}
const client = createLitStatusClient({
url: API_URL,
apiKey: READ_KEY,

Copilot uses AI. Check for mistakes.

});

// Get available filter options
const filterOptions = await client.getFilterOptions();
console.log('Available networks:', filterOptions.networks);
console.log('Available functions:', filterOptions.functions);

// Register and retrieve function references
const functions = await client.getOrRegisterFunctions({
network: 'naga-dev',
product: 'js-sdk/naga',
functions: ['executeJs', 'pkpSign', 'decrypt'],
});

// Get recent metrics for a specific function
const executeJsMetrics = await client.getFunctionMetrics(
functions['executeJs'].id,
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function ID 'functions['executeJs'].id' is hardcoded and repeated. Consider extracting it to a variable or demonstrating how to iterate over multiple functions to reduce duplication.

Copilot uses AI. Check for mistakes.

{
startDate: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours
endDate: new Date(),
}
);

console.log('ExecuteJs Metrics:', {
uptime: `${executeJsMetrics.uptime}%`,
successRate: `${executeJsMetrics.successRate}%`,
avgResponseTime: `${executeJsMetrics.averageResponseTime}ms`,
totalExecutions: executeJsMetrics.totalExecutions,
});

// Get time-series data for charting
const timeSeries = await client.getFunctionMetricsTimeSeries(
functions['executeJs'].id,
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function ID 'functions['executeJs'].id' is hardcoded and repeated. Consider extracting it to a variable or demonstrating how to iterate over multiple functions to reduce duplication.

Copilot uses AI. Check for mistakes.

{
startDate: new Date(Date.now() - 24 * 60 * 60 * 1000),
endDate: new Date(),
},
'hour'
);

timeSeries.buckets.forEach((bucket) => {
console.log(
`${bucket.timestamp}: ${bucket.successRate}% success, ` +
`${bucket.averageResponseTime}ms avg`
);
});
})();
```
Loading