index ↓

peer

client.peer

Every device the daemon knows about, with its pairing and companion-app connection state.

events

the daemon pushes these unprompted. subscribing returns an unsubscribe function

onSnapshot(handler: (PeerSnapshotMap) => void): () => void

const off = client.peer.onSnapshot((peerSnapshotMap) => {
  // peerSnapshotMap: PeerSnapshotMap
});
// call off() to unsubscribe

types

shapes referenced above, as the sdk types them

Every known peer, keyed by peer id.

type PeerSnapshotMap = {};