buildSessionKeysToRemoveStruct
Finds predecessors for each provided key and returns them in the struct ISessionKeyPlugin.SessionKeyToRemove[]
.
Import
import { buildSessionKeysToRemoveStruct } from "@account-kit/smart-contracts";
Usage
import { buildSessionKeysToRemoveStruct } from "@account-kit/smart-contracts";
const client = createSmartAccountClient(...);
const keysToRemove = await buildSessionKeysToRemoveStruct(client, {
keys: ["0x...", "0x..."],
});
Parameters
client
Client<TTransport, TChain, TAccount>
The client instance used to interact with the smart account
args
BuildSessionKeysToRemoveStructParams<TAccount>
Arguments to configure the session key removal process
Returns
Promise<{ sessionKey: Address; predecessor: Address }[]>
A promise that resolves to an array of objects each containing a session key and its predecessor