Useful as an account owner when signing happens elsewhere (e.g. a server-held
session signer), so the SDK can read from the account without holding a key.
Import
import { toViewOnlyAccount } from '@rhinestone/sdk/utils'
Usage
import { toViewOnlyAccount } from '@rhinestone/sdk/utils'
const account = await sdk.createAccount({
owners: { type: 'ecdsa', accounts: [toViewOnlyAccount(userAddress)] },
})
Parameters
Returns
A viem account that can be read from but not signed with