The use of smart contracts (multisig, smart contract wallet) does not provide valid signatures from signature schemes. This is a limitation as EOA (externally owned accounts)
- has a clear signature-client interface to sign arbitrary (or standard login) messages
- can provide signature verifiable in contracts, such as for gas provision in smart contract wallets
This is similar to the isValidSiganture standard in Ethereum.
// Example function interface
// This creates the hash of the message and checks the state to see if the hash has been added to the state
// `signature` can be empty for contract signatures and only used to be compatible with EOA signatures
pub fn is_valid_signature(msg: Binary, signature: Binary) -> StdResult<bool> {}
// Example state in the implementing contract
// Map of hash(msg) to validate state
// - valid signed
// - signed but revoked
pub const SIGNATURES: Map<&[u8], bool>
Can you give an example?
Most important case is a multisig i'd bet