Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreInstantLayergrantDelegations

grantDelegations

Grant several delegated signers of one account in a single call — InstantLayer.grantDelegations. Each entry keeps its own selectors and expiry.

import { grantDelegations } from "@symmio/trading-core"; const hash = await grantDelegations(config, { account: { addr: subAccount, isPartyB: false }, delegations: [ { delegatedSigner: sessionKey, selectors: sessionKeySelectors, expiryTimestamp }, { delegatedSigner: tpslExecutor, selectors: tradingSelectors, expiryTimestamp }, ], gasless: true, });

Reach for it when one setup step authorizes more than one signer, for example a session key for trading and a TP/SL executor for conditional orders. Relayed, the whole grant is one owner signature instead of one per delegate; from the wallet, it is one transaction. To grant a single signer, grantDelegation is enough.

Like grantDelegation, a grant clears any pending revocation for the selectors it covers.

The InstantLayer must have grantDelegations, which perps-core v0.8.6 added on 2026-09-04. A deployment older than that reverts with no matching function. The SDK cannot tell from config, so gate the UI on your knowledge of the deployment.

Parameters

accountInstantLayerAccountrequired

The PartyA account that grants every delegation. The connected wallet must own it. The contract applies all entries to this one account, so a PartyB account is rejected before any prompt with GRANT_DELEGATIONS_PARTYB_UNSUPPORTED.

delegationsreadonly GrantDelegationsEntry[]required

One entry per delegate: { delegatedSigner, selectors, expiryTimestamp }. Must not be empty; an empty list is rejected before any prompt with GRANT_DELEGATIONS_EMPTY.

chainIdnumberoptional

Optional chain override.

simulateBeforeWritebooleanoptional

Dry-run via simulateContract first (defaults to the config’s setting, itself true by default). Ignored on the relayed path, where the relayer simulates its own bundle.

gaslessboolean | GaslessWriteOptionsoptional

Relay the grant instead of sending a transaction. Omitted, the chain’s gasless.execution.mode decides. See relayable writes.

Returns

Hash

The submitted transaction hash. A relayed grant returns the relayer’s broadcast hash, which behaves exactly like a wallet-submitted one. Dry-run without sending via simulateGrantDelegations(config, params).

In a gasless batch

grantDelegations is a relayable write, so a gasless batch can carry it by name. A call later in the same batch can then be signed by one of the delegates it grants: the batch executes in order, so the grant lands first. That is the one-signature setup — the owner signs the grant, and the new session key silently signs the rest. See mixing signers.

Last updated on