mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated tonlib fixed bugs in func validator: partial support for hardforks liteserver: support for waitMasterchainBlock prefix transactions: support for gas flat rate
21 lines
672 B
C++
21 lines
672 B
C++
#pragma once
|
|
#include "td/utils/SharedSlice.h"
|
|
#include "td/utils/Slice.h"
|
|
#include "td/utils/Status.h"
|
|
|
|
#include <functional>
|
|
|
|
namespace tonlib {
|
|
class KeyValue {
|
|
public:
|
|
virtual ~KeyValue() = default;
|
|
virtual td::Status add(td::Slice key, td::Slice value) = 0;
|
|
virtual td::Status set(td::Slice key, td::Slice value) = 0;
|
|
virtual td::Status erase(td::Slice key) = 0;
|
|
virtual td::Result<td::SecureString> get(td::Slice key) = 0;
|
|
virtual void foreach_key(std::function<void(td::Slice)> f) = 0;
|
|
|
|
static td::Result<td::unique_ptr<KeyValue>> create_dir(td::CSlice dir);
|
|
static td::Result<td::unique_ptr<KeyValue>> create_inmemory();
|
|
};
|
|
} // namespace tonlib
|