This commit is contained in:
2023-07-22 19:37:46 +01:00
parent 74a3cd7754
commit b1f93c9fd8
65 changed files with 1115 additions and 1029 deletions

View File

@ -71,7 +71,10 @@ export function countMembers(a: any) {
return ret;
}
export function equalProp(a: string | number | Array<string | number> | undefined, b: string | number | Array<string | number> | undefined) {
export function equalProp(
a: string | number | Array<string | number> | undefined,
b: string | number | Array<string | number> | undefined
) {
if ((a !== undefined && b === undefined) || (a === undefined && b !== undefined)) {
return false;
}
@ -130,7 +133,7 @@ export function appendDedupe<T>(a?: Array<T>, b?: Array<T>) {
export const sha256 = (str: string | Uint8Array): string => {
return utils.bytesToHex(sha2(str));
}
};
export function getPublicKey(privKey: string) {
return utils.bytesToHex(secp.schnorr.getPublicKey(privKey));