p2panda / aquadoggo

Node for the p2panda network handling validation, storage, aggregation and replication
GNU Affero General Public License v3.0
69 stars 5 forks source link

PSK format unclear when using `Config` programatically #640

Open adzialocha opened 1 month ago

adzialocha commented 1 month ago

libp2p PSK's need to be formatted like that:

format!("/key/swarm/psk/1.0.0/\n/base16/\n{}", pre_shared_secret)
    .parse()
    .expect("Invalid Pre-Shared Key"),

.. this is not communicated clearly to users of the API, so we either 1) inform them that this is the required format or 2) offer an interface which does it automatically