Skip to main content
This API is experimental and may change in a future release.
Use this to reconstruct the initData for an account originally created with the Rhinestone SDK, then pass it back into createAccount instead of providing the factory and factory data manually.

Import

import { experimental_getRhinestoneInitData } from '@rhinestone/sdk/utils'

Usage

import { experimental_getRhinestoneInitData } from '@rhinestone/sdk/utils'

const initData = experimental_getRhinestoneInitData({
  owners: { type: 'ecdsa', accounts: [owner] },
})

const account = await sdk.createAccount({
  owners: { type: 'ecdsa', accounts: [owner] },
  initData,
})

Parameters

config
RhinestoneAccountConfig
required
Account configuration

Returns

rhinestoneInitData
object | { address: `0x${string}` }
The account address, plus factory data when the account is not yet deployed