> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded wallets: delegated access

> The React SDK managed delegated signing through its hooks and widget. In the JavaScript SDK you check, grant, and revoke delegated access with explicit functions and hooks.

Delegated access lets your backend sign for a user's embedded (WaaS) wallet without prompting them each time — for automations, scheduled actions, or server-side flows the user opts into. The React SDK drove this through its hooks; the JavaScript SDK exposes the same operations directly so you place the consent and revoke UI yourself.

Building the status/grant/revoke UI is the same in any JavaScript SDK app, so it isn't repeated here: [**Embedded wallet delegated access** (Building UI)](/docs/javascript/building-ui/embedded-wallet-delegated-access) covers it with full code. This page is the React→JavaScript translation plus the migration-specific behavior.

## What maps to what

| React SDK                          | JavaScript SDK                                           |
| ---------------------------------- | -------------------------------------------------------- |
| delegated-access status from hooks | `hasDelegatedAccess()`                                   |
| grant delegated signing            | `delegateWaasKeyShares()` / `useDelegateWaasKeyShares()` |
| revoke delegated signing           | `revokeWaasDelegation()` / `useRevokeWaasDelegation()`   |

## Migration-specific behavior

* **Status is a synchronous boolean.** `hasDelegatedAccess({ walletAccount })` returns `true`/`false` — use it to decide whether to show the grant or the revoke action and to label the current state.
* **Grant and revoke resolve on success.** `delegateWaasKeyShares()` and `revokeWaasDelegation()` are mutations; confirm the outcome in your UI (e.g. "Delegated access enabled" / "revoked") and re-read `hasDelegatedAccess()` to flip the state. Pass the wallet `password` when your project protects wallets with one.
* **Consent is on you.** The widget bundled the consent copy; now you own it — grant only after explicit, informed consent and keep revoking easy.

<Warning>
  Delegated access means your backend can sign without the user present. Explain exactly what it enables, keep it opt-in, and make revoking easy.
</Warning>

## Errors you now own

| Situation                           | What to do                                                                       |
| ----------------------------------- | -------------------------------------------------------------------------------- |
| `hasDelegatedAccess` already `true` | Show the revoke action instead of grant.                                         |
| Wrong password on grant/revoke      | Ask the user to re-enter the wallet password; nothing changes.                   |
| Grant rejected by the user          | Leave delegated access off and don't proceed with the automation that needed it. |

## See also

* [Embedded wallet delegated access (Building UI)](/docs/javascript/building-ui/embedded-wallet-delegated-access) — the full status, grant, and revoke build
* [Embedded wallets: password & security](/docs/javascript/migrating-from-react/embedded-wallets-password-security) — the password some grant/revoke operations require
* [Embedded wallets: backup & recovery](/docs/javascript/migrating-from-react/embedded-wallets-backup-recovery) — protecting the same wallets
* [Transactions & balance](/docs/javascript/migrating-from-react/transactions-and-balance) — how signing works when the user is present
