UNPKG

@standard-crypto/farcaster-js-hub-rest

Version:

A tool for interacting with the REST API of any Farcaster hub.

20 lines (19 loc) 612 B
/** * Utilities for interacting with serialized timestamps in the * Farcaster protocol. See [Farcaster docs](https://github.com/farcasterxyz/protocol/blob/main/docs/SPECIFICATION.md#timestamps) * for more information. * @module */ export declare const START: Date; /** * Parses a Farcaster timestamp * @param timestamp seconds since Jan 1, 2021 00:00:00UTC * @returns */ export declare function parse(timestamp: number): Date; /** * Serialized a timestamp to seconds since the Farcaster epoch * @param d timestamp as a Date instance * @returns */ export declare function serialize(d: Date): number;