import { createHash } from 'crypto'; export interface AuctionRedisScriptDefinition { lua: string; name: string; sha: string; } export function defineAuctionRedisScript( name: string, lua: string, ): AuctionRedisScriptDefinition { return { lua, name, sha: createHash('sha1').update(lua).digest('hex'), }; }