mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 02:30:01 +01:00
More emscripten methods
This commit is contained in:
parent
d4a05e2f36
commit
9cdbcc6046
@ -236,14 +236,30 @@ emscripten::val parsePriceDataArray(std::uint32_t price, const std::string& curr
|
||||
return arrayToStringArray(parsePriceData(price, currencySymbol[0], useSuffixFormat));
|
||||
}
|
||||
|
||||
emscripten::val parseHalvingCountdownArray(std::uint32_t blockHeight, bool asBlocks) {
|
||||
return arrayToStringArray(parseHalvingCountdown(blockHeight, asBlocks));
|
||||
}
|
||||
|
||||
emscripten::val parseMarketCapArray(std::uint32_t blockHeight, std::uint32_t price, const std::string& currencySymbol, bool bigChars) {
|
||||
return arrayToStringArray(parseMarketCap(blockHeight, price, currencySymbol[0], bigChars));
|
||||
}
|
||||
|
||||
emscripten::val parseBlockFeesArray(std::uint16_t blockFees) {
|
||||
return arrayToStringArray(parseBlockFees(blockFees));
|
||||
}
|
||||
|
||||
emscripten::val parseSatsPerCurrencyArray(std::uint32_t price, const std::string& currencySymbol, bool withSatsSymbol) {
|
||||
return arrayToStringArray(parseSatsPerCurrency(price, currencySymbol[0], withSatsSymbol));
|
||||
}
|
||||
|
||||
EMSCRIPTEN_BINDINGS(my_module) {
|
||||
// emscripten::register_vector<std::string>("StringList");
|
||||
|
||||
emscripten::function("parseBlockHeight", &parseBlockHeightArray);
|
||||
// emscripten::function("parseHalvingCountdown", &parseBlockHeightArray);
|
||||
// emscripten::function("parseMarketCap", &parseBlockHeightArray);
|
||||
// emscripten::function("parseBlockFees", &parseBlockHeightArray);
|
||||
// emscripten::function("parseSatsPerCurrency", &parseBlockHeightArray);
|
||||
emscripten::function("parseHalvingCountdown", &parseHalvingCountdownArray);
|
||||
emscripten::function("parseMarketCap", &parseMarketCapArray);
|
||||
emscripten::function("parseBlockFees", &parseBlockFeesArray);
|
||||
emscripten::function("parseSatsPerCurrency", &parseSatsPerCurrencyArray);
|
||||
emscripten::function("parsePriceData", &parsePriceDataArray);
|
||||
|
||||
emscripten::function("arrayToStringArray", &arrayToStringArray);
|
||||
|
Loading…
Reference in New Issue
Block a user