import "./decorateParam-BWxkAUSj.js";
import { t as __decorate } from "./decorate-CXWmflG_.js";
import { a as PairingConfigFactory, c as PairingConfigToken, n as InternalHmacAuthMiddleware, o as PairedFetch, r as IncomingHmacVerifier, s as HmacRequestSigner, t as InternalPingRegistrar } from "./InternalPingRegistrar-BavAAnvk.js";
import { injectable } from "@codemation/core";

//#region src/pairing/InMemoryHmacNonceStore.ts
let InMemoryHmacNonceStore = class InMemoryHmacNonceStore$1 {
	store = /* @__PURE__ */ new Map();
	async recordIfNew(nonce, expiresAt) {
		const nowSec = Math.floor(Date.now() / 1e3);
		for (const [key, expirySec] of this.store.entries()) if (expirySec <= nowSec) this.store.delete(key);
		if (this.store.has(nonce)) return false;
		this.store.set(nonce, Math.floor(expiresAt.getTime() / 1e3));
		return true;
	}
};
InMemoryHmacNonceStore = __decorate([injectable()], InMemoryHmacNonceStore);

//#endregion
export { HmacRequestSigner, IncomingHmacVerifier, InternalHmacAuthMiddleware, InternalPingRegistrar, PairedFetch, PairingConfigFactory, PairingConfigToken };
//# sourceMappingURL=pairing.js.map