function · Browser and Node

# httpWitnessClient

`@toip-tools/eventlog` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/eventlog/src/http.ts#L50)

Import:

```ts
import { httpWitnessClient } from "@toip-tools/eventlog";
```

## Declaration

Signature:

```ts
httpWitnessClient(baseUrl: string, aid: Qb64, opts?: {
    fetch?: typeof fetch;
}): WitnessClient & {
    evidence(logId?: Qb64): Promise<DuplicityEvidence[]>;
};
```

### Parameters

**`baseUrl` (required)**

`string`

**`aid` (required)**

`string`

**`opts` (optional)**

`{ fetch?: typeof fetch; }`

Default: `{}`

**Fields of `opts`**

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

### Returns

`WitnessClient & { evidence(logId?: Qb64): Promise<DuplicityEvidence[]>; }`

[Usage guide](https://toip.tools/toolkit/eventlog/#usage) · [Error handling](https://toip.tools/toolkit/eventlog/#errors) · [All exports](https://toip.tools/toolkit/eventlog/api/)

---

This is the Markdown version of https://toip.tools/toolkit/eventlog/api/httpWitnessClient/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
