{
  "id": "@typed/id#RandomValues",
  "canonicalId": "@typed/id#RandomValues",
  "symbol": {
    "id": "@typed/id#RandomValues",
    "packageName": "@typed/id",
    "moduleName": ".",
    "exportName": "RandomValues",
    "kind": "class",
    "signatures": [
      "export declare class RandomValues extends RandomValues_base {\n    static readonly call: <const N extends number>(length: N) => Effect.Effect<Uint8Array & {\n        readonly length: N;\n    }, never, RandomValues>;\n    static readonly Default: Layer.Layer<RandomValues, never, never>;\n    static readonly Random: Layer.Layer<RandomValues, never, never>;\n}"
    ],
    "summary": "Effect service that produces fresh byte arrays of an exact requested length.",
    "sections": {
      "Why": "Entropy is an explicit dependency so secure production generation and reproducible tests use the same typed generator APIs.\n`RandomValues.Default` requires `globalThis.crypto.getRandomValues`; an unavailable implementation or thrown platform error is an Effect defect because the service's typed error channel is `never`.",
      "Ownership and lifetime": "A Layer owns the entropy source; every call allocates and transfers ownership of a fresh mutable byte array to the caller.",
      "Property: Default": "Provides cryptographic bytes from `globalThis.crypto.getRandomValues`.",
      "Property: Default: Why": "Production IDs need platform entropy. Missing `globalThis.crypto.getRandomValues` and platform exceptions are Effect defects, not typed errors, rather than silently weakening randomness.",
      "Property: Default: Ownership and lifetime": "The Layer owns no mutable generator state; each request returns a fresh buffer. The runtime must provide Web Crypto or the request defects.",
      "Property: Random": "Provides reproducible bytes from Effect Random.",
      "Property: Random: Why": "Deterministic tests and simulations need replaceable entropy; this Layer is not cryptographically secure.",
      "Property: Random: Ownership and lifetime": "The provided Effect Random service owns sequence state for the Layer lifetime; each request returns a fresh buffer.",
      "Property: call": "Requests a fresh byte array from the current RandomValues service.",
      "Property: call: Why": "The static call preserves literal length in the type while keeping the entropy source in Effect's service channel.",
      "Property: call: Ownership and lifetime": "Each invocation allocates a new buffer owned by the caller and acquires no persistent resource."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { RandomValues } from \"@typed/id/RandomValues\"\nimport { Effect } from \"effect\"\nconst bytes = Effect.provide(RandomValues.call(16), RandomValues.Default)"
      },
      {
        "language": "ts",
        "code": "import { RandomValues } from \"@typed/id/RandomValues\"\nimport { Effect } from \"effect\"\nconst bytes = RandomValues.call(32).pipe(Effect.provide(RandomValues.Default))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/id/src/RandomValues.ts",
      "line": 52
    },
    "since": "1.0.0",
    "category": "Entropy services"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/id#RandomValues",
    "packageName": "@typed/id",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/id",
    "exportName": "RandomValues",
    "qualifiedName": "RandomValues",
    "declarationKey": "declaration:aa5f303e0851a8af5330ad71",
    "family": "class",
    "signatures": [
      "export declare class RandomValues extends RandomValues_base {\n    static readonly call: <const N extends number>(length: N) => Effect.Effect<Uint8Array & {\n        readonly length: N;\n    }, never, RandomValues>;\n    static readonly Default: Layer.Layer<RandomValues, never, never>;\n    static readonly Random: Layer.Layer<RandomValues, never, never>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 52,
          "column": 1
        },
        "end": {
          "line": 108,
          "column": 2
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 89,
          "column": 3
        },
        "end": {
          "line": 89,
          "column": 75
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 101,
          "column": 3
        },
        "end": {
          "line": 107,
          "column": 5
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 74,
          "column": 3
        },
        "end": {
          "line": 77,
          "column": 79
        }
      }
    ],
    "aliases": [
      "@typed/id/RandomValues#RandomValues"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:aa5f303e0851a8af5330ad71",
    "name": "RandomValues",
    "family": "class",
    "facets": [
      {
        "family": "class",
        "syntaxKind": "ClassDeclaration",
        "signatures": [
          "export declare class RandomValues extends RandomValues_base {\n    static readonly call: <const N extends number>(length: N) => Effect.Effect<Uint8Array & {\n        readonly length: N;\n    }, never, RandomValues>;\n    static readonly Default: Layer.Layer<RandomValues, never, never>;\n    static readonly Random: Layer.Layer<RandomValues, never, never>;\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/id/src/RandomValues.ts",
            "start": {
              "line": 52,
              "column": 1
            },
            "end": {
              "line": 108,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "static readonly Default: Layer.Layer<RandomValues, never, never>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/id/src/RandomValues.ts",
            "start": {
              "line": 89,
              "column": 3
            },
            "end": {
              "line": 89,
              "column": 75
            }
          }
        ],
        "static": true,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "static readonly Random: Layer.Layer<RandomValues, never, never>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/id/src/RandomValues.ts",
            "start": {
              "line": 101,
              "column": 3
            },
            "end": {
              "line": 107,
              "column": 5
            }
          }
        ],
        "static": true,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertyDeclaration",
        "signatures": [
          "static readonly call: <const N extends number>(length: N) => Effect.Effect<Uint8Array & {\n    readonly length: N;\n}, never, RandomValues>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/id/src/RandomValues.ts",
            "start": {
              "line": 74,
              "column": 3
            },
            "end": {
              "line": 77,
              "column": 79
            }
          }
        ],
        "static": true,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "export declare class RandomValues extends RandomValues_base {\n    static readonly call: <const N extends number>(length: N) => Effect.Effect<Uint8Array & {\n        readonly length: N;\n    }, never, RandomValues>;\n    static readonly Default: Layer.Layer<RandomValues, never, never>;\n    static readonly Random: Layer.Layer<RandomValues, never, never>;\n}"
    ],
    "typeParameters": [],
    "summary": "Effect service that produces fresh byte arrays of an exact requested length.",
    "sections": {
      "Why": "Entropy is an explicit dependency so secure production generation and reproducible tests use the same typed generator APIs.\n`RandomValues.Default` requires `globalThis.crypto.getRandomValues`; an unavailable implementation or thrown platform error is an Effect defect because the service's typed error channel is `never`.",
      "Ownership and lifetime": "A Layer owns the entropy source; every call allocates and transfers ownership of a fresh mutable byte array to the caller.",
      "Property: Default": "Provides cryptographic bytes from `globalThis.crypto.getRandomValues`.",
      "Property: Default: Why": "Production IDs need platform entropy. Missing `globalThis.crypto.getRandomValues` and platform exceptions are Effect defects, not typed errors, rather than silently weakening randomness.",
      "Property: Default: Ownership and lifetime": "The Layer owns no mutable generator state; each request returns a fresh buffer. The runtime must provide Web Crypto or the request defects.",
      "Property: Random": "Provides reproducible bytes from Effect Random.",
      "Property: Random: Why": "Deterministic tests and simulations need replaceable entropy; this Layer is not cryptographically secure.",
      "Property: Random: Ownership and lifetime": "The provided Effect Random service owns sequence state for the Layer lifetime; each request returns a fresh buffer.",
      "Property: call": "Requests a fresh byte array from the current RandomValues service.",
      "Property: call: Why": "The static call preserves literal length in the type while keeping the entropy source in Effect's service channel.",
      "Property: call: Ownership and lifetime": "Each invocation allocates a new buffer owned by the caller and acquires no persistent resource."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { RandomValues } from \"@typed/id/RandomValues\"\nimport { Effect } from \"effect\"\nconst bytes = Effect.provide(RandomValues.call(16), RandomValues.Default)"
      },
      {
        "language": "ts",
        "code": "import { RandomValues } from \"@typed/id/RandomValues\"\nimport { Effect } from \"effect\"\nconst bytes = RandomValues.call(32).pipe(Effect.provide(RandomValues.Default))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 52,
          "column": 1
        },
        "end": {
          "line": 108,
          "column": 2
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 89,
          "column": 3
        },
        "end": {
          "line": 89,
          "column": 75
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 101,
          "column": 3
        },
        "end": {
          "line": 107,
          "column": 5
        }
      },
      {
        "file": "packages/id/src/RandomValues.ts",
        "start": {
          "line": 74,
          "column": 3
        },
        "end": {
          "line": 77,
          "column": 79
        }
      }
    ],
    "since": "1.0.0",
    "category": "Entropy services"
  }
}
