finalizeRevokeDelegation
Complete a scheduled revocation, deleting the stored delegation. This is the second of the Instant Layer’s two revocation steps.
import { finalizeRevokeDelegation } from "@symmio/trading-core";
const hash = await finalizeRevokeDelegation(config, {
account: { addr: subAccount, isPartyB: false },
delegate: sessionKeyAddress,
selectors,
});This write cannot be relayed, and takes no gasless option. _verifyOperation routes every operation targeting
the Instant Layer itself to _verifyGrantOperation, which accepts only grantDelegation / grantDelegations. See
initiateRevokeDelegation.
Permissionless
Unlike the initiating step, anyone may call this once the cooldown ETA has passed — a keeper, a backend, or the user’s own wallet can finish a revocation the owner started.
It reverts RevocationCooldownNotOver while the ETA is still in the future, and silently skips any selector that was never scheduled. Gate the call on getPendingRevocationEtas — every scheduled ETA in the probed set must have passed, or the whole transaction reverts.
Enforcement already stops honoring the delegation the moment the ETA passes, so this call is the bookkeeping leg rather than the moment authority ends. Do not present it to users as “the revoke” — by the time it can be sent, the key has already lost its authority.
It is optional
Skipping this call leaves a revoked key just as powerless: _verifyOperation checks isDelegationActive on every operation, and that returns false once the ETA passes. All this write does is delete the storage slots.
It is not a prerequisite for re-granting either. grantDelegation deletes pendingRevocationEta for every selector it grants, so a schedule left unfinalized cannot silently neuter a fresh grant.
Surface it as optional cleanup, and only while something is actually scheduled — a permanently visible “finalize” control implies a step the user must take, then greys out with nothing to explain itself.
Parameters
accountInstantLayerAccountrequiredThe account the delegation was granted under.
delegateAddressrequiredThe delegated signer whose scheduled revocation is being completed.
selectorsreadonly Hex[]requiredFunction selectors (bytes4[]) to clear.
chainIdnumberoptionalOptional chain override.
fromAddressoptionalSigner override passed to the wallet-client resolver.
simulateBeforeWritebooleanoptionalDry-run the call first. Defaults to the config’s setting.
Returns
HashMutation options
import { finalizeRevokeDelegationMutationOptions } from "@symmio/trading-core";
import { useMutation } from "@tanstack/react-query";
useMutation(finalizeRevokeDelegationMutationOptions(config));The React binding is useFinalizeRevokeDelegation.