feat: nwc

This commit is contained in:
2023-05-08 15:36:43 +01:00
parent 7baa85ca11
commit 9d67da3b6f
9 changed files with 272 additions and 18 deletions

View File

@ -22,6 +22,10 @@ export const sha256 = (str: string | Uint8Array): u256 => {
return secp.utils.bytesToHex(hash(str));
};
export function getPublicKey(privKey: HexKey) {
return secp.utils.bytesToHex(secp.schnorr.getPublicKey(privKey));
}
export async function openFile(): Promise<File | undefined> {
return new Promise(resolve => {
const elm = document.createElement("input");