From 7655498651b4e9751995b9d5f9d47397b3b97bd0 Mon Sep 17 00:00:00 2001 From: Sahil-Gujrati Date: Thu, 19 Dec 2024 20:53:23 +0530 Subject: [PATCH] chore: Add functions to the interface --- src/interfaces/ISafeSubscriptions.sol | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/interfaces/ISafeSubscriptions.sol b/src/interfaces/ISafeSubscriptions.sol index a535688..66f88f6 100644 --- a/src/interfaces/ISafeSubscriptions.sol +++ b/src/interfaces/ISafeSubscriptions.sol @@ -39,4 +39,34 @@ interface ISafeSubscriptions { error TransactionFailed(); error DeadlinePassed(uint256 deadline, uint256 currentTimestamp); error InvalidNonce(uint256 givenNonce, uint256 expectedNonce); + + function createSubscription( + Subscription memory _subscription, + uint256 _deadline, + uint256 _nonce, + bytes memory _signatures + ) + external + returns (bytes32); + function cancelSubscription( + bytes32 _subscriptionDataHash, + uint256 _deadline, + uint256 _nonce, + bytes memory _signatures + ) + external; + function withdrawFromSubscription(bytes32 _subscriptionDataHash) external; + function getSafe() external view returns (address); + function getNextNonce() external view returns (uint256); + function getSubscriptionData(bytes32 _subscriptionDataHash) external view returns (Subscription memory); + function isSubscriptionCancelled(bytes32 _subscriptionDataHash) external view returns (bool); + function getEncodedSubscriptionDataAndHash( + Subscription memory _subscription, + uint256 _deadline, + uint256 _nonce + ) + external + view + returns (bytes memory, bytes32); + function getSubscriptionDataHash(Subscription memory _subscription) external pure returns (bytes32); }