Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/interfaces/ISignatureVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,22 @@ interface ISignatureVerifier {
/// @param signature The encoded signature (see Tempo Transaction spec for formats)
/// @return True if the input address signed, false otherwise. Reverts on invalid signatures.
function verify(address signer, bytes32 hash, bytes calldata signature) external view returns (bool);

/// @notice Verifies whether a keychain signature was produced by an active key (TIP-1049, T6).
/// @param account The expected embedded root account
/// @param hash The message hash that was signed
/// @param signature The encoded keychain signature
/// @dev Does not compare the inner signature type against the stored key type.
/// @dev Selector-gated to the T6 hardfork; reverts as an unknown selector before T6.
/// @return True if the keychain access key is active on account.
function verifyKeychain(address account, bytes32 hash, bytes calldata signature) external view returns (bool);

/// @notice Verifies whether a keychain signature was produced by a root or active admin key (TIP-1049, T6).
/// @param account The expected embedded root account
/// @param hash The message hash that was signed
/// @param signature The encoded keychain signature
/// @dev Does not compare the inner signature type against the stored key type.
/// @dev Selector-gated to the T6 hardfork; reverts as an unknown selector before T6.
/// @return True if the recovered key is account or an active admin key on account.
function verifyKeychainAdmin(address account, bytes32 hash, bytes calldata signature) external view returns (bool);
}