/
IKintoWallet.sol
98 lines (60 loc) · 3.09 KB
/
IKintoWallet.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IEntryPoint} from "@aa/core/BaseAccount.sol";
import {IKintoWalletFactory} from "./IKintoWalletFactory.sol";
import {IKintoID} from "./IKintoID.sol";
import {IKintoAppRegistry} from "./IKintoAppRegistry.sol";
interface IKintoWallet {
/* ============ Errors ============ */
error LengthMismatch();
error InvalidPolicy();
error InvalidSigner();
error InvalidApp();
error AppNotWhitelisted();
error RecoveryNotStarted();
error RecoveryTimeNotElapsed();
error OwnerKYCMustBeBurned();
error InvalidRecoverer();
error MaxSignersExceeded();
error KYCRequired();
error DuplicateSigner();
error InvalidSingleSignerPolicy();
error OnlySelf();
error OnlyFactory();
error EmptySigners();
/* ============ State Change ============ */
function initialize(address anOwner, address _recoverer) external;
function execute(address dest, uint256 value, bytes calldata func) external;
function executeBatch(address[] calldata dest, uint256[] calldata values, bytes[] calldata func) external;
function setSignerPolicy(uint8 policy) external;
function resetSigners(address[] calldata newSigners, uint8 policy) external;
function setFunderWhitelist(address[] calldata newWhitelist, bool[] calldata flags) external;
function changeRecoverer(address newRecoverer) external;
function startRecovery() external;
function completeRecovery(address[] calldata newSigners) external;
function cancelRecovery() external;
function setAppKey(address app, address signer) external;
function whitelistAppAndSetKey(address app, address signer) external;
function whitelistApp(address[] calldata apps, bool[] calldata flags) external;
function claimEngen(uint8 firstVote, uint8 secondVote, uint8 thirdVote) external;
/* ============ Basic Viewers ============ */
function getOwnersCount() external view returns (uint256);
function getNonce() external view returns (uint256);
/* ============ Constants and attrs ============ */
function kintoID() external view returns (IKintoID);
function inRecovery() external view returns (uint256);
function owners(uint256 _index) external view returns (address);
function recoverer() external view returns (address);
function funderWhitelist(address funder) external view returns (bool);
function isFunderWhitelisted(address funder) external view returns (bool);
function appSigner(address app) external view returns (address);
function appWhitelist(address app) external view returns (bool);
function appRegistry() external view returns (IKintoAppRegistry);
function signerPolicy() external view returns (uint8);
function MAX_SIGNERS() external view returns (uint8);
function SINGLE_SIGNER() external view returns (uint8);
function MINUS_ONE_SIGNER() external view returns (uint8);
function ALL_SIGNERS() external view returns (uint8);
function RECOVERY_TIME() external view returns (uint256);
function WALLET_TARGET_LIMIT() external view returns (uint256);
}