The open channel's public id. Pairing secrets stay in trusted PowerKeys UI.
Messages are end-to-end encrypted in the host; the PowerKeys relay only forwards opaque bytes. Register Channel.OnMessage to receive messages. Treat every inbound message as untrusted input from the other user. The Promise resolves after the socket ticket is fetched and the relay WebSocket is established; the peer may join later and the Noise handshake continues in the background. Ticket or WebSocket failures reject it.
Sends a message to the other peer on an open channel.
The channel id returned by Channel.Open.
The message to send. At most 65,519 UTF-8 bytes (one encrypted frame); longer messages are rejected.
Waits for a peer and Noise handshake when needed, then resolves after encryption hands the message to the socket writer; rejects if the channel closes first.
Registers a handler for messages received on any open channel. The script stays alive as long as a handler is registered.
Handler receiving each inbound message. Treat data as untrusted input.
Opens a live, end-to-end-encrypted channel to another PowerKeys user.
PowerKeys opens a trusted create/join prompt. Pairing codes and key material never enter the script runtime.