Skip to main content

Client

SignerClient.connect opens a connection to the signing service. Every SDK (AssetSdk, StreamSdk) is built on one client.

Connect once

Instantiate the client once at startup and reuse it for the lifetime of the process. It is thread-safe and can be shared across concurrent async tasks. Do not reconnect per request.

import { SignerClient, AssetSdk } from "@limboai/verifox-sdk-issuer";

const client = await SignerClient.connect("https://api.trylimbo.com", {
headers: { authorization: `Bearer ${process.env.LIMBO_API_KEY}` },
});
const sdk = AssetSdk.create(client);

Authentication

Auth is carried by the headers field of ConnectOptions. The signing service issues a token for your integration; pass it as an authorization: Bearer … header, applied to every call the client makes.

ConnectOptions

connect takes an optional second argument to supply headers and tune connection and timeout behavior:

FieldRequiredMeaning
headersnoRecord<string, string> attached to every request. Carries authorization: Bearer <token> plus any routing or tenant metadata; header names are lower-cased when sent.
rpcTimeoutMsnoPer-call deadline for a signing request.
connectTimeoutMsnoDeadline for establishing the initial connection.
const client = await SignerClient.connect("https://api.trylimbo.com", {
headers: { authorization: `Bearer ${process.env.LIMBO_API_KEY}` },
rpcTimeoutMs: 30_000,
});

Both https:// and http:// endpoints are supported.

Consuming the client

A connected client is passed to the factory of whichever SDK you need:

const assets = AssetSdk.create(client);
import { StreamSdk } from "@limboai/verifox-sdk-issuer";

const streams = StreamSdk.create(client, ledger, vault);

One client can back multiple SDK instances. AssetSdk.create takes an optional second argument, an array of container plugins for non-c2pa formats such as MXF; omit it for a c2pa-only signer. StreamSdk.create additionally takes a caller-provided SessionLedger and SigningVault; see Stream storage.

See also