Atm-Automat/firmware/include/lnurlutil.h
2025-02-25 19:33:56 +01:00

22 lines
720 B
C++

#ifndef BLESKOMAT_UTIL_H
#define BLESKOMAT_UTIL_H
// Lnurluril.h/cpp code basically taken form Bleskomat util code: https://github.com/bleskomat/bleskomat-diy and simplyfied to our needs.
// Thank you!
#include <Arduino.h>
#include <lnurl.h>
#include <chrono>
#include <cstring>
#include <string>
namespace lnurlutil {
std::string createQrContent (const double accumulatedValue);
std::string createSignedLnurlWithdraw(const double &amount);
std::string lnurlEncode(const std::string &text);
std::string toUpperCase(std::string s);
std::string urlEncode(const std::string &value);
std::string floatToStringWithPrecision(const float &value, const unsigned short &precision = 6);
}
#endif