From 5585907591c0275de5a229db99584c6ea3eb12d2 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 31 Aug 2023 06:49:59 -0400 Subject: [PATCH] fix: ed25519.sign arguments are wrong order --- src/service/p2p.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/p2p.ts b/src/service/p2p.ts index cf69567..419eebe 100644 --- a/src/service/p2p.ts +++ b/src/service/p2p.ts @@ -234,7 +234,7 @@ export class P2PService { async signMessageSimple(message: Uint8Array): Promise { const packer = new Packer(); - const signature = ed25519.sign(this.nodeKeyPair.extractBytes(), message); + const signature = ed25519.sign(message, this.nodeKeyPair.extractBytes()); packer.packInt(protocolMethodSignedMessage); packer.packBinary(Buffer.from(this.localNodeId!.bytes));