> ## Documentation Index
> Fetch the complete documentation index at: https://build.onswig.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Recovery

Once recovery is configured, the runtime flow is straightforward.

## Start recovery

The guardian starts a recovery with:

<CodeGroup dropdown>
  ```typescript TypeScript theme={null}
  const start = await wallet.recovery.start({
    feePayer,
    guardianPubkey: guardianPublicKey,
    newAuthority: newAuthorityPublicKey,
  });
  ```

  ```python Python theme={null}
  start = await wallet.recovery.start(
      fee_payer=fee_payer,
      guardian_pubkey=guardian_public_key,
      new_authority=new_authority_public_key,
  )
  ```
</CodeGroup>

## Cancel recovery

The current wallet authority cancels a pending recovery with:

<CodeGroup dropdown>
  ```typescript TypeScript theme={null}
  const cancel = await wallet.recovery.cancel({
    feePayer,
  });
  ```

  ```python Python theme={null}
  cancel = await wallet.recovery.cancel(fee_payer=fee_payer)
  ```
</CodeGroup>

## Execute recovery

After the configured delay, the guardian executes recovery with:

<CodeGroup dropdown>
  ```typescript TypeScript theme={null}
  const execute = await wallet.recovery.execute({
    feePayer,
    newAuthority: newAuthorityPublicKey,
  });
  ```

  ```python Python theme={null}
  execute = await wallet.recovery.execute(
      fee_payer=fee_payer,
      new_authority=new_authority_public_key,
  )
  ```
</CodeGroup>

## Signing model

* the guardian signs `start`
* the current wallet authority signs `cancel`
* the guardian signs `execute`

## Policy metadata

The SDK can also read policy metadata through `swig.wallets.getPolicy(policyId)`.
That is where it finds fields like:

* `guardianEnabled` / `guardian_enabled`
* `guardianAuthority` / `guardian_authority`
* `guardianDelaySeconds` / `guardian_delay_seconds`

Most apps should still rely on `created.recoverySetup` as the setup source of
truth and treat policy reads as supporting metadata.
