index/interfaces/LockTokensData.md
Data required for locking tokens on GalaChain (batch operation)
Supports locking multiple token types in a single transaction. Locked tokens cannot be transferred until unlocked by the lock authority. Useful for staking, escrow, vesting, or other hold scenarios.
Batch Behavior: Each token in the batch is processed as part of a single GalaChain transaction. The transaction either succeeds completely (all tokens locked) or fails completely (no tokens locked). However, network errors after submission may require checking transaction status to confirm the outcome.
Batch Limits: Maximum MAX_LOCK_BATCH_SIZE tokens per operation (default: 100).
Note: Lock parameters (lockAuthority, expires, name) from the first token with those fields set apply to the entire batch - GalaChain locks support only one set of parameters per transaction.
Properties
| Property | Type | Description |
|---|---|---|
privateKey? | string | Optional private key override for this operation (format: '0x' + 64 hex characters) |
tokens | LockTokenEntry[] | Array of tokens to lock (each with tokenId or tokenName, amount, and optional lock parameters) |
uniqueKey? | string | Optional unique key for idempotency - auto-generated if not provided |
private key lock token entry unique