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

✨(Account Abstraction) Enable WebAuthN/PassKey signatures #105

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

Nakasar
Copy link
Contributor

@Nakasar Nakasar commented Sep 25, 2024

Changelog

  • Upgrade solidity to latest version .27
  • Upgrade hardhat toolsuite (migrate ethers utilities).
  • Enable account abstraction for ONCHAINID identities by allowing users to execute/approve using webauthn/passkey (secp256k) keys.
  • Enable account abstraction for ONCHAINID identities by allowing users to execute/approve using ECDSA keys.

Added

  • Identity now has a payable fallback receive method. (Fund can always be retrieved from Identities using execute/approve flow).
  • Identity now implements an executeSigned method. It behaves the same as the execute method except it accepts a signature for validate permissions. Signature is composed of keyType (from Key type mapping integers), v, r and s. This method supports ECDSA keys (keyType 1) and P256 keys (keyType 3) for webauthn.
    • Signature is an Ethereum Signed Message of keccak256(abi.encode(identityAddress, _to, _value, _data)) (⚠️ add nonce or equivalent to prevent replays).
  • Identity now implements an approveSigned method. It behaves the same as the approve method except it accepts a signature for validate permissions. Signature is composed of keyType (from Key type mapping integers), v, r and s. This method supports ECDSA keys (keyType 1) and P256 keys (keyType 3) for webauthn.
    • Signature is an Ethereum Signed Message of keccak256(abi.encode(_identityAddress, _executionNonce, _to, _value, _data)).

@Nakasar Nakasar self-assigned this Sep 25, 2024
- New method executeSigned to perfom an execution on the identity using a signature (if signer is not authorized to execute the action, the executeSigned will create a pending execution).
- New method approveSigned to approve a pending execution using a signature.
- New method executeSigned to perfom an execution on the identity using a signature (if signer is not authorized to execute the action, the executeSigned will create a pending execution).
- New method approveSigned to approve a pending execution using a signature.
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.

1 participant