Skip to main content

Module pairing

Module pairing 

Source
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§

Base64UrlEncoded
A base64url-encoded (no padding) byte string.
CreateSessionRequest
Request to create a new pairing session.
DeviceSigningMaterial
Key material loaded from the local device keychain for use in pairing operations.
JoinerPending
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.
PairingAnchorResult
The initiator’s result of anchoring a joiner’s delegated dip.
PairingResponse
A response to a pairing request from the responding device.
PairingSession
Ephemeral keypair for a pairing session.
PairingSessionParams
Parameters for initiating a new pairing session.
PairingSessionRequest
The result of building a pairing session request.
PairingToken
A pairing token for initiating cross-device identity linking.
QrOptions
QR code rendering options.
RecoveryResult
The outcome of a device recovery: a replacement device was paired and the lost device’s delegation revoked.
SubmitConfirmationRequest
Request to submit a SAS confirmation (or abort).
SubmitResponseRequest
Request to submit a pairing response.

Enums§

PairingCompletionResult
Outcome of a completed pairing operation.
PairingError
Errors from pairing operations.
PairingStatus
Progress events fired by initiate_online_pairing so 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.