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

Match cosmjs interface and fix intent #444

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

Thunnini
Copy link
Contributor

cosmos rpc seems to be built along cosmjs's offline signer/direct signer. However, there is a difference from the actual cosmjs interface.
Also, since cosmjs encodes most byte arrays to base64, we suggest replacing the existing hex-encoded part with base64.

Changes

  • Base64 encode pubkey of cosmos_getAccounts response.
  • Add public key to signature of signAmino/signDirect response.
  • Fix some intent.

@vercel
Copy link

vercel bot commented Jan 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
walletconnect-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 30, 2023 at 11:28AM (UTC)

Copy link
Contributor

@finessevanes finessevanes left a comment

Choose a reason for hiding this comment

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

LGTM, however a f/u question for @bkrem @ganchoradkov, are there any security risks/benefits when encoding base64 over hex? Any change to the amount of storage needed?

@bkrem
Copy link
Member

bkrem commented Feb 1, 2023

are there any security risks/benefits when encoding base64 over hex? Any change to the amount of storage needed?

@finessevanes security is independent of the encoding used (encoded data can be encrypted or not) so that doesn't change here. Base64 is more efficient than hex (base16) anyways so that's a plus here regarding payload size and storage.

Copy link
Member

@bkrem bkrem left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the amendments @Thunnini 🙏

If base64 is the common encoding for cosmjs then base16/hex just seems to create unnecessary ceremonies here.
We would have to update our examples to reflect this change, so I will create a follow-up issue for this in https://github.com/WalletConnect/web-examples once this merges 👍

cc @ganchoradkov you see any possible issues here or can we merge?

Copy link
Member

@ganchoradkov ganchoradkov left a comment

Choose a reason for hiding this comment

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

all good on my side 💯

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.

5 participants