0

I don't think it's possible for owners of a safe to sign arbitrary data, while using the same UI for giving permissions (like queue shows txs that need permission) as when executing txs.

I am developing a safe-app in which I need the ability for owners to sign arbitrary data to approve something. After which the signatures will be relayed to a backend and perform some action.

The only way I can implement this within safe-app is by implementing the entire UI for managing signatures myself, which might be lengthy. Plus having two different flows (1) for approving transactions (2) for approving arbitrary data might be confusing user experience. I was wondering whether there's any plan to support something like this? Or is there any other way I can implement this?

Thanks!

1 Answer 1

0

In the safe-apps-sdk there's a method for signing messages sdk.safe.signMessage:
https://github.com/gnosis/safe-apps-sdk/tree/master/packages/safe-apps-sdk#signing-messages

The signing happens on-chain because the Safe doesn't have a private key to sign data and is controlled by the code on the blockchain. To validate the signature, use a method defined by EIP-1271: Standard Signature Validation Method for Contracts

You could also get signatures from N (= threshold of the safe) safe owners, concatenate them and pass to the validation method. It is supported on the contract level but we don't support it on the UI/Infra level:
https://github.com/gnosis/safe-contracts/blob/main/contracts/handler/CompatibilityFallbackHandler.sol#L35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.