24 lines
1.0 KiB
Solidity
24 lines
1.0 KiB
Solidity
pragma solidity >=0.6.12;
|
|
|
|
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
// File-version: 1
|
|
|
|
|
|
interface IOffline {
|
|
// Verify signer and data
|
|
// Check input assuming signature is valid against contract instance.
|
|
function isOfflineValid(address _signer, bytes memory _data) external view returns(bool);
|
|
|
|
// Verify signature against data, and isOfflineValid() against data and signer (as validator)
|
|
// Signature must be ERC191 version 0x00 with contract instance as validator.
|
|
function verifyOfflineRequest(bytes memory _data, bytes memory _signature) external view returns(bool);
|
|
|
|
// Change state if signature and signer is valid.
|
|
// Call verifyOfflineRequest and:
|
|
// - revert if it returns false.
|
|
// - return 0 if state is changed according to the request.
|
|
// - return any other valid to indicate an application specific error.
|
|
function executeOfflineRequest(bytes memory _data, bytes memory _signature) external returns(uint256);
|
|
}
|