Delegated Signing
Delegated signing allows developers to sign and send transactions on behalf of an end user without requiring the end user to be present at signing time. This is useful for background operations, automated workflows, and scenarios where the developer’s server needs to act on the end user’s behalf. To use delegated signing, the end user must first create a short-lived delegation grant by authenticating with their access token and Temporary Wallet Secret. The grant specifies anexpiresAt timestamp that defines how long the developer is authorized to sign on the end user’s behalf.
Once a delegation grant is active, the developer’s server can use its CDP API key to perform signing operations for that end user. The delegation middleware transparently validates that an active (non-expired, non-revoked) grant exists for the {project, user} pair before allowing the operation to proceed.
Grant lifecycle:
- Delegation grants are scoped to a single project and end user pair.
- Grants are time-bounded by the
expiresAttimestamp and are automatically cleaned up after expiration. - Grants can be revoked early by either the end user (using their access token and TWS) or the
developer (using their API key), via the
RevokeDelegationForEndUserendpoint. - Only one active grant can exist per
{project, user}pair at a given time.