Handle owners

You can easily add, remove or get all your wallet owners.

You can easily get/add/remove all the owners of your smart wallet.

The getEnrichedOwners method allows you to get more infos regarding your passkey owners (device information, creationDate...).

Add owners

const smartAccountClient = createSmartAccountClient({
    account: smartAccount,
    entryPoint: ENTRYPOINT_ADDRESS_V07,
    chain: arbitrumSepolia,
    bundlerTransport: http(bundlerUrl)
})

const txHash = await smartAccountClient.addOwner({ownerToAdd: ADDRESS_TO_ADD});

Remove owners

const smartAccountClient = createSmartAccountClient({
    account: smartAccount,
    entryPoint: ENTRYPOINT_ADDRESS_V07,
    chain: arbitrumSepolia,
    bundlerTransport: http(bundlerUrl)
})

const txHash = await smartAccountClient.removeOwner({ownerToRemove: ADDRESS_TO_REMOVE});

Get owners

const smartAccountClient = createSmartAccountClient({
    account: smartAccount,
    entryPoint: ENTRYPOINT_ADDRESS_V07,
    chain: arbitrumSepolia,
    bundlerTransport: http(bundlerUrl)
})

// get all owners
const owners = smartAccountClient.getOwners()

// get owners with passkey details (creation date, device data...)
const owners = smartAccountClient.getEnrichedOwners()

Last updated