// Generated by bynkc — do not edit by hand.
// composition root for `kv.index` Worker.

import { type KVNamespace, type ServiceBinding } from "../../runtime.js";
import * as handlers from "./handlers.js";
import * as bynk_cloudflare__binding from "../../bynk/cloudflare.binding.js";

export interface Env {
  KV: KVNamespace;
}

export function compose(env: Env) {
  const Kv = new bynk_cloudflare__binding.WorkersKv(env);
  const deps = { Kv };
  return {
    async allKeys(unused: any) {
      return handlers.allKeys.call(unused, deps);
    },
    async cache(key: any, e: any) {
      return handlers.cache.call(key, e, deps);
    },
    async scan(prefix: any) {
      return handlers.scan.call(prefix, deps);
    },
  };
}
