There's an off-the-shelf USB that you can buy called a Teensy[1] that is programmable and automatically registers itself as a USB HID. Very similar to what is described here.
Most of it's good, just a cleaner JS, but it'd be better to drop the classes and lambda-type short function syntax in favour of ES6 classes and arrow functions.
Not realy. cjdns seems to need an invite to get onto its network.
Not saying that's necessarily a bad idea; cjdns seems to be useful to the people that use it. But if I want to build an app that communicates P2P over such a network, a manual step to join the network won't fly.
cjdns does not exactly need an invite. If you want to peer over the internet you'll need to swap public keys with someone already part of the network. But most people have turned on autopeering, which will discover peers on the local network and take care of peer swapping for you. Keep in mind that the intended purpose of cjdns is not to be a p2p library, it is to be a mechanism for connecting local mesh networks together into a mesh internet.