Resources
Network Status & Health Monitoring
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| 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 |
npm install @lit-protocol/lit-status-sdk
import { createLitStatusClient } from '@lit-protocol/lit-status-sdk';
(async () => {
const client = createLitStatusClient({
url: process.env.API_URL,
apiKey: process.env.READ_KEY,
});
// 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,
{
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,
{
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`
);
});
})();
Was this page helpful?