LedeWire SDK API Reference
    Preparing search index...

    Interface AgentClientConfig

    Configuration options for the LedeWire agent client.

    The agent client is a buyer-scoped client designed for autonomous (headless) agents. It authenticates automatically using a buyer API key + secret and exposes only the namespaces an agent needs: auth, wallet, purchases, content, checkout, and user.apiKeys.

    interface AgentClientConfig {
        baseUrl?: string;
        key: string;
        secret: string;
        storage?: TokenStorage;
    }
    Index

    Properties

    baseUrl?: string

    Override the API base URL. Defaults to https://api.ledewire.com.

    key: string

    Buyer API key (e.g. bktst_abc123). Obtain via client.user.apiKeys.create() after signing up as a buyer.

    secret: string

    64-char hex secret paired with key. Shown once at creation — store in a secrets manager, never in source code.

    storage?: TokenStorage

    Custom token storage. Defaults to MemoryTokenStorage.

    Serverless / edge warning: MemoryTokenStorage resets on cold start. In serverless environments the agent will re-authenticate on every invocation. Provide a persistent adapter (Redis, KV store, encrypted database column) to avoid the extra round-trip on each cold start.