live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/stamp-ots


@orangecheck/stamp-ots / CalendarClient

Interface: CalendarClient

Defined in: types.ts:21

Properties

PropertyModifierTypeDescriptionDefined in
<a id="property-url"></a> urlreadonlystringBase 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

ParameterType
digestUint8Array
signal?AbortSignal

Returns

Promise&lt;Uint8Array&lt;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

ParameterType
digestUint8Array
signal?AbortSignal

Returns

Promise&lt;Uint8Array&lt;ArrayBufferLike>>