You can easily add, remove or get all your wallet owners.
Last updated 2 months ago
You can easily get/add/remove all the owners of your smart wallet.
The method allows you to get more infos regarding your passkey owners (device information, creationDate...).
const smartAccountClient = createSmartAccountClient({ account: smartAccount, chain: arbitrumSepolia, bundlerTransport: http(bundlerUrl), paymaster: paymasterClient, userOperation: { estimateFeesPerGas: async () => { return await paymasterClient.getUserOperationGasPrice(); }, } }) const txHash = await smartAccountClient.addOwner({ownerToAdd: ADDRESS_TO_ADD});
const smartAccountClient = createSmartAccountClient({ account: smartAccount, chain: arbitrumSepolia, bundlerTransport: http(bundlerUrl), paymaster: paymasterClient, userOperation: { estimateFeesPerGas: async () => { return await paymasterClient.getUserOperationGasPrice(); }, } }) const txHash = await smartAccountClient.removeOwner({ownerToRemove: ADDRESS_TO_REMOVE});
const smartAccountClient = createSmartAccountClient({ account: smartAccount, chain: arbitrumSepolia, bundlerTransport: http(bundlerUrl), paymaster: paymasterClient, userOperation: { estimateFeesPerGas: async () => { return await paymasterClient.getUserOperationGasPrice(); }, } }) // get all owners const owners = smartAccountClient.getOwners() // get owners with passkey details (creation date, device data...) const owners = smartAccountClient.getEnrichedOwners()