LedeWire SDK API Reference
    Preparing search index...

    Interface LicenseDocument

    A purchase's licence document, as purchases.licenseDocument(id) returns it.

    The body is raw bytes rather than decoded JSON, because the document is whatever the work's source served: usually a PDF, Markdown for an SEC filing, or anything else. ArrayBuffer is used because it works the same in Node, browsers and edge runtimes: wrap it with Buffer.from(body) in Node, new Blob([body], { type: contentType }) in a browser, or new TextDecoder().decode(body) for a text/* type.

    interface LicenseDocument {
        body: ArrayBuffer;
        contentType: string;
    }
    Index
    body: ArrayBuffer

    The document's bytes.

    contentType: string

    The Content-Type the server sent, verbatim (e.g. application/pdf, text/markdown; charset=utf-8). application/octet-stream when none was sent. The type is the source's choice, so never render the document inline on your own origin on the strength of it.