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

Payload decoding in the browser wallet of the CIS3 standard #279

Open
DOBEN opened this issue Apr 18, 2023 · 3 comments
Open

Payload decoding in the browser wallet of the CIS3 standard #279

DOBEN opened this issue Apr 18, 2023 · 3 comments
Assignees
Labels
[Type] Task An additional feature or improvement.

Comments

@DOBEN
Copy link
Member

DOBEN commented Apr 18, 2023

Task description
If a smart contract implements the CIS3 standard (sponsored transactions). The sponsored transaction message will be sent to the Concordium browser wallet to be signed by the user. Currently, when providing the schema to the browser wallet, it can decode the object except for the payload field which is an array of bytes.

Feature to be added to the browser wallet:
The browser wallet can also decode the payload field by looking up the parameter schema of the entry_point_name and using this schema to decode the payload. The payload is the input parameter that is sent to the entry_point_name.

DecodingOfSigningOfMessage

CIS3 standard:
Concordium/concordium-update-proposals#41

@DOBEN DOBEN added the [Type] Task An additional feature or improvement. label Apr 18, 2023
@limemloh
Copy link
Contributor

limemloh commented Mar 26, 2024

Since the current approach is to use signMessage function provided by the wallet allowing for signing an arbitrary message, we don't really know what we are signing, and we can't really deserialize the message and look whether it is for CIS-3 reliably.

  1. A solution could be to extend the wallet API with signCis3Message which is tailored for this
  2. Another could be to extend the JS-SDK with tools for constructing a CIS-3 schema type for this message, which then can be used for signMessage.

@abizjak
Copy link
Member

abizjak commented Apr 5, 2024

@abizjak
Copy link
Member

abizjak commented Apr 5, 2024

We agreed to go with solution 1 suggested above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Task An additional feature or improvement.
Projects
None yet
Development

No branches or pull requests

4 participants