serialize cache to json

This commit is contained in:
Czarek Nakamoto
2025-08-05 14:55:35 -04:00
committed by Some Random Crypto Guy
parent 8f10e7748f
commit 2968e45b4c
9 changed files with 509 additions and 9 deletions

View File

@@ -123,6 +123,7 @@ _MONERO_DeviceProgress_progress
_MONERO_DeviceProgress_indeterminate
_MONERO_Wallet_seed
_MONERO_Wallet_setLedgerCallback
_MONERO_Wallet_serializeCacheToJson
_MONERO_Wallet_getSeedLanguage
_MONERO_Wallet_setSeedLanguage
_MONERO_Wallet_status

View File

@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * MONERO_wallet2_api_c_h_sha256 = "91218f60e937753a606b1db899ee2ed66a1b02144eb2d79b950ce59804397f84";
const char * MONERO_wallet2_api_c_cpp_sha256 = "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
const char * MONERO_wallet2_api_c_exp_sha256 = "b2f2355242f9ad852ccf860a60a5c7a74054f9450ba1fbf9c0f42c58dbfdee9d";
const char * MONERO_wallet2_api_c_h_sha256 = "3515e4c9e537ca3efa664f0b364a3aeb106ff64337f542a262ce104c00b31235";
const char * MONERO_wallet2_api_c_cpp_sha256 = "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
const char * MONERO_wallet2_api_c_exp_sha256 = "0561e14606106e6b0ec49fb2aefe743ff500f7c3de07557f7041e06aef9509ce";
#endif

View File

@@ -2162,6 +2162,14 @@ void MONERO_Wallet_setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *c
DEBUG_END()
}
const char* MONERO_Wallet_serializeCacheToJson(void* wallet_ptr) {
DEBUG_START()
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
std::string result = wallet->serializeCacheToJson();
return strdup(result.c_str());
DEBUG_END()
}
void* MONERO_WalletManager_createWallet(void* wm_ptr, const char* path, const char* password, const char* language, int networkType) {
DEBUG_START()
Monero::WalletManager *wm = reinterpret_cast<Monero::WalletManager*>(wm_ptr);

View File

@@ -842,6 +842,7 @@ extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceReceive();
extern ADDAPI void MONERO_Wallet_setDeviceReceivedData(unsigned char* data, size_t len);
extern ADDAPI void MONERO_Wallet_setDeviceSendData(unsigned char* data, size_t len);
extern ADDAPI void MONERO_Wallet_setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command, unsigned int cmd_len));
extern ADDAPI const char* MONERO_Wallet_serializeCacheToJson(void* wallet_ptr);
// };
// struct WalletManager