Skip to content

experimental_getAdmins

Returns the admins of an account.

Request

type Request = {
  method: 'experimental_getAdmins',
  params: [{
    /** Address of the account to list admins on. */
    address?: `0x${string}`
  }]
}

Response

type Response = { 
  /** Address of the account. */
  address: `0x${string}`,
  /** Chain ID. */
  chainId: `0x${string}`,
  /** Admins of the account. */
  keys: {
    /** ID. */
    id: `0x${string}`,
    /** Public key. */
    publicKey: `0x${string}`,
    /** Type. */
    type: 'address' | 'p256' | 'secp256k1' | 'webauthn-p256',
  }[],
}[]

Example

import { Porto } from 'porto'
 
const { provider } = Porto.create()
 
const admins = await provider.request({ 
  method: 'experimental_getAdmins', 
})