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

Document what innerSignature (and signature) is for each keytype #25

Open
onbjerg opened this issue Feb 11, 2025 · 1 comment
Open

Document what innerSignature (and signature) is for each keytype #25

onbjerg opened this issue Feb 11, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@onbjerg
Copy link
Contributor

onbjerg commented Feb 11, 2025

I've come to learn that UserOp.signature can be e.g. abi.encode(r, s, v), abi.encode(r, vs) for secp256k1. The second case only if the privkey corresponds to UserOp.eoa. It would be nice to document exactly what signature can be, for which keytypes and under what constraints, as well as what innerSignature can be in the case where signature is abi.encodePacked(bytes(innerSignature), bytes32(keyHash), bool(prehash))

@onbjerg onbjerg added the documentation Improvements or additions to documentation label Feb 11, 2025
@atarpara
Copy link
Collaborator

Key Type Key Hash PreHash Inner Signature
EOA Private Key bytes32(0x00) ignore (r, s, v) for secp256k1 or (r, vs) for secp256k1 (only if private key corresponds to UserOp.eoa)
P256 bytes32(keyType, publicKey) 0 (r, s)
WebAuthN bytes32(keyType, publicKey) 0 or 1 (r, s)
secp256k1 bytes32(keyType, publicKey) 0 (r, s) or (r, vs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants