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

feat(connect): Cardano message signing #10970

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

jaskp
Copy link
Contributor

@jaskp jaskp commented Jan 31, 2024

Adds support for arbitrary message signing as per CIP-8.

https://cips.cardano.org/cip/CIP-0008

trezor/trezor-firmware#3509

@jaskp jaskp force-pushed the feat/cardano-message-signing branch from 5cf3111 to b0efb54 Compare January 31, 2024 22:30
@martykan
Copy link
Member

martykan commented Feb 1, 2024

The new method should also be added to the connect-explorer package, for an example you can look at Ethereum signMessage.
Here's a reference of other possible field types, then the page needs to be added to the menu here.

@martykan
Copy link
Member

martykan commented Feb 1, 2024

Also it should be added to CI here and here

import { hasHexPrefix, isHexString } from '../../../utils/formatUtils';

export type CardanoSignMessageParams = {
signingPath: Path;
Copy link
Member

Choose a reason for hiding this comment

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

Small nitpick, but everywhere else we just call this param path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally it was named as such because we supported supplying a different path (then called keyPath) to be used for the address header field instead of address parameters. Then we opted to drop it, but I left the name there in case we ever needed to add the second path back. But I can rename it to path, if you think it would be nicer

packages/protobuf/messages.json Outdated Show resolved Hide resolved
@mroz22 mroz22 added connect Connect API related (ie. fee calculation) cardano Related to Cardano (ADA) blockchain platform labels Feb 1, 2024
@jaskp jaskp requested a review from vdovhanych as a code owner February 1, 2024 21:39
@jaskp jaskp force-pushed the feat/cardano-message-signing branch from 2def0de to 55e4576 Compare February 5, 2024 17:03
@jaskp
Copy link
Contributor Author

jaskp commented Feb 11, 2024

Updated with changes to firmware

@jaskp jaskp force-pushed the feat/cardano-message-signing branch from a9f474e to f6ad7dd Compare February 13, 2024 16:18
@jaskp
Copy link
Contributor Author

jaskp commented Feb 27, 2024

Heads-up: I'm going to rebase to fix small conflict with develop

@Conviare
Copy link

we need this ASAP for Cardano!


/** "HelloTrezor!" repeated 86 times (=1032 bytes) in hex */
const HELLO_TREZOR_86 =
'48656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f722148656c6c6f5472657a6f7221';
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't be offended by something like

'48656c6c6f5472657a6f7221'.repeat(86)

@mroz22
Copy link
Contributor

mroz22 commented Nov 18, 2024

Aha, it is still blocked by firmware PR, am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cardano Related to Cardano (ADA) blockchain platform connect Connect API related (ie. fee calculation)
Projects
No open projects
Status: 🗒 Draft
Development

Successfully merging this pull request may close these issues.

4 participants