Skip to content

Expiry

Defined in: packages/core/src/agent/agent/http/expiry.ts:24

readonly _isExpiry: true = true

Defined in: packages/core/src/agent/agent/http/expiry.ts:25

toBigInt(): bigint

Defined in: packages/core/src/agent/agent/http/expiry.ts:56

bigint


toHash(): Uint8Array

Defined in: packages/core/src/agent/agent/http/expiry.ts:60

Uint8Array


toJSON(): JsonnableExpiry

Defined in: packages/core/src/agent/agent/http/expiry.ts:72

Serializes to JSON

JsonnableExpiry

a JSON object with a single key, JSON_KEY_EXPIRY, whose value is the expiry as a string


toString(): string

Defined in: packages/core/src/agent/agent/http/expiry.ts:64

string


static fromDeltaInMilliseconds(deltaInMs, clockDriftInMs?): Expiry

Defined in: packages/core/src/agent/agent/http/expiry.ts:39

Creates an Expiry object from a delta in milliseconds. The expiry is calculated as: current_time + delta + clock_drift The resulting expiry is then rounded:

  • If rounding down to the nearest minute still provides at least 60 seconds in the future, use minute precision
  • Otherwise, use second precision

number

The milliseconds to add to the current time.

number = 0

The milliseconds to add to the current time, typically the clock drift between IC network clock and the client’s clock. Defaults to 0 if not provided.

Expiry

The constructed Expiry object.


static fromJSON(input): Expiry

Defined in: packages/core/src/agent/agent/http/expiry.ts:81

Deserializes a JsonnableExpiry object from a JSON string.

string

The JSON string to deserialize.

Expiry

The deserialized Expiry object.


static isExpiry(other): other is Expiry

Defined in: packages/core/src/agent/agent/http/expiry.ts:96

unknown

other is Expiry