@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(commitment: Uint8Array, signal?: AbortSignal): Promise<Uint8Array<ArrayBufferLike> | null>;
Defined in: types.ts:43
Fetch the continuation of a pending proof. commitment is the message
at the calendar's pending attestation (see pendingCommitments), not
the submitted digest. Returns null if the calendar has nothing yet.
OTS calendar HTTP API: GET <url>/timestamp/<hex(commitment)>, returns a timestamp rooted at the commitment, or 404.
Parameters
| Parameter | Type |
|---|---|
commitment | 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>>