Vana SDK - v4.1.0
    Preparing search index...

    Interface WriteBinaryDataParams

    A binary write: the bytes are stored as a $binary record.

    interface WriteBinaryDataParams {
        scope: string;
        lineage?: readonly LineageSource[] | null;
        fetch?: {
            (input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
            (input: string | Request | URL, init?: RequestInit): Promise<Response>;
        };
        headers?: HeadersInit;
        metadata?: Record<string, unknown>;
    }

    Hierarchy

    • WriteDataBaseParams
      • WriteBinaryDataParams
    Index

    Properties

    scope: string

    The scope to write into; must match one of the session's write patterns. A derived scope must not share its first dot-segment with any source's scope (the server rejects it with LINEAGE_SCOPE_UNDER_SOURCE_PREFIX): put derivatives in the app's own namespace.

    lineage?: readonly LineageSource[] | null

    The data points this record was derived from: ids (deriveDataPointId) or { ownerAddress, scope } pairs the SDK derives the id from. Distinct, at most MAX_LINEAGE_SOURCES, all belonging to the same owner as the target scope, never the record's own id. Sent lowercased as the record's lineage field, inside the signed bytes. [] is an explicit root statement and is sent; absent or null makes no statement. Pairs also let the SDK apply the naming rule (assertDerivedScopeNaming) before anything is signed.

    fetch?: {
        (input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
        (input: string | Request | URL, init?: RequestInit): Promise<Response>;
    }

    fetch to use; defaults to globalThis.fetch.

    Type Declaration

      • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | Request | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | Request | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    headers?: HeadersInit

    Extra request headers.

    metadata?: Record<string, unknown>

    Caller metadata stored with the record (X-Vana-Metadata, part of the signed $binary record). Must not contain lineage (use the option) or a reserved key.