Import packages/plugin/src/types.ts
This commit is contained in:
parent
26b4ba7807
commit
951290d47f
|
|
@ -0,0 +1,20 @@
|
|||
import type { RemoteMessage } from '@dsh-remote/protocol'
|
||||
|
||||
export interface AuthenticatedPeerChannel {
|
||||
/**
|
||||
* Attestation supplied by the Noise/control-plane integration. Implementors
|
||||
* must expose this channel only after both the Noise IK transcript and the
|
||||
* Server membership for this exact connection have been verified.
|
||||
*/
|
||||
readonly security: {
|
||||
protocol: 'Noise_IK_25519_ChaChaPoly_SHA256'
|
||||
connectionId: string
|
||||
membershipId: string
|
||||
}
|
||||
readonly peerDeviceId: string
|
||||
readonly peerIdentityKey: string
|
||||
readonly mode?: 'LAN' | 'P2P' | 'TURN' | 'Relay'
|
||||
send(message: RemoteMessage): Promise<void>
|
||||
onMessage(handler: (message: RemoteMessage) => void): () => void
|
||||
close(code?: string): Promise<void>
|
||||
}
|
||||
Loading…
Reference in New Issue