Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wc-client: Secret Network support #728

Open
wants to merge 21 commits into
base: Thunnini/prepare-mobile-merge
Choose a base branch
from

Conversation

luca992
Copy link

@luca992 luca992 commented May 22, 2023

Mobile Support Bounty
Implements APIs for the wc-client:

suggestToken
getSecret20ViewingKey
getSecret20ViewingKeyOrPermit
getEnigmaUtils
getEnigmaPubKey
getEnigmaTxEncryptionKey
enigmaEncrypt
enigmaDecrypt

Notes:

I implemented getSecret20ViewingKeyOrPermit like this:
2023-05-22 17 53 20

As there is no permit functionality in keplr yet (that’s another bounty).
I’m not sure exactly what behavior you want when an error is thrown. But right now it will return an error instead of catching it and returning an object with both a null permit and a null viewing key

I also added getSecret20ViewingKeyOrPermit to the keplr interface and the all other provider implementations

Demo:

Screen.Recording.2023-05-22.at.6.37.02.PM.mov

Web App demo: the sample app from secretk

It shows the create viewing key message is being properly decrypted by keplr.

Screen.Recording.2023-05-23.at.8.17.58.PM.mov

For reference, this is what confirming a transaction looks like if keplr is not used for encryption (keplr cannot decrypt the message):

Copy link

@eshelB eshelB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

packages/wc-client/src/index.ts Show resolved Hide resolved
packages/types/src/wallet/keplr.ts Outdated Show resolved Hide resolved
once support for saving permits is implemented, getting a saved permit should be implemented in getSecret20ViewingKeyOrPermit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants