Can someone please direct me to an example which show how to use another peer public key to encrypt some data and how to decrypt it on that other node?
I know I can get another peer public key using
ipfs id <other-peer-id>.
I'm not sure how to use that key to encrypt the data, leveraging this is multikey which can be of different types?
I'm also not sure how to obtain the private key on the other node? I know it stored in IPFS_PATH/config under Identity->PrivKey but what is the public API to get it?