Overview
Delegated access works by creating a specialized business-controlled user within each end-user’s sub-organization that has carefully scoped permissions to perform only specific actions, such as signing transactions to designated addresses. This can enable your backend to do things like:- Automate common transactions (e.g., staking, redemptions)
- Sign transactions to whitelisted addresses without user involvement
- Perform scheduled operations
- Respond to specific onchain events programmatically
Implementation flow
Here’s how to implement delegated access for an embedded wallet setup:- Create a sub-organization with two root users: The end user and your “Delegated User” with an API key authenticator that you control
- Enable the Delegated Account to take particular actions by setting policies explicitly allowing those specific actions
- Update the root quorum to ensure only the end-user retains root privileges
Step-by-step implementation
Step 1: Create a sub-organization with two root users
-
Create your sub-organization with the two root users being:
- The end-user
- A user you control (we’ll call it the ‘Delegated Account’)
Step 2: Limit the permissions of the Delegated Account user via policies
-
Create a custom policy granting the Delegated Account specific permissions. You might grant that user permissions to:
- Sign any transaction
- Sign only transactions to a specific address
- Create new users in the sub-org
- Or any other activity you want to be able to take using your Delegated Account