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

[BREAKING CHANGE] return more data with signature to make it easy for validation #434

Open
frankiebee opened this issue Nov 7, 2024 · 4 comments · May be fixed by #445
Open

[BREAKING CHANGE] return more data with signature to make it easy for validation #434

frankiebee opened this issue Nov 7, 2024 · 4 comments · May be fixed by #445
Assignees
Labels
enhancement New feature or request

Comments

@frankiebee
Copy link
Collaborator

In order to do easier validation of the signature we should return more data with the signature like hashing algorithm used etc.

@frankiebee frankiebee self-assigned this Nov 7, 2024
@frankiebee frankiebee added the enhancement New feature or request label Nov 7, 2024
@frankiebee
Copy link
Collaborator Author

frankiebee commented Nov 7, 2024

new return proposals for rawSign && signWithApatersInOrder:

interface SignatureAndData {
  signature: string
  hashingAlgorithm: string //["sha1","sha2","sha3","keccak","blake2_256", "custom"]
  verifyingKey: string
  message: any //| unknown
}

@frankiebee
Copy link
Collaborator Author

side note maybe look into expanding auxSchema during program deployment to nave the hashing algorithm for custom
currently we have now way of telling end user what the custom function is. unless it is specified in the adapter.

@rh0delta
Copy link
Contributor

rh0delta commented Nov 7, 2024

Here are the current hashing algorithms available in storage currently:

["sha1","sha2","sha3","keccak","blake2_256",{"custom": programIndex}]

endpoint used: http://validator-3.prod.testnet.testnet-2024.infrastructure.entropy.xyz.:3001/hashes

@frankiebee
Copy link
Collaborator Author

frankiebee commented Dec 9, 2024

i'm also thinking this could be good to:

export interface SignatureData {
  signarure: string
  verifyingKey: string
  hashingAlogrithm: string
  messageHash: string // the hashed message
}
export interface AdapterSignatureData {
  signarure: string
  verifyingKey: string
  hashingAlogrithm: string
  messageHash: string // the hashed message
  messageParams: any // the original object or message
}

what do you think @rh0delta

@frankiebee frankiebee linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants