mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 16:02:28 +00:00
fix errors
This commit is contained in:
parent
6fa34d43f8
commit
ab94e8966e
@ -2,11 +2,11 @@
|
|||||||
"nested": {
|
"nested": {
|
||||||
"NoiseHandshakePayload": {
|
"NoiseHandshakePayload": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"identity_key": {
|
"identityKey": {
|
||||||
"type": "bytes",
|
"type": "bytes",
|
||||||
"id": 1
|
"id": 1
|
||||||
},
|
},
|
||||||
"identity_sig": {
|
"identitySig": {
|
||||||
"type": "bytes",
|
"type": "bytes",
|
||||||
"id": 2
|
"id": 2
|
||||||
},
|
},
|
||||||
|
@ -79,8 +79,8 @@ export async function verifySignedPayload(noiseStaticKey: bytes, plaintext: byte
|
|||||||
);
|
);
|
||||||
//temporary fix until protobufsjs conversion options starts working
|
//temporary fix until protobufsjs conversion options starts working
|
||||||
//by default it ends up as Uint8Array
|
//by default it ends up as Uint8Array
|
||||||
receivedPayload.libp2pKey = Buffer.from(receivedPayload.libp2pKey);
|
receivedPayload.identityKey = Buffer.from(receivedPayload.identityKey);
|
||||||
receivedPayload.noiseStaticKeySignature = Buffer.from(receivedPayload.noiseStaticKeySignature);
|
receivedPayload.identitySig = Buffer.from(receivedPayload.identitySig);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error("Failed to decode received payload. Reason: " + e.message);
|
throw new Error("Failed to decode received payload. Reason: " + e.message);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user