diff --git a/src/proto/payload.json b/src/proto/payload.json index 0689d82..b3952d8 100644 --- a/src/proto/payload.json +++ b/src/proto/payload.json @@ -2,11 +2,11 @@ "nested": { "NoiseHandshakePayload": { "fields": { - "identity_key": { + "identityKey": { "type": "bytes", "id": 1 }, - "identity_sig": { + "identitySig": { "type": "bytes", "id": 2 }, diff --git a/src/utils.ts b/src/utils.ts index 9c657ed..b225a14 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -79,8 +79,8 @@ export async function verifySignedPayload(noiseStaticKey: bytes, plaintext: byte ); //temporary fix until protobufsjs conversion options starts working //by default it ends up as Uint8Array - receivedPayload.libp2pKey = Buffer.from(receivedPayload.libp2pKey); - receivedPayload.noiseStaticKeySignature = Buffer.from(receivedPayload.noiseStaticKeySignature); + receivedPayload.identityKey = Buffer.from(receivedPayload.identityKey); + receivedPayload.identitySig = Buffer.from(receivedPayload.identitySig); } catch (e) { throw new Error("Failed to decode received payload. Reason: " + e.message); }