diff --git a/README.md b/README.md index 7052196..6ac789c 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ yarn add @metatrom/libp2p-native-bridge - 🔧 Configurable settings management - 🎛️ Settings UI component - 🔌 Protocol handler support -- 🔍 Peer discovery and connection management -- 🚀 TypeScript support with full type definitions +- 🔍 Peer discovery and connection management with configurable TTL +- 🚀 TypeScript support with self-contained type definitions for IOR compatibility ## Usage @@ -190,7 +190,7 @@ This package requires the following native modules to be implemented in your Rea { tcpPort: 10000, wsPort: 10005, - discoveryTimeout: 30000, + discoveryTimeout: 30000, // Discovery TTL in milliseconds (30 seconds) enableDebugLogs: false, autoDiscovery: false, useCustomPorts: false, @@ -198,6 +198,14 @@ This package requires the following native modules to be implemented in your Rea } ``` +#### Discovery TTL (Time To Live) + +The `discoveryTimeout` setting controls how long the peer discovery process runs before timing out. This acts as a TTL (Time To Live) for discovery operations: +- Default: 30000ms (30 seconds) +- Minimum: 5000ms (5 seconds) +- Maximum: 300000ms (5 minutes) +- Can be configured via SettingsUI or programmatically through SettingsService + ## Platform Considerations ### iOS @@ -210,6 +218,16 @@ This package requires the following native modules to be implemented in your Rea - Network Service Discovery (NSD) - Dynamic protocol registration +## Recent Updates + +### TypeScript Declarations +- Self-contained type definitions for improved IOR (Interoperable Object Reference) compatibility +- All types are now bundled directly in the package for better type generation support + +### Discovery TTL Configuration +- Added configurable TTL for peer discovery operations via `discoveryTimeout` setting +- Improved discovery lifecycle management with timeout controls + ## Dependencies ### Peer Dependencies diff --git a/native/libp2p.d.ts b/native/libp2p.d.ts deleted file mode 100644 index d85a2f9..0000000 --- a/native/libp2p.d.ts +++ /dev/null @@ -1 +0,0 @@ -// This file is no longer needed as types have been moved to libp2p.ts