Implement initial mint_by_key logic for Badge Actions

This commit is contained in:
Serkan Reis
2023-02-21 18:26:10 +03:00
parent bdd39d2dc2
commit e1adca8ddf
4 changed files with 63 additions and 7 deletions
+8
View File
@@ -0,0 +1,8 @@
/* eslint-disable eslint-comments/disable-enable-pair */
import { Word32Array } from 'jscrypto'
import { SHA256 } from 'jscrypto/SHA256'
export function sha256(data: Buffer): Buffer {
return Buffer.from(SHA256.hash(new Word32Array(data)).toUint8Array())
}