getDelegationExpiry
Read the raw expiry timestamp stored in the delegations mapping.
import { getDelegationExpiry } from "@symmio/trading-core";
const expiryTimestamp = await getDelegationExpiry(config, {
account: "0xaccount...",
delegate: "0xdelegate...",
selector: "0x501e891f",
});Parameters
accountAddressrequiredAccount that owns the delegation.
delegateAddressrequiredDelegated signer being checked.
selectorHexrequiredFunction selector (bytes4) being checked.
chainIdnumberoptionalOptional chain override.
Returns
bigintRaw delegation expiry as a Unix timestamp in seconds.
Query options
import { getDelegationExpiryQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getDelegationExpiryQueryOptions(config, { account, delegate, selector }));GetDelegationExpiryOptions requires account, delegate, and selector; the factory does not accept missing inputs or validate them inside queryFn. The getDelegationExpiryQueryKey builder still accepts partial inputs for cache matching and invalidation.
Last updated on