mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-29 18:21:23 +00:00
* feat: add initial plaintext 2 module * refactor: initial refactor of pnet * chore: fix lint * fix: update plaintext api usage * test: use plaintext for test crypto * chore: update deps test: update dialer suite scope * feat: add connection protection to the upgrader * refactor: cleanup and lint fix * chore: remove unncessary transforms * chore: temporarily disable bundlesize * chore: add missing dep * fix: use it-handshake to prevent overreading * chore(fix): PR feedback updates * chore: apply suggestions from code review Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>
23 lines
314 B
JavaScript
23 lines
314 B
JavaScript
'use strict'
|
|
|
|
const protobuf = require('protons')
|
|
|
|
module.exports = protobuf(`
|
|
message Exchange {
|
|
optional bytes id = 1;
|
|
optional PublicKey pubkey = 2;
|
|
}
|
|
|
|
enum KeyType {
|
|
RSA = 0;
|
|
Ed25519 = 1;
|
|
Secp256k1 = 2;
|
|
ECDSA = 3;
|
|
}
|
|
|
|
message PublicKey {
|
|
required KeyType Type = 1;
|
|
required bytes Data = 2;
|
|
}
|
|
`)
|