Account Managers

This guide explains how to delegate social activities to an Account Manager.


An Account Manager is an EVM address authorized to sign social operations on behalf of an Account.

This allows the Account owner to maintain control while delegating the execution of social operations to one or more Account Managers.

Security Considerations

An Account Manager can sign most operations, except for those that, for security reasons, require the Account owner's signature.

The Tiered Transaction Model described in the Transaction Lifecycle guide specifies that Delegable Operations will fall back to a signed execution mode if the operation specifics require it.

For example, free collects can be signless, while paid collects will require the Account owner's signature.

Updating Account Managers is considered a sensitive operation and thus always requires the Account owner's signature. For this reason, all mutations involving Account Managers are Restricted Operations.

Add Account Managers

You can use the addAccountManager mutation to add an Account Manager for the logged-in Account.

You MUST be authenticated as Account Owner to make this request.

AddAccountManager.graphql
mutation {  addAccountManager(    request: {      address: "0x5071DeEcD24EBFA6161107e9a875855bF79f7b21"      permissions: {        canExecuteTransactions: true        canTransferTokens: false        canTransferNative: false        canSetMetadataUri: true      }    }  ) {    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

where:

  • canExecuteTransactions: Indicates whether the new Account Manager can execute transactions.

  • canTransferTokens: Indicates whether the new Account Manager can transfer tokens.

  • canTransferNative: Indicates whether the new Account Manager can transfer native tokens.

  • canSetMetadataUri: Indicates whether the new Account Manager can set the Account's Metadata URI.

Now, you can submit and monitor the transaction as explained in the Transaction Lifecycle guide.

Remove Account managers

You can use the removeAccountManager mutation to remove an Account Manager from the logged-in Account.

You MUST be authenticated as Account Owner to make this request.

RemoveAccountManager.graphql
mutation {  removeAccountManager(    request: { manager: "0x5071DeEcD24EBFA6161107e9a875855bF79f7b21" }  ) {    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Now, you can submit and monitor the transaction as explained in the Transaction Lifecycle guide.

Update Account Manager Permissions

You can use the updateAccountManager mutation to update an Account Manager's permissions.

You MUST be authenticated as Account Owner to make this request.

UpdateAccountManager.graphql
mutation {  updateAccountManager(    request: {      manager: "0x5071DeEcD24EBFA6161107e9a875855bF79f7b21"      permissions: {        canExecuteTransactions: true        canTransferTokens: false        canTransferNative: false        canSetMetadataUri: true      }    }  ) {    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Now, you can submit and monitor the transaction as explained in the Transaction Lifecycle guide.

Signless Experience

By leveraging the Account Manager feature, you can enable a signless experience for social interactions through the Lens API.

Use the enableSignless mutation to set up the Lens API as Account Manager for your Account.

You MUST be authenticated as Account Owner to make this request.

EnableSignless.graphql
mutation {  enableSignless {    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Then, submit and monitor the transaction as explained in the Transaction Lifecycle guide.

Use the removeSignless mutation to disable the signless experience.

You MUST be authenticated as Account Owner to make this request.

RemoveSignless.graphql
mutation {  removeSignless {    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

And submit and monitor the transaction as explained in the Transaction Lifecycle guide.

List Account Managers

You can use the paginated accountManagers query to list the Account Managers for the logged-in Account.

You MUST be authenticated as Account Owner or Account Manager to make this request.

query {  accountManagers {    items {      # The address of the account manager.      manager
      # Whether the account manager is a Lens manager.      isLensManager
      # The permissions the account manager has.      permissions {        canExecuteTransactions        canTransferTokens        canTransferNative        canSetMetadataUri      }
      # The date the account manager was added.      addedAt    }    pageInfo {      prev      next    }  }}

where:

  • manager: The address of the Account Manager.

  • isLensManager: Indicates whether the Account Manager is a Lens API Manager for Signless Experience.

  • permissions: The permissions the Account Manager has.

  • addedAt: The date time the Account Manager was added to the Account.

See the Pagination guide for more information on how to handle paginated results.