Companion

object Companion

Functions

Link copied to clipboard

The proof wire holds, or null when wire is not a version-1 kuilt/admit-proof layout followed by 64 bytes. Checks the layout and every field's form — the key's syntax, well-formed UTF-8, a Challenge.NONCE_SIZE-byte nonce, an empty channel binding — but not the signature: that is isSignedBy. Never throws.

Link copied to clipboard
suspend fun sign(joiner: DeviceKey, roomId: String, hostKey: DidKey, hostPeerId: String, joinerPeerId: String, deviceId: String?, hostNonce: ByteArray): AdmissionProof

The proof joiner signs to answer a challenge from hostKey at hostPeerId, carrying that challenge's hostNonce. A null deviceId is written as the empty string, so the two cannot be told apart afterwards.