Reduce min pow, add verifySignature to nip98

This commit is contained in:
artur 2024-04-29 16:24:12 +02:00 committed by Mike Heier
parent 018dda8a1a
commit ffa6d7120c

View File

@ -39,6 +39,7 @@ const MIN_PAUSE = 1000; // 1 sec
const MAX_PAUSE = 3600000; // 1 hour const MAX_PAUSE = 3600000; // 1 hour
const MAX_DATA = 1 << 10; // 1kb const MAX_DATA = 1 << 10; // 1kb
const POW_PERIOD = 3600000; // 1h const POW_PERIOD = 3600000; // 1h
const MIN_POW = 11;
// global ndk // global ndk
const ndk = new NDK({ const ndk = new NDK({
@ -445,7 +446,7 @@ function getIp(req) {
} }
function getMinPow(name, req) { function getMinPow(name, req) {
let minPow = 14; let minPow = MIN_POW;
if (name.length <= 5) { if (name.length <= 5) {
minPow += 3; minPow += 3;
} }