Configure an ECDSA owner
Pass a Viem account in theowners configuration:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Control a smart account with standard Ethereum keys.
owners configuration:
import { RhinestoneSDK } from '@rhinestone/sdk'
import type { Hex } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
const apiKey = process.env.RHINESTONE_API_KEY
const privateKey = process.env.OWNER_PRIVATE_KEY
if (!apiKey || !privateKey) {
throw new Error('RHINESTONE_API_KEY and OWNER_PRIVATE_KEY are required')
}
const owner = privateKeyToAccount(privateKey as Hex)
const rhinestone = new RhinestoneSDK({
auth: { mode: 'apiKey', apiKey },
})
const account = await rhinestone.createAccount({
owners: {
type: 'ecdsa',
accounts: [owner],
},
})
Was this page helpful?