Type alias RecordOptionsBeta

RecordOptions: DwnMessage[DwnInterface.RecordsWrite] & {
    author: string;
    connectedDid: string;
    data?: Readable | ReadableStream;
    encodedData?: string | Blob;
    initialWrite?: DwnMessage[DwnInterface.RecordsWrite];
    protocolRole?: string;
    remoteOrigin?: string;
}

Options for configuring a Record instance, extending the base RecordsWriteMessage with additional properties.

This type combines the standard fields required for writing DWN records with additional metadata and configuration options used specifically in the Record class.

Type declaration

  • author: string

    The DID that signed the record.

  • connectedDid: string

    The DID of the DWN tenant under which record operations are being performed.

  • Optional data?: Readable | ReadableStream

    A stream of data, conforming to the Readable or ReadableStream interface, providing a mechanism to read the record's data sequentially. This is particularly useful for handling large datasets that should not be loaded entirely in memory, allowing for efficient, chunked processing of the record's data.

  • Optional encodedData?: string | Blob

    The data of the record, either as a Base64 URL encoded string or a Blob.

  • Optional initialWrite?: DwnMessage[DwnInterface.RecordsWrite]

    The initial RecordsWriteMessage that represents the initial state/version of the record.

  • Optional protocolRole?: string

    The protocol role under which this record is written.

  • Optional remoteOrigin?: string

    The remote tenant DID if the record was queried or read from a remote DWN.

Generated using TypeDoc