Skip to content

experimental_getAccountVersion

Returns the current version of an account, and the latest version an account can be upgraded to.

Request

type Request = {
  method: 'experimental_getAccountVersion',
  params: [{
    /** Address of the account to get the version of. */
    address?: `0x${string}`
  }]
}

Response

type Response = { 
  /** Current account version. */
  current: string,
  /** Latest version an account can be upgraded to. */
  latest: string,
}

Example

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