mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-15 13:23:23 +00:00
Implement RondevuAPI and RondevuSignaler classes
Added comprehensive API client and signaling implementation: **RondevuAPI** - Single class for all Rondevu endpoints: - Authentication: register() - Offers: createOffers(), getOffer(), answerOffer(), getAnswer(), searchOffers() - ICE Candidates: addIceCandidates(), getIceCandidates() - Services: publishService(), getService(), searchServices() - Usernames: checkUsername(), claimUsername() **RondevuSignaler** - ICE candidate exchange: - addIceCandidate() - Send local candidates to server - addListener() - Poll for remote candidates (1 second intervals) - Returns cleanup function (Binnable) to stop polling - Handles offer expiration gracefully **WebRTCRondevuConnection** - WebRTC connection wrapper: - Handles offer/answer creation - Manages ICE candidate exchange via Signaler - Type-safe event bus for state changes and messages - Queue and send message interfaces **Utilities**: - createBin() - Cleanup function collector - Binnable type - Cleanup function signature All classes use the shared RondevuAPI client for consistent error handling and authentication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
23
src/index.ts
23
src/index.ts
@@ -5,12 +5,27 @@
|
||||
|
||||
export { ConnectionManager } from './connection-manager.js';
|
||||
export { EventBus } from './event-bus.js';
|
||||
export { RondevuAPI } from './api.js';
|
||||
export { RondevuSignaler } from './signaler.js';
|
||||
export { WebRTCRondevuConnection } from './connection.js';
|
||||
export { createBin } from './bin.js';
|
||||
|
||||
// Export types
|
||||
export type {
|
||||
ConnectionIdentity,
|
||||
ConnectionState,
|
||||
ConnectionInterface,
|
||||
Connection,
|
||||
QueueMessageOptions
|
||||
QueueMessageOptions,
|
||||
Message,
|
||||
ConnectionEvents,
|
||||
Signaler
|
||||
} from './types.js';
|
||||
|
||||
export type {
|
||||
Credentials,
|
||||
OfferRequest,
|
||||
Offer,
|
||||
ServiceRequest,
|
||||
Service,
|
||||
IceCandidate
|
||||
} from './api.js';
|
||||
|
||||
export type { Binnable } from './bin.js';
|
||||
|
||||
Reference in New Issue
Block a user