📄 IBackup.sol
D-OPEN SOVEREIGN
1/*
2 * Copyright (c) 2026 DataPond D-Library Pty Ltd. ("The Sanctuary")
3 * Non-Profit Public Library — The World Library
4 *
5 * D-SAFE Certification issued by POND Enterprise.
6 * Published under the D-Open Code Sovereign Licence v1.0 framework
7 * DataPond D-Library All exclusive Right reserved on modifiying the code - CC Attribution to data pond, Non modifiable, Non Commercial.
8 * https://registry.world.bibliotech.com/licence
9 * Source code donated to DataPond D-Library by it's author: data pond.
10 *
11 * Technical Guardian ("The Shield"): Pond Enterprise Pty Ltd. (ACN 694 747 987)
12 * All liability claims about D-SAFE certification issues coming from the published D-Safe direction must be addressed with Pond Enterprise Pty Ltd.
13 * Code Modification automatically voids the certified liability protection provided by Pond Enterprise.
14 */
15
16// SPDX-License-Identifier: Apache-2.0
17pragma solidity ^0.8.24;
18
19interface IBackup {
20 // Admin (storage manages its own authorization)
21 function addAuthorized(address caller) external;
22 function removeAuthorized(address caller) external;
23
24 // Writes (must be onlyAuthorized in storage)
25 function storeBatchActions(uint32 userId, uint256[] calldata patches, uint8 level, uint16[] calldata textIndex, string[] calldata textData) external;
26
27 // Reads
28 function userLevel(uint32 userId) external view returns ( uint8 level );
29 function loadActions(uint32 userId) external view returns (uint256[] memory compressedActions, uint256[] memory indexes, string[] memory stringIndexes);
30 function loadActionsSince(uint32 userId, uint16 index) external view returns (uint256[] memory compressedActions, uint256[] memory indexes, string[] memory stringIndexes);
31 function nbWrites(uint32 userId) external view returns (uint256);
32}