function · Node only
startWitness
Starts a witness as a Node HTTP service, keeping its logs in a JSON file. For development and demos.
@toip-tools/eventlog/nodeView sourceimport { startWitness } from "@toip-tools/eventlog/node";
Declaration
startWitness(opts: {
seed: Uint8Array;
dataPath: string;
port?: number;
host?: string;
clock?: Clock;
}): Promise<{
witness: Witness;
url: string;
aid: string;
did: string;
close: () => Promise<void>;
}>;
Parameters
optsrequired{ seed: Uint8Array; dataPath: string; port?: number; host?: string; clock?: Clock; }
Returns
Promise<{ witness: Witness; url: string; aid: string; did: string; close: () => Promise<void>; }>