function transferLightAccountOwnership<TTransport, TChain, TSigner, TAccount>(
client,
args,
): Promise<`0x${string}`>;Defined in: account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts:51
Transfers the ownership of a light account to a new owner. This function ensures that the client is a compatible smart acccount client and that a Light Account is provided. If the waitForTxn parameter is true, it will wait for the transaction to be completed before returning.
import {
transferOwnership,
createLightAccountClient,
} from "@account-kit/smart-contracts";
const lightAccountClient = createLightAccountClient({
signer,
transport,
chain,
});
const txHash = await transferOwnership(lightAccountClient, {
newOwner: newOwnerSigner,
waitForTxn: true, // set to false to return a uoHash instead
});| Type Parameter | Default type |
|---|---|
| |
|
|
|
|
|
|
| Parameter | Type | Description |
|---|---|---|
|
| The smart account client instance used to execute the transfer |
|
| The parameters for transferring ownership |
Promise<`0x${string}`>
The transaction or UO hash as a Hex string