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

Delegation #35

Merged
merged 7 commits into from
Mar 16, 2022
Merged

Delegation #35

merged 7 commits into from
Mar 16, 2022

Conversation

soerenbf
Copy link
Collaborator

@soerenbf soerenbf commented Mar 15, 2022

Purpose

Update SDK to provide necessary functionality to support delegation features.

Should probably tag npm publish with alpha npm publish --tag alpha

Changes

  • Updated types to new versions from delegation spec
  • Added necessary queries to support delegation features.
  • Bumped to alpha version.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.

CHANGELOG.md Outdated Show resolved Hide resolved
src/types.ts Outdated Show resolved Hide resolved
@shjortConcordium shjortConcordium merged commit a08508d into main Mar 16, 2022
@shjortConcordium shjortConcordium deleted the delegation branch March 16, 2022 08:47
soerenbf pushed a commit that referenced this pull request May 29, 2024
…sages (#35)

Replaced the string message type in signMessage with a new type SignableMessage which is a discriminated union of a binary message (which has a type/parameter schema) and a simple string message.

The mobile wallets don't yet support signing binary messages, so the WalletConnect implementation throws an exception for that case. It's very non-desirable to throw exceptions at use time for unimplemented features as compared to enabling the dApp to detect available features for a given connection. But in this case, the warts that this would impose on the interface are not deemed worth it: The MW aren't lacking the feature, it's more like they aren't entirely done implementing it...

The sample dApp sign-message is updated to support both variants by adding a "schema" input for the parameter schema (represented as base64). If this input is non-empty, the message is assumed to be binary (represented as hex). Otherwise it's a plain string.

Also, renamed ParameterSchema to TypeSchema to make it more semantically correct to use this in the context of message values.
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.

None yet

2 participants