Expand description
Device pairing orchestration over ephemeral ECDH sessions. Device pairing orchestration.
Business logic for validating pairing codes, verifying sessions, and creating device attestations. All presentation concerns (spinners, passphrase prompts, console output) remain in the CLI.
Structs§
- Base64
UrlEncoded - A base64url-encoded (no padding) byte string.
- Create
Session Request - Request to create a new pairing session.
- Device
Signing Material - Key material loaded from the local device keychain for use in pairing operations.
- Joiner
Pending - Joiner-side pairing state held between submitting the response and confirming the anchor. Carries the freshly-generated dip and the device’s keys so they can be persisted once the initiator’s anchor is verified.
- Pairing
Anchor Result - The initiator’s result of anchoring a joiner’s delegated dip.
- Pairing
Response - A response to a pairing request from the responding device.
- Pairing
Session - Ephemeral keypair for a pairing session.
- Pairing
Session Params - Parameters for initiating a new pairing session.
- Pairing
Session Request - The result of building a pairing session request.
- Pairing
Token - A pairing token for initiating cross-device identity linking.
- QrOptions
- QR code rendering options.
- Recovery
Result - The outcome of a device recovery: a replacement device was paired and the lost device’s delegation revoked.
- Submit
Confirmation Request - Request to submit a SAS confirmation (or abort).
- Submit
Response Request - Request to submit a pairing response.
Enums§
- Pairing
Completion Result - Outcome of a completed pairing operation.
- Pairing
Error - Errors from pairing operations.
- Pairing
Status - Progress events fired by
initiate_online_pairingso the CLI can update spinners.
Functions§
- anchor_
pairing_ response - Initiator: anchor a joiner’s delegated dip received during pairing.
- build_
delegated_ join_ response - Build the joiner’s pairing response carrying a freshly-generated delegated dip.
- build_
pairing_ session_ request - Build a pairing session and its registry registration payload.
- finalize_
delegated_ join - Confirm the initiator’s anchor and persist the device’s KEL and key.
- initiate_
online_ pairing - Orchestrate an online pairing session: register, wait for approval, complete attestation.
- join_
pairing_ session - Orchestrate joining a pairing session as a delegated device.
- load_
controller_ did - Load the controller DID from a pre-initialized identity storage adapter.
- load_
device_ signing_ material - Load device signing material from the local keychain via the context’s injected providers.
- normalize_
short_ code - Normalize a short code: uppercase, strip spaces/dashes.
- recover_
device - Recover from a lost/stolen device: pair a replacement delegated device, then revoke the old device’s delegation.
- render_
qr - Render a pairing token as a QR code string for terminal display.
- validate_
short_ code - Validate and normalize a pairing short code.
- verify_
device_ did - Verify that a derived device DID matches the claimed DID.
- verify_
session_ status - Verify that a pairing session is in the correct state for pairing.