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: Signer message type definition #126

Merged
merged 3 commits into from
May 6, 2024

Conversation

netrome
Copy link
Contributor

@netrome netrome commented May 6, 2024

closes #104

This PR introduces the base message type according to the signer communication LLD, and paves the way for future work on the signer message variants and network.

@netrome netrome requested review from djordon, jferrant and 8marz8 May 6, 2024 14:12
@netrome netrome self-assigned this May 6, 2024
@netrome netrome linked an issue May 6, 2024 that may be closed by this pull request
1 task
Copy link
Contributor

@djordon djordon left a comment

Choose a reason for hiding this comment

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

Looks good.

Comment on lines +16 to +25
pub enum Payload {
SignerDepositDecision(SignerDepositDecision),
SignerWithdrawDecision(SignerWithdrawDecision),
StacksTransactionSignRequest(StacksTransactionSignRequest),
StacksTransactionSignature(StacksTransactionSignature),
BitcoinTransactionSignRequest(BitcoinTransactionSignRequest),
BitcoinTransactionSignAck(BitcoinTransactionSignAck),
/// Contains all variants for DKG and WSTS signing rounds
WstsMessage(wsts::net::Message),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this so that we can deserialize responses into one thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I understand the question, but if you're wondering why I've chosen to represent the payload as an enum it's just to be able to represent all different types of payloads within the single SignerMessage struct.

@AshtonStephens AshtonStephens merged commit bfff584 into main May 6, 2024
2 checks passed
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.

[Feature]: Signer message type definition
4 participants