diff --git a/src/utilities.ts b/src/utilities.ts index 61325296..66dab1be 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -72,9 +72,12 @@ export const decimalPlaces = (num: number): number => { }; /** - * Calculates the hash for the given orderbook - * @param orderbook - * @returns + * Calculates the SHA‑1 hash for the given orderbook. + * + * @param {OrderBookSummary} orderbook + * **must** have its properties in _exactly_ this order: + * `market`, `asset_id`, `timestamp`, `hash`, `bids`, `asks` + * @returns {string} the hex‑encoded SHA‑1 */ export const generateOrderBookSummaryHash = (orderbook: OrderBookSummary): string => { orderbook.hash = "";