reduce browser bundle size

reduces browser bundle size by ~612k or ~92%.
This commit is contained in:
Stefan Aebischer
2021-05-15 19:34:32 +02:00
parent c5fb3f2b02
commit 082633a5ca
8 changed files with 38 additions and 464 deletions

7
src/util/node-support.ts Normal file
View File

@@ -0,0 +1,7 @@
import { createHmac } from 'crypto';
export async function signMessage(message: string, secret: string): Promise<string> {
return createHmac('sha256', secret)
.update(message)
.digest('hex');
};