Skip to content

experimental_createAccount

Creates a new Account.

Request

type Request = {
  method: 'experimental_createAccount',
  params: [{ 
    /** Chain ID to create the account on. */
    chainId?: Hex.Hex
    /** Label for the account. Used as the Passkey credential display name. */
    label?: string 
  }]
}

Response

Address of the created account.

type Response = `0x${string}`

Example

import { Porto } from 'porto'
 
const { provider } = Porto.create()
 
const account = await provider.request({ 
  method: 'experimental_createAccount', 
  params: [{ label: 'My Example Account' }], 
})