lotus-sdk
Version:
Central repository for several classes of tools for integrating with, and building for, the Lotusia ecosystem
38 lines • 1.61 kB
TypeScript
import type { P2PMessage, PeerInfo, IProtocolHandler, Stream, Connection } from '../types.js';
import type { MuSig2P2PCoordinator } from './coordinator.js';
import { SecurityManager } from './security.js';
export declare class MuSig2ProtocolHandler implements IProtocolHandler {
readonly protocolName = "musig2";
readonly protocolId = "/lotus/musig2/1.0.0";
private coordinator?;
private securityManager?;
private messageValidator;
private debugLog;
setCoordinator(coordinator: MuSig2P2PCoordinator): void;
setSecurityManager(securityManager: SecurityManager): void;
handleStream(stream: Stream, connection: Connection): Promise<void>;
handleMessage(message: P2PMessage, from: PeerInfo): Promise<void>;
onPeerDiscovered(peerInfo: PeerInfo): Promise<void>;
onPeerConnected(peerId: string): Promise<void>;
onPeerDisconnected(peerId: string): Promise<void>;
onPeerUpdated(peerInfo: PeerInfo): Promise<void>;
onRelayAddressesChanged(data: {
peerId: string;
reachableAddresses: string[];
relayAddresses: string[];
timestamp: number;
}): Promise<void>;
private _handleSessionJoin;
private _handleNonceCommit;
private _handleNonceShare;
private _handlePartialSigShare;
private _handleSessionAbort;
private _handleValidationError;
private _sendValidationError;
private _handleSignerAdvertisement;
private _handleSignerUnavailable;
private _handleSigningRequest;
private _handleParticipantJoined;
private _handleSessionReady;
}
//# sourceMappingURL=protocol-handler.d.ts.map