Alchemy Logo

updateMultiOwnerLightAccountOwners

const updateMultiOwnerLightAccountOwners: <
  TTransport,
  TChain,
  TSigner,
  TAccount,
>(
  client,
  args,
) => Promise<Hex>;

Defined in: account-kit/smart-contracts/src/light-account/actions/updateOwners.ts:51

Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones.

import {
  updateOwners,
  createLightAccountClient,
} from "@account-kit/smart-contracts";
 
const lightAccountClient = createLightAccountClient({
  signer,
  transport,
  chain,
});
 
const txHash = await updateOwners(lightAccountClient, {
  ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners
  ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners
  waitForTxn: true, // set to false to return a uoHash instead
});

| Type Parameter | Default type | | :--------------------------------------- | :--------------------------------------------------------------------------------------- | ----------- | ----------- | ---------------------------------------------------------------------------------------- | ----------- | | TTransport extends Transport | Transport | | TChain extends Chain | undefined | Chain | undefined | | TSigner extends SmartAccountSigner | SmartAccountSigner | | TAccount extends | accountLoupeActions<TSigner> | undefined | | accountLoupeActions<TSigner> | undefined |

ParameterTypeDescription
clientClient<TTransport, TChain, TAccount>The client instance used to interact with the account
argsUpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>The parameters for updating the account owners

Promise<Hex>

A promise that resolves to the transaction hash or the full transaction result if waitForTxn is true

Was this page helpful?