-
Notifications
You must be signed in to change notification settings - Fork 45
Add verifyMessage and verifyTransaction on account #572
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
Add verifyMessage and verifyTransaction on account #572
Conversation
| * @returns true if the signature is valid, false otherwise | ||
| */ | ||
| verify(data: Buffer | Uint8Array, signature: Buffer | Uint8Array): boolean { | ||
| async verify(data: Buffer | Uint8Array, signature: Buffer | Uint8Array): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor breaking change, we should document (not forget about) it.
| } | ||
|
|
||
| verifyMessageSignature(message: Message): boolean { | ||
| async verifyMessageSignature(message: Message, account: IAccount): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In account, we have verifyTransaction and verifyMessage. Here, we also have the suffix signature. Keep it or drop it? (either way should be fine, but we must also reflect this in the specs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like having signature in the name, but if we decide to drop it, it's fine
| const ciphertext = Buffer.from(data.ciphertext, 'hex'); | ||
| const edhPubKey = Buffer.from(data.identities.ephemeralPubKey, 'hex'); | ||
| const originatorPubKeyBuffer = Buffer.from(data.identities.originatorPubKey, 'hex'); | ||
| static async decrypt(data: X25519EncryptedData, decryptorSecretKey: UserSecretKey): Promise<Buffer> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor breaking change. Let's mention it in the PR description, as well, so that we don't forget to document it in the release notes.
4f315d6
Uh oh!
There was an error while loading. Please reload this page.