Tooling
Module SDK
Modules
getAllowedSelectors

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

getAllowedSelectors

Get the list of function selectors that are allowed for recovery operations on an account.

Usage

const selectors = await getAllowedSelectors({
  account: {
    address: '0x123...',
    type: 'safe',
    deployedOnChains: [8453],
    initCode: '0x...' // optional
  },
  client: publicClient,
})

Parameters

account

The account object.

client

  • Type: PublicClient

The public client instance used to interact with the blockchain.

Returns

selectors

  • Type: Promise<readonly Hex[]>

Returns an array of 4-byte function selectors that correspond to allowed recovery operations. The array indices match the validator indices from getAllowedValidators.

If the contract call fails, returns an empty array.