Type Alias ISemaphoreAdapterState

ISemaphoreAdapterState: {
    acquiredSlots: Map<string, Date | null>;
    limit: number;
}

Represents the persistent state of a semaphore in storage. Contains information about the slot limit and currently acquired slots with their expiration times.

IMPORT_PATH: "@daiso-tech/core/semaphore/contracts"

Type declaration

  • acquiredSlots: Map<string, Date | null>

    A map of currently acquired slot IDs to their expiration dates. A null value indicates an indefinite slot with no expiration. Iteration order is not guaranteed and should not be relied upon.

  • limit: number

    Maximum number of slots available in this semaphore.