Sync salvium and peya tx info bindings
full compatibility check / lib_mingw (monero) (push) Has been cancelled
full compatibility check / lib_mingw (peya) (push) Has been cancelled
full compatibility check / lib_mingw (salvium) (push) Has been cancelled
full compatibility check / lib_android (monero) (push) Has been cancelled
full compatibility check / lib_android (peya) (push) Has been cancelled
full compatibility check / lib_android (salvium) (push) Has been cancelled
full compatibility check / lib_linux (monero) (push) Has been cancelled
full compatibility check / lib_linux (peya) (push) Has been cancelled
full compatibility check / lib_linux (salvium) (push) Has been cancelled
full compatibility check / macos build (monero) (push) Has been cancelled
full compatibility check / macos build (peya) (push) Has been cancelled
full compatibility check / macos build (salvium) (push) Has been cancelled
full compatibility check / ios build (monero) (push) Has been cancelled
full compatibility check / ios build (peya) (push) Has been cancelled
full compatibility check / ios build (salvium) (push) Has been cancelled
full compatibility check / create single release file (push) Has been cancelled
full compatibility check / test ts library (push) Has been cancelled
full compatibility check / linux regression tests (monero) (push) Has been cancelled
full compatibility check / linux regression tests (peya) (push) Has been cancelled
full compatibility check / linux regression tests (salvium) (push) Has been cancelled
full compatibility check / macos regression tests (monero) (push) Has been cancelled
full compatibility check / macos regression tests (peya) (push) Has been cancelled
full compatibility check / macos regression tests (salvium) (push) Has been cancelled
full compatibility check / linux integration tests (monero) (push) Has been cancelled
full compatibility check / linux integration tests (peya) (push) Has been cancelled
full compatibility check / linux integration tests (salvium) (push) Has been cancelled
full compatibility check / macos integration tests (monero) (push) Has been cancelled
full compatibility check / macos integration tests (peya) (push) Has been cancelled
full compatibility check / macos integration tests (salvium) (push) Has been cancelled
full compatibility check / comment on pr (push) Has been cancelled
Build documentation / build (push) Has been cancelled
Check if dart bindings are in sync / android (push) Has been cancelled
Check if checksums are in sync / android (push) Has been cancelled
full compatibility check / lib_mingw (monero) (push) Has been cancelled
full compatibility check / lib_mingw (peya) (push) Has been cancelled
full compatibility check / lib_mingw (salvium) (push) Has been cancelled
full compatibility check / lib_android (monero) (push) Has been cancelled
full compatibility check / lib_android (peya) (push) Has been cancelled
full compatibility check / lib_android (salvium) (push) Has been cancelled
full compatibility check / lib_linux (monero) (push) Has been cancelled
full compatibility check / lib_linux (peya) (push) Has been cancelled
full compatibility check / lib_linux (salvium) (push) Has been cancelled
full compatibility check / macos build (monero) (push) Has been cancelled
full compatibility check / macos build (peya) (push) Has been cancelled
full compatibility check / macos build (salvium) (push) Has been cancelled
full compatibility check / ios build (monero) (push) Has been cancelled
full compatibility check / ios build (peya) (push) Has been cancelled
full compatibility check / ios build (salvium) (push) Has been cancelled
full compatibility check / create single release file (push) Has been cancelled
full compatibility check / test ts library (push) Has been cancelled
full compatibility check / linux regression tests (monero) (push) Has been cancelled
full compatibility check / linux regression tests (peya) (push) Has been cancelled
full compatibility check / linux regression tests (salvium) (push) Has been cancelled
full compatibility check / macos regression tests (monero) (push) Has been cancelled
full compatibility check / macos regression tests (peya) (push) Has been cancelled
full compatibility check / macos regression tests (salvium) (push) Has been cancelled
full compatibility check / linux integration tests (monero) (push) Has been cancelled
full compatibility check / linux integration tests (peya) (push) Has been cancelled
full compatibility check / linux integration tests (salvium) (push) Has been cancelled
full compatibility check / macos integration tests (monero) (push) Has been cancelled
full compatibility check / macos integration tests (peya) (push) Has been cancelled
full compatibility check / macos integration tests (salvium) (push) Has been cancelled
full compatibility check / comment on pr (push) Has been cancelled
Build documentation / build (push) Has been cancelled
Check if dart bindings are in sync / android (push) Has been cancelled
Check if checksums are in sync / android (push) Has been cancelled
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@
|
||||
shallow = true
|
||||
[submodule "salvium"]
|
||||
path = salvium
|
||||
url = https://github.com/salvium/salvium
|
||||
branch = main
|
||||
url = http://54.38.205.168:3000/tiamak/salvium.git
|
||||
branch = salvium_one
|
||||
shallow = true
|
||||
[submodule "peya"]
|
||||
path = peya
|
||||
|
||||
+343
-303
File diff suppressed because it is too large
Load Diff
+343
-303
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
const String wallet2_api_c_h_sha256 = "91218f60e937753a606b1db899ee2ed66a1b02144eb2d79b950ce59804397f84";
|
||||
const String wallet2_api_c_cpp_sha256 = "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
|
||||
const String wallet2_api_c_cpp_sha256 = "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-9d2f5b392bc46d56449be92295071fbc2cb3d230";
|
||||
const String wallet2_api_c_exp_sha256 = "d0f95f1f3bc49f1f59fe4eb0b61826128d7d3bb75405d5a01a252d02db03097d";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
const String wallet2_api_c_h_sha256 = "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330";
|
||||
const String wallet2_api_c_cpp_sha256 = "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41";
|
||||
const String wallet2_api_c_exp_sha256 = "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc";
|
||||
const String wallet2_api_c_h_sha256 = "5ccccf76d6ce6a38985030ed89ff49c8d688b7920c38b85e6072bad415e5c28f";
|
||||
const String wallet2_api_c_cpp_sha256 = "cfbc7bcfb8f8066660a2b19225249d6cc44958272c7816676a32c8ec37fedbda-10d687cab8b3f85d140c3d8cd9eb54b25f029154";
|
||||
const String wallet2_api_c_exp_sha256 = "31b4f92a01ff4812c46e5978c0195f725fe93c87bcd8036391a12fe9d5774621";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
const String wallet2_api_c_h_sha256 = "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330";
|
||||
const String wallet2_api_c_cpp_sha256 = "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41";
|
||||
const String wallet2_api_c_exp_sha256 = "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc";
|
||||
const String wallet2_api_c_h_sha256 = "e058d5ca0dc56bc7c40b55f6428a86bd14dd5b4308c03854ef6a1099aa09d107";
|
||||
const String wallet2_api_c_cpp_sha256 = "c40f623ef0801ceccba760d49176d84122c683e4f832e304372b9c931a02ed25-42ec3826a079af4411ed2632b9e469d428e884ae";
|
||||
const String wallet2_api_c_exp_sha256 = "8743a9af4dd98eb5288829226d8815b8f91ad1bd48db10488e65f4b1983549d8";
|
||||
|
||||
@@ -760,6 +760,39 @@ class PeyaC {
|
||||
_PEYA_TransactionInfo_paymentIdPtr.asFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
int PEYA_TransactionInfo_returnAddresses_count(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
) {
|
||||
return _PEYA_TransactionInfo_returnAddresses_count(
|
||||
txInfo_ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _PEYA_TransactionInfo_returnAddresses_countPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'PEYA_TransactionInfo_returnAddresses_count');
|
||||
late final _PEYA_TransactionInfo_returnAddresses_count =
|
||||
_PEYA_TransactionInfo_returnAddresses_countPtr.asFunction<
|
||||
int Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
ffi.Pointer<ffi.Char> PEYA_TransactionInfo_returnAddresses_at(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
int index,
|
||||
) {
|
||||
return _PEYA_TransactionInfo_returnAddresses_at(
|
||||
txInfo_ptr,
|
||||
index,
|
||||
);
|
||||
}
|
||||
|
||||
late final _PEYA_TransactionInfo_returnAddresses_atPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>,
|
||||
ffi.Int)>>('PEYA_TransactionInfo_returnAddresses_at');
|
||||
late final _PEYA_TransactionInfo_returnAddresses_at =
|
||||
_PEYA_TransactionInfo_returnAddresses_atPtr.asFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>, int)>();
|
||||
|
||||
int PEYA_TransactionInfo_transfers_count(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
) {
|
||||
@@ -2071,6 +2104,37 @@ class PeyaC {
|
||||
ffi.Pointer<ffi.Char> Function(
|
||||
ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>)>();
|
||||
|
||||
void PEYA_Wallet_setStoreTxInfo(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
bool store,
|
||||
) {
|
||||
return _PEYA_Wallet_setStoreTxInfo(
|
||||
wallet_ptr,
|
||||
store,
|
||||
);
|
||||
}
|
||||
|
||||
late final _PEYA_Wallet_setStoreTxInfoPtr = _lookup<
|
||||
ffi
|
||||
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>>(
|
||||
'PEYA_Wallet_setStoreTxInfo');
|
||||
late final _PEYA_Wallet_setStoreTxInfo = _PEYA_Wallet_setStoreTxInfoPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>, bool)>();
|
||||
|
||||
bool PEYA_Wallet_getStoreTxInfo(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
) {
|
||||
return _PEYA_Wallet_getStoreTxInfo(
|
||||
wallet_ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _PEYA_Wallet_getStoreTxInfoPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'PEYA_Wallet_getStoreTxInfo');
|
||||
late final _PEYA_Wallet_getStoreTxInfo = _PEYA_Wallet_getStoreTxInfoPtr
|
||||
.asFunction<bool Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
ffi.Pointer<ffi.Char> PEYA_Wallet_getSeedLanguage(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
) {
|
||||
|
||||
@@ -760,6 +760,39 @@ class SalviumC {
|
||||
_SALVIUM_TransactionInfo_paymentIdPtr.asFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
int SALVIUM_TransactionInfo_returnAddresses_count(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
) {
|
||||
return _SALVIUM_TransactionInfo_returnAddresses_count(
|
||||
txInfo_ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _SALVIUM_TransactionInfo_returnAddresses_countPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Int Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'SALVIUM_TransactionInfo_returnAddresses_count');
|
||||
late final _SALVIUM_TransactionInfo_returnAddresses_count =
|
||||
_SALVIUM_TransactionInfo_returnAddresses_countPtr.asFunction<
|
||||
int Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
ffi.Pointer<ffi.Char> SALVIUM_TransactionInfo_returnAddresses_at(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
int index,
|
||||
) {
|
||||
return _SALVIUM_TransactionInfo_returnAddresses_at(
|
||||
txInfo_ptr,
|
||||
index,
|
||||
);
|
||||
}
|
||||
|
||||
late final _SALVIUM_TransactionInfo_returnAddresses_atPtr = _lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>,
|
||||
ffi.Int)>>('SALVIUM_TransactionInfo_returnAddresses_at');
|
||||
late final _SALVIUM_TransactionInfo_returnAddresses_at =
|
||||
_SALVIUM_TransactionInfo_returnAddresses_atPtr.asFunction<
|
||||
ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>, int)>();
|
||||
|
||||
int SALVIUM_TransactionInfo_transfers_count(
|
||||
ffi.Pointer<ffi.Void> txInfo_ptr,
|
||||
) {
|
||||
@@ -2071,6 +2104,39 @@ class SalviumC {
|
||||
ffi.Pointer<ffi.Char> Function(
|
||||
ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>)>();
|
||||
|
||||
void SALVIUM_Wallet_setStoreTxInfo(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
bool store,
|
||||
) {
|
||||
return _SALVIUM_Wallet_setStoreTxInfo(
|
||||
wallet_ptr,
|
||||
store,
|
||||
);
|
||||
}
|
||||
|
||||
late final _SALVIUM_Wallet_setStoreTxInfoPtr = _lookup<
|
||||
ffi
|
||||
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>>(
|
||||
'SALVIUM_Wallet_setStoreTxInfo');
|
||||
late final _SALVIUM_Wallet_setStoreTxInfo =
|
||||
_SALVIUM_Wallet_setStoreTxInfoPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>, bool)>();
|
||||
|
||||
bool SALVIUM_Wallet_getStoreTxInfo(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
) {
|
||||
return _SALVIUM_Wallet_getStoreTxInfo(
|
||||
wallet_ptr,
|
||||
);
|
||||
}
|
||||
|
||||
late final _SALVIUM_Wallet_getStoreTxInfoPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'SALVIUM_Wallet_getStoreTxInfo');
|
||||
late final _SALVIUM_Wallet_getStoreTxInfo =
|
||||
_SALVIUM_Wallet_getStoreTxInfoPtr
|
||||
.asFunction<bool Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
ffi.Pointer<ffi.Char> SALVIUM_Wallet_getSeedLanguage(
|
||||
ffi.Pointer<ffi.Void> wallet_ptr,
|
||||
) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const moneroChecksum = {
|
||||
wallet2_api_c_h_sha256: "91218f60e937753a606b1db899ee2ed66a1b02144eb2d79b950ce59804397f84",
|
||||
wallet2_api_c_cpp_sha256: "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe",
|
||||
wallet2_api_c_cpp_sha256: "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-9d2f5b392bc46d56449be92295071fbc2cb3d230",
|
||||
wallet2_api_c_exp_sha256: "d0f95f1f3bc49f1f59fe4eb0b61826128d7d3bb75405d5a01a252d02db03097d",
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const peyaChecksum = {
|
||||
wallet2_api_c_h_sha256: "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330",
|
||||
wallet2_api_c_cpp_sha256: "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41",
|
||||
wallet2_api_c_exp_sha256: "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc",
|
||||
wallet2_api_c_h_sha256: "5ccccf76d6ce6a38985030ed89ff49c8d688b7920c38b85e6072bad415e5c28f",
|
||||
wallet2_api_c_cpp_sha256: "cfbc7bcfb8f8066660a2b19225249d6cc44958272c7816676a32c8ec37fedbda-10d687cab8b3f85d140c3d8cd9eb54b25f029154",
|
||||
wallet2_api_c_exp_sha256: "31b4f92a01ff4812c46e5978c0195f725fe93c87bcd8036391a12fe9d5774621",
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const salviumChecksum = {
|
||||
wallet2_api_c_h_sha256: "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330",
|
||||
wallet2_api_c_cpp_sha256: "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41",
|
||||
wallet2_api_c_exp_sha256: "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc",
|
||||
wallet2_api_c_h_sha256: "e058d5ca0dc56bc7c40b55f6428a86bd14dd5b4308c03854ef6a1099aa09d107",
|
||||
wallet2_api_c_cpp_sha256: "c40f623ef0801ceccba760d49176d84122c683e4f832e304372b9c931a02ed25-42ec3826a079af4411ed2632b9e469d428e884ae",
|
||||
wallet2_api_c_exp_sha256: "8743a9af4dd98eb5288829226d8815b8f91ad1bd48db10488e65f4b1983549d8",
|
||||
}
|
||||
|
||||
@@ -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_cpp_sha256 = "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-9d2f5b392bc46d56449be92295071fbc2cb3d230";
|
||||
const char * MONERO_wallet2_api_c_exp_sha256 = "d0f95f1f3bc49f1f59fe4eb0b61826128d7d3bb75405d5a01a252d02db03097d";
|
||||
#endif
|
||||
|
||||
+1
-1
Submodule peya updated: 3aa4499041...10d687cab8
@@ -43,6 +43,8 @@ _PEYA_TransactionInfo_unlockTime
|
||||
_PEYA_TransactionInfo_hash
|
||||
_PEYA_TransactionInfo_timestamp
|
||||
_PEYA_TransactionInfo_paymentId
|
||||
_PEYA_TransactionInfo_returnAddresses_count
|
||||
_PEYA_TransactionInfo_returnAddresses_at
|
||||
_PEYA_TransactionInfo_transfers_count
|
||||
_PEYA_TransactionInfo_transfers_amount
|
||||
_PEYA_TransactionInfo_transfers_address
|
||||
@@ -126,6 +128,8 @@ _PEYA_MultisigState_total
|
||||
_PEYA_DeviceProgress_progress
|
||||
_PEYA_DeviceProgress_indeterminate
|
||||
_PEYA_Wallet_seed
|
||||
_PEYA_Wallet_setStoreTxInfo
|
||||
_PEYA_Wallet_getStoreTxInfo
|
||||
_PEYA_Wallet_setLedgerCallback
|
||||
_PEYA_Wallet_serializeCacheToJson
|
||||
_PEYA_Wallet_getSeedLanguage
|
||||
|
||||
@@ -80,7 +80,9 @@ void library_init() {
|
||||
const char* vectorToString(const std::vector<std::string>& vec, const std::string separator) {
|
||||
// Check if the vector is empty
|
||||
if (vec.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Concatenate all strings in the vector
|
||||
@@ -99,6 +101,11 @@ const char* vectorToString(const std::vector<std::string>& vec, const std::strin
|
||||
}
|
||||
|
||||
const char* vectorToString(const std::vector<uint32_t>& vec, const std::string separator) {
|
||||
if (vec.empty()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
// Calculate the size needed for the result string
|
||||
size_t size = 0;
|
||||
for (size_t i = 0; i < vec.size(); ++i) {
|
||||
@@ -111,11 +118,7 @@ const char* vectorToString(const std::vector<uint32_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
// Allocate memory for the result string
|
||||
char* result = static_cast<char*>(malloc(size + 1));
|
||||
if (result == nullptr) {
|
||||
// Handle memory allocation failure
|
||||
return nullptr;
|
||||
}
|
||||
char* result = new char[size + 1];
|
||||
|
||||
// Fill in the result string
|
||||
char* current = result;
|
||||
@@ -134,6 +137,11 @@ const char* vectorToString(const std::vector<uint32_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
const char* vectorToString(const std::vector<uint64_t>& vec, const std::string separator) {
|
||||
if (vec.empty()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
// Calculate the size needed for the result string
|
||||
size_t size = 0;
|
||||
for (size_t i = 0; i < vec.size(); ++i) {
|
||||
@@ -146,11 +154,7 @@ const char* vectorToString(const std::vector<uint64_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
// Allocate memory for the result string
|
||||
char* result = static_cast<char*>(malloc(size + 1));
|
||||
if (result == nullptr) {
|
||||
// Handle memory allocation failure
|
||||
return nullptr;
|
||||
}
|
||||
char* result = new char[size + 1];
|
||||
|
||||
// Fill in the result string
|
||||
char* current = result;
|
||||
@@ -171,7 +175,9 @@ const char* vectorToString(const std::vector<uint64_t>& vec, const std::string s
|
||||
const char* vectorToString(const std::vector<std::set<uint32_t>>& vec, const std::string separator) {
|
||||
// Check if the vector is empty
|
||||
if (vec.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Use a stringstream to concatenate sets with commas and individual elements with spaces
|
||||
@@ -203,7 +209,9 @@ const char* vectorToString(const std::vector<std::set<uint32_t>>& vec, const std
|
||||
const char* vectorToString(const std::set<uint32_t>& intSet, const std::string separator) {
|
||||
// Check if the set is empty
|
||||
if (intSet.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Use a stringstream to concatenate elements with commas
|
||||
@@ -262,4 +270,4 @@ std::vector<uint64_t> splitStringUint(const std::string& str, const std::string&
|
||||
}
|
||||
tokens.push_back(std::stoull(content)); // Inserting the last token
|
||||
return tokens;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef MONEROC_CHECKSUMS
|
||||
#define MONEROC_CHECKSUMS
|
||||
const char * PEYA_wallet2_api_c_h_sha256 = "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330";
|
||||
const char * PEYA_wallet2_api_c_cpp_sha256 = "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41";
|
||||
const char * PEYA_wallet2_api_c_exp_sha256 = "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc";
|
||||
const char * PEYA_wallet2_api_c_h_sha256 = "5ccccf76d6ce6a38985030ed89ff49c8d688b7920c38b85e6072bad415e5c28f";
|
||||
const char * PEYA_wallet2_api_c_cpp_sha256 = "cfbc7bcfb8f8066660a2b19225249d6cc44958272c7816676a32c8ec37fedbda-10d687cab8b3f85d140c3d8cd9eb54b25f029154";
|
||||
const char * PEYA_wallet2_api_c_exp_sha256 = "31b4f92a01ff4812c46e5978c0195f725fe93c87bcd8036391a12fe9d5774621";
|
||||
#endif
|
||||
|
||||
@@ -396,6 +396,30 @@ const char* PEYA_TransactionInfo_paymentId(void* txInfo_ptr) {
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
int PEYA_TransactionInfo_returnAddresses_count(void* txInfo_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
return txInfo->returnAddresses().size();
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
const char* PEYA_TransactionInfo_returnAddresses_at(void* txInfo_ptr, int index) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
const auto &addresses = txInfo->returnAddresses();
|
||||
if (index < 0 || static_cast<size_t>(index) >= addresses.size()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
std::string str = addresses[static_cast<size_t>(index)];
|
||||
const std::string::size_type size = str.size();
|
||||
char *buffer = new char[size + 1];
|
||||
memcpy(buffer, str.c_str(), size + 1);
|
||||
return buffer;
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
int PEYA_TransactionInfo_transfers_count(void* txInfo_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
@@ -1096,6 +1120,20 @@ const char* PEYA_Wallet_seed(void* wallet_ptr, const char* seed_offset) {
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
void PEYA_Wallet_setStoreTxInfo(void* wallet_ptr, bool store) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
wallet->setStoreTxInfo(store);
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
bool PEYA_Wallet_getStoreTxInfo(void* wallet_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return wallet->storeTxInfo();
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
const char* PEYA_Wallet_getSeedLanguage(void* wallet_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
@@ -2722,7 +2760,7 @@ const char* PEYA_checksum_wallet2_api_c_exp() {
|
||||
// i hate windows
|
||||
|
||||
void PEYA_free(void* ptr) {
|
||||
free(ptr);
|
||||
delete[] static_cast<char*>(ptr);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -190,6 +190,9 @@ extern ADDAPI const char* PEYA_TransactionInfo_hash(void* txInfo_ptr);
|
||||
extern ADDAPI uint64_t PEYA_TransactionInfo_timestamp(void* txInfo_ptr);
|
||||
// virtual std::string paymentId() const = 0;
|
||||
extern ADDAPI const char* PEYA_TransactionInfo_paymentId(void* txInfo_ptr);
|
||||
// virtual const std::vector<std::string> & returnAddresses() const = 0;
|
||||
extern ADDAPI int PEYA_TransactionInfo_returnAddresses_count(void* txInfo_ptr);
|
||||
extern ADDAPI const char* PEYA_TransactionInfo_returnAddresses_at(void* txInfo_ptr, int index);
|
||||
// virtual const std::vector<Transfer> & transfers() const = 0;
|
||||
extern ADDAPI int PEYA_TransactionInfo_transfers_count(void* txInfo_ptr);
|
||||
extern ADDAPI uint64_t PEYA_TransactionInfo_transfers_amount(void* txInfo_ptr, int index);
|
||||
@@ -513,6 +516,10 @@ const int BackgroundSync_CustomPassword = 2;
|
||||
// virtual ~Wallet() = 0;
|
||||
// virtual std::string seed(const std::string& seed_offset = "") const = 0;
|
||||
extern ADDAPI const char* PEYA_Wallet_seed(void* wallet_ptr, const char* seed_offset);
|
||||
// virtual void setStoreTxInfo(bool store) = 0;
|
||||
extern ADDAPI void PEYA_Wallet_setStoreTxInfo(void* wallet_ptr, bool store);
|
||||
// virtual bool storeTxInfo() const = 0;
|
||||
extern ADDAPI bool PEYA_Wallet_getStoreTxInfo(void* wallet_ptr);
|
||||
// virtual std::string getSeedLanguage() const = 0;
|
||||
extern ADDAPI const char* PEYA_Wallet_getSeedLanguage(void* wallet_ptr);
|
||||
// virtual void setSeedLanguage(const std::string &arg) = 0;
|
||||
|
||||
+1
-1
Submodule salvium updated: c388ca652f...42ec3826a0
@@ -43,6 +43,8 @@ _SALVIUM_TransactionInfo_unlockTime
|
||||
_SALVIUM_TransactionInfo_hash
|
||||
_SALVIUM_TransactionInfo_timestamp
|
||||
_SALVIUM_TransactionInfo_paymentId
|
||||
_SALVIUM_TransactionInfo_returnAddresses_count
|
||||
_SALVIUM_TransactionInfo_returnAddresses_at
|
||||
_SALVIUM_TransactionInfo_transfers_count
|
||||
_SALVIUM_TransactionInfo_transfers_amount
|
||||
_SALVIUM_TransactionInfo_transfers_address
|
||||
@@ -126,6 +128,8 @@ _SALVIUM_MultisigState_total
|
||||
_SALVIUM_DeviceProgress_progress
|
||||
_SALVIUM_DeviceProgress_indeterminate
|
||||
_SALVIUM_Wallet_seed
|
||||
_SALVIUM_Wallet_setStoreTxInfo
|
||||
_SALVIUM_Wallet_getStoreTxInfo
|
||||
_SALVIUM_Wallet_setLedgerCallback
|
||||
_SALVIUM_Wallet_serializeCacheToJson
|
||||
_SALVIUM_Wallet_getSeedLanguage
|
||||
|
||||
@@ -80,7 +80,9 @@ void library_init() {
|
||||
const char* vectorToString(const std::vector<std::string>& vec, const std::string separator) {
|
||||
// Check if the vector is empty
|
||||
if (vec.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Concatenate all strings in the vector
|
||||
@@ -99,6 +101,11 @@ const char* vectorToString(const std::vector<std::string>& vec, const std::strin
|
||||
}
|
||||
|
||||
const char* vectorToString(const std::vector<uint32_t>& vec, const std::string separator) {
|
||||
if (vec.empty()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
// Calculate the size needed for the result string
|
||||
size_t size = 0;
|
||||
for (size_t i = 0; i < vec.size(); ++i) {
|
||||
@@ -111,11 +118,7 @@ const char* vectorToString(const std::vector<uint32_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
// Allocate memory for the result string
|
||||
char* result = static_cast<char*>(malloc(size + 1));
|
||||
if (result == nullptr) {
|
||||
// Handle memory allocation failure
|
||||
return nullptr;
|
||||
}
|
||||
char* result = new char[size + 1];
|
||||
|
||||
// Fill in the result string
|
||||
char* current = result;
|
||||
@@ -134,6 +137,11 @@ const char* vectorToString(const std::vector<uint32_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
const char* vectorToString(const std::vector<uint64_t>& vec, const std::string separator) {
|
||||
if (vec.empty()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
// Calculate the size needed for the result string
|
||||
size_t size = 0;
|
||||
for (size_t i = 0; i < vec.size(); ++i) {
|
||||
@@ -146,11 +154,7 @@ const char* vectorToString(const std::vector<uint64_t>& vec, const std::string s
|
||||
}
|
||||
|
||||
// Allocate memory for the result string
|
||||
char* result = static_cast<char*>(malloc(size + 1));
|
||||
if (result == nullptr) {
|
||||
// Handle memory allocation failure
|
||||
return nullptr;
|
||||
}
|
||||
char* result = new char[size + 1];
|
||||
|
||||
// Fill in the result string
|
||||
char* current = result;
|
||||
@@ -171,7 +175,9 @@ const char* vectorToString(const std::vector<uint64_t>& vec, const std::string s
|
||||
const char* vectorToString(const std::vector<std::set<uint32_t>>& vec, const std::string separator) {
|
||||
// Check if the vector is empty
|
||||
if (vec.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Use a stringstream to concatenate sets with commas and individual elements with spaces
|
||||
@@ -203,7 +209,9 @@ const char* vectorToString(const std::vector<std::set<uint32_t>>& vec, const std
|
||||
const char* vectorToString(const std::set<uint32_t>& intSet, const std::string separator) {
|
||||
// Check if the set is empty
|
||||
if (intSet.empty()) {
|
||||
return "";
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Use a stringstream to concatenate elements with commas
|
||||
@@ -262,4 +270,4 @@ std::vector<uint64_t> splitStringUint(const std::string& str, const std::string&
|
||||
}
|
||||
tokens.push_back(std::stoull(content)); // Inserting the last token
|
||||
return tokens;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef MONEROC_CHECKSUMS
|
||||
#define MONEROC_CHECKSUMS
|
||||
const char * SALVIUM_wallet2_api_c_h_sha256 = "93ad4f6247f0b89c17218766c960e956047b0e8032c3db2b791842d576279330";
|
||||
const char * SALVIUM_wallet2_api_c_cpp_sha256 = "2d52bbe50a6db8c1bd68ce4be288c28319f35f48c6d093a3d67d888c8e4b3230-3b00a41fff328c841de122bff97525614fd7da41";
|
||||
const char * SALVIUM_wallet2_api_c_exp_sha256 = "f7ab584f1271f4d533980f403597a1d9e50bced85c233ca2b17c77f4a94ed3bc";
|
||||
const char * SALVIUM_wallet2_api_c_h_sha256 = "e058d5ca0dc56bc7c40b55f6428a86bd14dd5b4308c03854ef6a1099aa09d107";
|
||||
const char * SALVIUM_wallet2_api_c_cpp_sha256 = "c40f623ef0801ceccba760d49176d84122c683e4f832e304372b9c931a02ed25-42ec3826a079af4411ed2632b9e469d428e884ae";
|
||||
const char * SALVIUM_wallet2_api_c_exp_sha256 = "8743a9af4dd98eb5288829226d8815b8f91ad1bd48db10488e65f4b1983549d8";
|
||||
#endif
|
||||
|
||||
@@ -396,6 +396,30 @@ const char* SALVIUM_TransactionInfo_paymentId(void* txInfo_ptr) {
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
int SALVIUM_TransactionInfo_returnAddresses_count(void* txInfo_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
return txInfo->returnAddresses().size();
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
const char* SALVIUM_TransactionInfo_returnAddresses_at(void* txInfo_ptr, int index) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
const auto &addresses = txInfo->returnAddresses();
|
||||
if (index < 0 || static_cast<size_t>(index) >= addresses.size()) {
|
||||
char *buffer = new char[1];
|
||||
buffer[0] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
std::string str = addresses[static_cast<size_t>(index)];
|
||||
const std::string::size_type size = str.size();
|
||||
char *buffer = new char[size + 1];
|
||||
memcpy(buffer, str.c_str(), size + 1);
|
||||
return buffer;
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
int SALVIUM_TransactionInfo_transfers_count(void* txInfo_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||
@@ -1096,6 +1120,20 @@ const char* SALVIUM_Wallet_seed(void* wallet_ptr, const char* seed_offset) {
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
void SALVIUM_Wallet_setStoreTxInfo(void* wallet_ptr, bool store) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
wallet->setStoreTxInfo(store);
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
bool SALVIUM_Wallet_getStoreTxInfo(void* wallet_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return wallet->storeTxInfo();
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
const char* SALVIUM_Wallet_getSeedLanguage(void* wallet_ptr) {
|
||||
DEBUG_START()
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
@@ -2722,7 +2760,7 @@ const char* SALVIUM_checksum_wallet2_api_c_exp() {
|
||||
// i hate windows
|
||||
|
||||
void SALVIUM_free(void* ptr) {
|
||||
free(ptr);
|
||||
delete[] static_cast<char*>(ptr);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -190,6 +190,9 @@ extern ADDAPI const char* SALVIUM_TransactionInfo_hash(void* txInfo_ptr);
|
||||
extern ADDAPI uint64_t SALVIUM_TransactionInfo_timestamp(void* txInfo_ptr);
|
||||
// virtual std::string paymentId() const = 0;
|
||||
extern ADDAPI const char* SALVIUM_TransactionInfo_paymentId(void* txInfo_ptr);
|
||||
// virtual const std::vector<std::string> & returnAddresses() const = 0;
|
||||
extern ADDAPI int SALVIUM_TransactionInfo_returnAddresses_count(void* txInfo_ptr);
|
||||
extern ADDAPI const char* SALVIUM_TransactionInfo_returnAddresses_at(void* txInfo_ptr, int index);
|
||||
// virtual const std::vector<Transfer> & transfers() const = 0;
|
||||
extern ADDAPI int SALVIUM_TransactionInfo_transfers_count(void* txInfo_ptr);
|
||||
extern ADDAPI uint64_t SALVIUM_TransactionInfo_transfers_amount(void* txInfo_ptr, int index);
|
||||
@@ -513,6 +516,10 @@ const int BackgroundSync_CustomPassword = 2;
|
||||
// virtual ~Wallet() = 0;
|
||||
// virtual std::string seed(const std::string& seed_offset = "") const = 0;
|
||||
extern ADDAPI const char* SALVIUM_Wallet_seed(void* wallet_ptr, const char* seed_offset);
|
||||
// virtual void setStoreTxInfo(bool store) = 0;
|
||||
extern ADDAPI void SALVIUM_Wallet_setStoreTxInfo(void* wallet_ptr, bool store);
|
||||
// virtual bool storeTxInfo() const = 0;
|
||||
extern ADDAPI bool SALVIUM_Wallet_getStoreTxInfo(void* wallet_ptr);
|
||||
// virtual std::string getSeedLanguage() const = 0;
|
||||
extern ADDAPI const char* SALVIUM_Wallet_getSeedLanguage(void* wallet_ptr);
|
||||
// virtual void setSeedLanguage(const std::string &arg) = 0;
|
||||
|
||||
Reference in New Issue
Block a user