redeem
Exchanges a nonce for a chat handle. It ends the call, waits for your captureLeg callback to write
the call’s record, and only then issues a handle for a new leg of the same conversation, so the chat
leg starts with the call’s history.
The nonce is used up as soon as redeem() accepts it, even if what follows fails: a nonce is one
attempt. The /handoff route calls this method. A throwing endCall or captureLeg, or a capture
that outlasts captureTimeout, is logged and the handle is still issued.
Parameters
nonce
The nonce the browser presented, registered earlier with register().
Returns
Promise<string | null> — the handle, or null for a nonce that is unknown, expired, or already
used. The three can’t be told apart. The new leg’s conversation id comes from nextConversationId.
It also returns null when issuing the new handle fails. The nonce is spent by then, so it can’t be
redeemed again.