import { Effect } from "effect";
import { MeridianClient, importAesGcmKey } from "meridian-sdk";
const key = await importAesGcmKey(process.env.SECRET_KEY!);
const client = await Effect.runPromise(
MeridianClient.create({
url: "wss://your-server.com",
namespace: "my-app",
token,
encryption: { "or:secret-*": key },
})
);
const tags = client.orset("or:secret-tags");
tags.add("confidential"); // wire value is encrypted — server never sees "confidential"
tags.remove("confidential"); // works correctly across all clients
console.log(tags.elements()); // ["confidential"] — decrypted locally