IoTeX client
src
storage
storage.h
1
#ifndef IOTEX_STORAGE_H
2
#define IOTEX_STORAGE_H
3
4
#include "IoTeXConstants.h"
5
#include "IoTeXResultCodes.h"
6
#include "stddef.h"
7
#include "stdint.h"
8
9
namespace
iotex
10
{
11
class
Storage
12
{
13
public
:
14
// NOTE:
15
// Store a byte array at storageId, or read a byte array from storageId
16
// Storage id is either a path (c string pointer) or an EEPROM offset
17
// (uint32_t pointer) For OS implementations, paths are used, so a pointer to
18
// a path (c string pointer) is expected as storageId For Arduino, EEPROM is
19
// used, so a pointer to an EEPROM offset (uint32_t pointer) is expected as
20
// storageId
21
22
virtual
ResultCode savePrivateKey(
void
* storageId,
23
const
uint8_t privateKey[IOTEX_PRIVATE_KEY_SIZE]);
24
25
virtual
ResultCode readPrivateKey(
void
* storageId, uint8_t privateKey[IOTEX_PRIVATE_KEY_SIZE]);
26
27
private
:
28
static
bool
_init;
29
static
void
Initialize();
30
};
31
}
// namespace iotex
32
33
// Declare global object
34
extern
iotex::Storage
storage;
35
36
#endif
iotex::Storage
Definition:
storage.h:12
iotex
Definition:
abi.h:12
Generated by
1.9.2