@distilled.cloud/unkey
v1.0.0-rc.15
Published
Keywords
Readme
@distilled.cloud/unkey
Effect-native SDK for unkey.
Installation
npm install @distilled.cloud/unkey effectQuick start
import { Effect, Layer } from "effect";
import * as FetchHttpClient from "effect/http/FetchHttpClient";
import * as Unkey from "@distilled.cloud/unkey";
const program = Effect.gen(function* () {
const result = yield* Unkey.apisListKeys({ apiId: "api_123" });
return result;
});
const Live = Layer.mergeAll(
FetchHttpClient.layer,
Unkey.CredentialsFromEnv,
Unkey.UnkeyProtocol,
);
program.pipe(Effect.provide(Live), Effect.runPromise);Auth
Required: UNKEY_ROOT_KEY. Optional: UNKEY_API_BASE_URL. Sent as Authorization: Bearer.
