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

Clear-sign ETH/STRK transfer #26

Closed
yogh333 opened this issue Jul 3, 2024 · 5 comments
Closed

Clear-sign ETH/STRK transfer #26

yogh333 opened this issue Jul 3, 2024 · 5 comments
Assignees

Comments

@yogh333
Copy link
Collaborator

yogh333 commented Jul 3, 2024

Scope:

  • To be able to clear sign any transfer of ETH or STRK ERC-20 tokens on Starknet. For a Tx which triggers an ERC-20 transfer, the destination address and token amount shall be displayed on device's screen so they can be reviewed and confirmed by the user before signing the Tx
  • Tx version to be supported is v3
  • Clear sign ERC-20 token transfer should be available for all devices supporting the Starknet application (Nano S+, NanoX, Stax)
  • For any other Tx (i.e different from "ERC-20 transfer"), blind signing (i.e signing the Poseidon hash of the transaction) should be proposed, but warning the user about the risk when using blind signing.
@yogh333
Copy link
Collaborator Author

yogh333 commented Jul 19, 2024

Specifications update:

  • when blind signing a Tx, the Tx hash will be displayed on device screen, along with warnings for the user about using blind signing,
  • For clear signing ERC-20 (STRK or ETH) token transfer , the following info will be displayed to be confirmed by the user:
    From
    Amount
    Ticker
    To
    Max fees.

@yogh333
Copy link
Collaborator Author

yogh333 commented Aug 1, 2024

see #28

@yogh333
Copy link
Collaborator Author

yogh333 commented Sep 10, 2024

Following some internal discussions and after feedbacks from Starknet wallet developers (Argent-X, Braavos), it has been decided to extend the first Milestone:

  1. To support Tx v1 signing as it is still used (despite being signalled as deprecated on Starknet official documentation) when end-user wants to pay fees in ETH (Tx v3 is used when fees to be paid in STRK token). Tx v1 will be clear-signed when dealing with ETH or STRK transfers, displaying same info as for Tx v3 (From, Amount, Ticker, To, Max Fees) or blind signed for every other types of operations (Pedersen hash of the Tx will be displayed in that case).
  2. To support blind-signing of off-chain message (see SNIP-12) through a new signMessage() function: message hash will be computed by the client (using starknet.js) and the hash will be sent to the device to be displayed and signed if end-user confirms.
  3. Both 1. and 2. items require to update the starknet-js client, and thus a new release of this client will be also performed and integrated by Starknet wallets in order to support the next app version.

@dhruvkelawala
Copy link

Lgtm!

yogh333 added a commit that referenced this issue Sep 26, 2024
@yogh333
Copy link
Collaborator Author

yogh333 commented Sep 26, 2024

See #32

@yogh333 yogh333 closed this as completed Sep 26, 2024
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

No branches or pull requests

3 participants