Creating a Layer with an Effectful Value in Effect Typescript

What would be the correct way of creating a
Layer
that requires an Effectful value? Here is the specific code snippet,
export class Protocol extends Effect.Service<Protocol>()("...", {
    effect: Effect.gen(function* () {
        const { url } = yield* Env;
        const host = Redacted.value(url);

        return RpcClient.layerProtocolHttp({
            url: host,
        });
    }),
    dependencies: [Env.Default]
}) { }
Was this page helpful?