@orangecheck/stamp-ots / CalendarClient
Interface: CalendarClient
Defined in: types.ts:21
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
<a id="property-url"></a> url | readonly | string | Base URL of the calendar, e.g. "https://alice.btc.calendar.opentimestamps.org". | types.ts:23 |
Methods
fetchProof()
fetchProof(digest: Uint8Array, signal?: AbortSignal): Promise<Uint8Array<ArrayBufferLike> | null>;
Defined in: types.ts:42
Fetch the current (possibly upgraded) proof for a previously-submitted digest. Returns null if the calendar has no proof for this digest yet.
OTS calendar HTTP API: GET <url>/timestamp/<hex(digest)>, returns the proof bytes or 404.
Parameters
| Parameter | Type |
|---|---|
digest | Uint8Array |
signal? | AbortSignal |
Returns
Promise<Uint8Array<ArrayBufferLike> | null>
submit()
submit(digest: Uint8Array, signal?: AbortSignal): Promise<Uint8Array<ArrayBufferLike>>;
Defined in: types.ts:33
Submit a 32-byte digest to the calendar for aggregation. Returns the raw pending proof bytes.
OTS calendar HTTP API: POST <url>/digest with the raw bytes as the body, Content-Type: application/vnd.opentimestamps.v1, returns the proof bytes as the response body.
Parameters
| Parameter | Type |
|---|---|
digest | Uint8Array |
signal? | AbortSignal |
Returns
Promise<Uint8Array<ArrayBufferLike>>