Skip to content

Auth delegation example #2518

Description

@leighmcculloch

No dedicated example contract or page demonstrating the full CAP-71 auth delegation flow using env.custom_account().get_delegated_signers() and env.custom_account().delegate_auth(). The complex-account page has a brief introduction but a full worked example (like the ModularAccount pattern from the SDK tests) would help developers understand the pattern.

New API surface:

  • Env::custom_account()CustomAccount (only callable within __check_auth)
  • CustomAccount::get_delegated_signers() -> Vec<Address> — reads user-provided delegated signers from the auth entry
  • CustomAccount::delegate_auth(&address) — forwards __check_auth context to a delegate (delegation is recursive)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions