Skip to content

Expiry

Defined in: packages/agent/src/agent/http/transforms.ts:31

readonly _isExpiry: true = true

Defined in: packages/agent/src/agent/http/transforms.ts:32

toBigInt(): bigint

Defined in: packages/agent/src/agent/http/transforms.ts:59

bigint


toHash(): Uint8Array

Defined in: packages/agent/src/agent/http/transforms.ts:63

Uint8Array


toJSON(): JsonnableExpiry

Defined in: packages/agent/src/agent/http/transforms.ts:75

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/agent/src/agent/http/transforms.ts:67

string


static fromDeltaInMilliseconds(deltaInMs, clockDriftMs): Expiry

Defined in: packages/agent/src/agent/http/transforms.ts:44

Creates an Expiry object from a delta in milliseconds. If the delta is less than 90 seconds, the expiry is rounded down to the nearest second. Otherwise, the expiry is rounded down to the nearest minute.

number

The milliseconds to add to the current time.

number = 0

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

Expiry

The constructed Expiry object.


static fromJSON(input): Expiry

Defined in: packages/agent/src/agent/http/transforms.ts:84

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/agent/src/agent/http/transforms.ts:99

unknown

other is Expiry