64 static inline uint8_t* intToU8a(
int value) {
65 uint8_t* bytes =
new uint8_t[4];
67 bytes[0] = (value >> 0) & 0xFF;
68 bytes[1] = (value >> 8) & 0xFF;
69 bytes[2] = (value >> 16) & 0xFF;
70 bytes[3] = (value >> 24) & 0xFF;
83 static inline int u8aToInt(uint8_t bytes[4]) {
87 result |= bytes[1] << 8;
88 result |= bytes[2] << 16;
89 result |= bytes[3] << 24;
102 static inline uint8_t* doubleToU8a(
double value) {
106 uint8_t* bytes =
new uint8_t[8];
107 for(uint8_t i = 0; i < 8; ++i)
121 static inline double u8aToDouble(uint8_t bytes[8]) {
123 for(uint8_t i = 0; i < 8; ++i)