.md

SDK reference

Every method on the client, read from the SDK's own source. One page per surface: pick one below, or start with the SDK guide.

@secondlayer/sdk@15.5.1119 methodsfrom source with openpkg
const sl = new SecondLayer() · @secondlayer/sdk

Errors

SecondLayerError root of the family
├─ ApiError Error thrown by SecondLayer when an API request fails.
│  ├─ AuthError 401
│  ├─ RateLimitError 429
│  ├─ StreamsServerError Thrown on a 5xx from the Streams API, and on a failed signing-key fetch.
│  └─ ValidationError Thrown on a 4xx the caller can fix (bad cursor, bad params).
├─ ArchiveAuthError Thrown on a 401 from the archive ops host (quote/fetch/credits).
├─ ArchiveGateNotConfiguredError Thrown on a 503 when the archive fetch gate is unconfigured.
├─ ArchiveSignatureError Thrown when an archive manifest signature is missing or does not verify.
├─ InsufficientArchiveCreditsError Thrown on a 402 from archive fetch — prepaid credits do not cover the quote.
└─ StreamsSignatureError Thrown when response signature verification is enabled and fails.
Edit on GitHub