Skip to content

Recovery extension #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Recovery extension #735

wants to merge 15 commits into from

Conversation

Agusx1211
Copy link
Member

  • Adds and removes devices from the list of recovery keys (during login and logout)
  • Janitor -> Cron (more flexible and can be reused)
  • Allows for queuing recovery payloads
  • Allows for listening to queued recovery payloads

@Agusx1211 Agusx1211 requested a review from Copilot April 24, 2025 18:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a recovery extension that enables adding/removing devices from the list of recovery keys, queues recovery payloads, and listens to queued recovery payload updates by replacing the old janitor and integrating a new cron job mechanism.

  • Updates module topology conversion to support recovery modules
  • Introduces new recovery-related types and functions (e.g. RecoverySigner, QueuedRecoveryPayload)
  • Implements a new Cron scheduler and removes the old Janitor module

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/wallet/wdk/src/sequence/wallets.ts Updates configuration topology handling to integrate recovery options and converts modules to a list of SapientSignerLeaf
packages/wallet/wdk/src/sequence/types/signer.ts Adds RecoverySigner type
packages/wallet/wdk/src/sequence/types/signature-request.ts Adds a new 'recovery' action type
packages/wallet/wdk/src/sequence/recovery.ts Implements recovery module logic including init, add, remove, and queue/complete recovery payload functions
packages/wallet/wdk/src/sequence/manager.ts Integrates recovery and cron modules into the manager API
packages/wallet/wdk/src/sequence/cron.ts New Cron job scheduler replaces the earlier Janitor module
packages/wallet/dbs/recovery.ts Provides a new database for queued recovery payloads
packages/wallet/primitives/src/payload.ts, extensions/recovery.ts, extensions/index.ts Updates payload type definitions and adds recovery-related extension functions
Files not reviewed (2)
  • packages/wallet/wdk/package.json: Language not supported
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/wallet/wdk/src/sequence/recovery.ts:129

  • [nitpick] The variable name 'recovertLeaf' appears to be misspelled. Consider renaming it to 'recoveryLeaf' for clarity and consistency.
const recovertLeaf = raw.modules.find((m) => m.address === this.shared.sequence.extensions.recovery)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant