Files
bybit-api/src/util/node-support.ts
2022-09-14 23:55:24 +01:00

10 lines
283 B
TypeScript

import { createHmac } from 'crypto';
/** This is async because the browser version uses a promise (browser-support) */
export async function signMessage(
message: string,
secret: string
): Promise<string> {
return createHmac('sha256', secret).update(message).digest('hex');
}