refactor: switch to ed25519-keygen
This commit is contained in:
parent
79f981d789
commit
c25bf102fe
|
@ -1,18 +0,0 @@
|
|||
diff --git a/index.js b/index.js
|
||||
index dc628dab1a201e6679a1716b3d51b56e4723b49d..9daeb44298586d51d7bb6e859a1dd696846e0078 100644
|
||||
--- a/index.js
|
||||
+++ b/index.js
|
||||
@@ -115,11 +115,11 @@ class HDKey {
|
||||
});
|
||||
}
|
||||
sign(message) {
|
||||
- message = ensureBytes(message, 32);
|
||||
+ message = ensureBytes(message);
|
||||
return ed25519.sync.sign(message, this.privateKey);
|
||||
}
|
||||
verify(message, signature) {
|
||||
- message = ensureBytes(message, 32);
|
||||
+ message = ensureBytes(message);
|
||||
signature = ensureBytes(signature, 64);
|
||||
return ed25519.sync.verify(signature, message, this.publicKeyRaw);
|
||||
}
|
|
@ -25,6 +25,7 @@
|
|||
"b4a": "^1.6.1",
|
||||
"compact-encoding": "^2.11.0",
|
||||
"dotenv": "^16.0.1",
|
||||
"ed25519-keygen": "^0.4.1",
|
||||
"ethers": "^5.6.9",
|
||||
"eventemitter2": "^6.4.9",
|
||||
"fastify": "^4.10.2",
|
||||
|
@ -33,7 +34,6 @@
|
|||
"json-stable-stringify": "^1.0.1",
|
||||
"json-stringify-deterministic": "^1.0.7",
|
||||
"loady": "git+https://github.com/LumeWeb/loady.git",
|
||||
"micro-ed25519-hdkey": "patch:micro-ed25519-hdkey@npm%3A0.1.2#~/.yarn/patches/micro-ed25519-hdkey-npm-0.1.2-5d1d767d1d.patch",
|
||||
"msgpackr": "^1.6.1",
|
||||
"node-cache": "^5.1.2",
|
||||
"node-cron": "^3.0.1",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { HDKey } from "micro-ed25519-hdkey";
|
||||
import { HDKey } from "ed25519-keygen/hdkey";
|
||||
import config from "../config";
|
||||
import * as bip39 from "@scure/bip39";
|
||||
import { wordlist } from "@scure/bip39/wordlists/english";
|
||||
|
|
Loading…
Reference in New Issue