Skip to content
Alchemy Logo

buildSessionKeysToRemoveStruct

function buildSessionKeysToRemoveStruct<TTransport, TChain, TAccount>(
  client,
  args,
): Promise<object[]>;

Defined in: account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts:33

Finds predecessors for each provided key and returns them in the struct ISessionKeyPlugin.SessionKeyToRemove[].

import { buildSessionKeysToRemoveStruct } from "@account-kit/smart-contracts";
 
const client = createSmartAccountClient(...);
 
const keysToRemove = await buildSessionKeysToRemoveStruct(client, {
 keys: ["0x...", "0x..."],
});

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends undefined | Chain

undefined | Chain

TAccount extends undefined | SmartContractAccount

undefined | SmartContractAccount

ParameterTypeDescription

client

Client<TTransport, TChain, TAccount>

The client instance used to interact with the smart account

args

BuildSessionKeysToRemoveStructParams

Arguments to configure the session key removal process

Promise<object[]>

A promise that resolves to an array of objects each containing a session key and its predecessor

Was this page helpful?