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
Account that grants the delegation. The connected wallet must own this account.
delegatedSignerAddressrequiredSigner that may call the selected Instant Layer functions.
selectorsreadonly Hex[]requiredFunction selectors (bytes4[]) to grant.
expiryTimestampbigintrequiredExpiry timestamp in seconds.
chainIdnumberoptionalOptional chain override.
simulateBeforeWritebooleanoptionalDry-run via simulateContract first (defaults to the config’s setting, itself true by default).
Returns
HashThe submitted transaction hash. Dry-run without sending via simulateGrantDelegation(config, params).
Last updated on