Skip to Content
Symmio Frontier — the SDK surface for builders on HyperEVM
CoreInstantLayer

InstantLayer

The InstantLayer contract manages delegated signer access for instant actions. SYMM Frontier exposes the delegation reads as separate APIs: one reads the raw expiry timestamp from delegations, and one reads the contract’s computed active status from isDelegationActive.

Contract reference: SYMMIO perps-core v0.8.5 docs .

Reads

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

NameTypeDefaultNotes
accountAddressrequiredAccount that owns the delegation.
delegateAddressrequiredDelegated signer being checked.
selectorHexrequiredFunction selector as bytes4, for example 0x...
chainIdnumber?config defaultOptional chain override.

Returnsbigint, the Unix timestamp in seconds.

getIsDelegationActive

Read whether the contract considers a delegation active.

import { getIsDelegationActive } from "@symmio/trading-core"; const isActive = await getIsDelegationActive(config, { account: "0xaccount...", delegate: "0xdelegate...", selector: "0x501e891f", });

Parameters

NameTypeDefaultNotes
accountAddressrequiredAccount that owns the delegation.
delegateAddressrequiredDelegated signer being checked.
selectorHexrequiredFunction selector as bytes4.
chainIdnumber?config defaultOptional chain override.

Returnsboolean.

Query Options

Use these when integrating with TanStack Query outside React:

import { getDelegationExpiryQueryOptions, getIsDelegationActiveQueryOptions } from "@symmio/trading-core"; const expiryOptions = getDelegationExpiryQueryOptions(config, { account, delegate, selector, }); const activeOptions = getIsDelegationActiveQueryOptions(config, { account, delegate, selector, });

GetDelegationExpiryOptions and GetIsDelegationActiveOptions require account, delegate, and selector. The factories do not accept missing read inputs and do not validate them inside queryFn.

The query-key builders still accept partial inputs:

import { getDelegationExpiryQueryKey, getIsDelegationActiveQueryKey } from "@symmio/trading-core"; getDelegationExpiryQueryKey({ account, delegate }); getIsDelegationActiveQueryKey({ account, delegate });

Partial keys are for cache matching and invalidation, not for calling the read query.

Write

grantDelegation

Grant a delegated signer access to one or more selectors until an expiry timestamp.

import { grantDelegation } from "@symmio/trading-core"; const hash = await grantDelegation(config, { account: { addr: account, isPartyB: false }, delegatedSigner: delegate, selectors: ["0x501e891f"], expiryTimestamp: 1_766_000_000n, });

Parameters

NameTypeNotes
accountInstantLayerAccountAccount identity passed to the contract. PartyA/user accounts use isPartyB: false.
delegatedSignerAddressSigner receiving delegated access.
selectorsreadonly Hex[]Function selectors to delegate.
expiryTimestampbigintUnix timestamp in seconds.
chainIdnumber?Optional chain override.

ReturnsHash.

Last updated on