torusresearch / torus-utils-swift

Swift package for fetching shares from torus-nodes
BSD 3-Clause "New" or "Revised" License
4 stars 11 forks source link

Feature/ed25519 util #25

Closed mcgaryes closed 2 years ago

mcgaryes commented 2 years ago

Adds a convenience to create an ED25519 keypair with a user's torus key. I thought it would be better to add this functionality here in the torus-utils-swift project, that way it is capable of being used in both the CustomAuth and OpenLogin swift packages.

The only dependency that was brought in is the TweetNaCl Swift wrapper and original C library. If you would rather not have an additional dependency I can just bring that code into the repository and reference the original code base in the code.

The implementation is from the TweetNaCl website here https://tweetnacl.cr.yp.to/software.html.

I was also going to create two additional PRs in the CustomAuth and OpenLogin projects to update the required version of the TorusUtils and add examples of how to use the method to retrieve the keypair and use it to create a Solana Wallet.

If this isn't the right place for this functionality please let me know and I can move appropriately!

mcgaryes commented 2 years ago

@chaitanyapotti do you need me to look into why the checks failed?

mcgaryes commented 2 years ago

Actually it looks like the run was just canceled.