Crypto utils provide a function to encrypt for public_key and decrypt for private key

Hi,

is it possible that the JS SDK crypto utilis provide a function to encrypt for public_key and decrypt for private key.

The crypto library used tweetnacl-js provides nacl.box and nacl.box.open methods.

Please @nduchak.chain wrap it nicely <3 :slight_smile:

2 Likes

Hi,
It’s done in this PR and will be included in next sdk release.

2 Likes

@emin.chain can you give a bit more of the context for this one? Why not use directly the nacl.box ?

Yes, I could do that. Asked just for the ease.

I asked it here too