updated to support asset() and type() functionality
This commit is contained in:
@@ -6,7 +6,7 @@ then
|
|||||||
function sha256sum() { shasum -a 256 "$@" ; } && export -f sha256sum
|
function sha256sum() { shasum -a 256 "$@" ; } && export -f sha256sum
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for coin in monero wownero zano;
|
for coin in monero wownero zano salvium;
|
||||||
do
|
do
|
||||||
submodule_hash=$(git ls-tree HEAD ${coin} | xargs | awk '{ print $3 }')
|
submodule_hash=$(git ls-tree HEAD ${coin} | xargs | awk '{ print $3 }')
|
||||||
COIN=$(echo "$coin" | tr a-z A-Z)
|
COIN=$(echo "$coin" | tr a-z A-Z)
|
||||||
|
|||||||
11
impls/monero.dart/ffigen_salvium.yaml
Normal file
11
impls/monero.dart/ffigen_salvium.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: SalviumC
|
||||||
|
description: monero_c salvium bindings
|
||||||
|
output: 'lib/src/generated_bindings_salvium.g.dart'
|
||||||
|
headers:
|
||||||
|
entry-points:
|
||||||
|
- '../../salvium_libwallet2_api_c/src/main/cpp/wallet2_api_c.h'
|
||||||
|
|
||||||
|
exclude-all-by-default: true
|
||||||
|
functions:
|
||||||
|
include:
|
||||||
|
- "SALVIUM_.+"
|
||||||
4004
impls/monero.dart/lib/salvium.dart
Normal file
4004
impls/monero.dart/lib/salvium.dart
Normal file
File diff suppressed because it is too large
Load Diff
4
impls/monero.dart/lib/src/checksum_salvium.dart
Normal file
4
impls/monero.dart/lib/src/checksum_salvium.dart
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
const String wallet2_api_c_h_sha256 = "d6a6d49046e67051e6ee8409d025587a8fcfe16515346139c0723ec9031ba9bf";
|
||||||
|
const String wallet2_api_c_cpp_sha256 = "a426ea10242ec51646cd8f27c1baecac1796035f518b66163ed3ed00255f6247-1f49c178ee19f55088c85be40215a12183b4ef02";
|
||||||
|
const String wallet2_api_c_exp_sha256 = "e2d945d4c9e635008d23cbe936be5bb3e8f03addf54945827aed951e911f9784";
|
||||||
5417
impls/monero.dart/lib/src/generated_bindings_salvium.g.dart
Normal file
5417
impls/monero.dart/lib/src/generated_bindings_salvium.g.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,4 @@ cd "$(realpath $(dirname $0))"
|
|||||||
dart run ffigen --config ffigen_wownero.yaml
|
dart run ffigen --config ffigen_wownero.yaml
|
||||||
dart run ffigen --config ffigen_monero.yaml
|
dart run ffigen --config ffigen_monero.yaml
|
||||||
dart run ffigen --config ffigen_zano.yaml
|
dart run ffigen --config ffigen_zano.yaml
|
||||||
|
dart run ffigen --config ffigen_salvium.yaml
|
||||||
|
|||||||
5
impls/monero.ts/checksum_salvium.ts
Normal file
5
impls/monero.ts/checksum_salvium.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export const salviumChecksum = {
|
||||||
|
wallet2_api_c_h_sha256: "d6a6d49046e67051e6ee8409d025587a8fcfe16515346139c0723ec9031ba9bf",
|
||||||
|
wallet2_api_c_cpp_sha256: "a426ea10242ec51646cd8f27c1baecac1796035f518b66163ed3ed00255f6247-1f49c178ee19f55088c85be40215a12183b4ef02",
|
||||||
|
wallet2_api_c_exp_sha256: "e2d945d4c9e635008d23cbe936be5bb3e8f03addf54945827aed951e911f9784",
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#ifndef SALVIUMC_CHECKSUMS
|
#ifndef MONEROC_CHECKSUMS
|
||||||
#define SALVIUMC_CHECKSUMS
|
#define MONEROC_CHECKSUMS
|
||||||
const char * SALVIUM_wallet2_api_c_h_sha256 = "9e80c4b59a0509aa02fbf01e8df2881b89f82225d1765bfa7856cbdbaf7af116";
|
const char * SALVIUM_wallet2_api_c_h_sha256 = "d6a6d49046e67051e6ee8409d025587a8fcfe16515346139c0723ec9031ba9bf";
|
||||||
const char * SALVIUM_wallet2_api_c_cpp_sha256 = "d229507db508e574bd2badf4819a38dbead8c16a84311ad32c22c887a6003439-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
|
const char * SALVIUM_wallet2_api_c_cpp_sha256 = "a426ea10242ec51646cd8f27c1baecac1796035f518b66163ed3ed00255f6247-1f49c178ee19f55088c85be40215a12183b4ef02";
|
||||||
const char * SALVIUM_wallet2_api_c_exp_sha256 = "d0f95f1f3bc49f1f59fe4eb0b61826128d7d3bb75405d5a01a252d02db03097d";
|
const char * SALVIUM_wallet2_api_c_exp_sha256 = "e2d945d4c9e635008d23cbe936be5bb3e8f03addf54945827aed951e911f9784";
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -290,6 +290,12 @@ bool SALVIUM_TransactionInfo_isCoinbase(void* txInfo_ptr) {
|
|||||||
return txInfo->isCoinbase();
|
return txInfo->isCoinbase();
|
||||||
DEBUG_END()
|
DEBUG_END()
|
||||||
}
|
}
|
||||||
|
uint8_t SALVIUM_TransactionInfo_type(void* txInfo_ptr) {
|
||||||
|
DEBUG_START()
|
||||||
|
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||||
|
return txInfo->type();
|
||||||
|
DEBUG_END()
|
||||||
|
}
|
||||||
uint64_t SALVIUM_TransactionInfo_amount(void* txInfo_ptr) {
|
uint64_t SALVIUM_TransactionInfo_amount(void* txInfo_ptr) {
|
||||||
DEBUG_START()
|
DEBUG_START()
|
||||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||||
@@ -308,6 +314,16 @@ uint64_t SALVIUM_TransactionInfo_blockHeight(void* txInfo_ptr) {
|
|||||||
return txInfo->blockHeight();
|
return txInfo->blockHeight();
|
||||||
DEBUG_END()
|
DEBUG_END()
|
||||||
}
|
}
|
||||||
|
const char* SALVIUM_TransactionInfo_asset(void* txInfo_ptr) {
|
||||||
|
DEBUG_START()
|
||||||
|
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||||
|
std::string str = txInfo->asset();
|
||||||
|
const std::string::size_type size = str.size();
|
||||||
|
char *buffer = new char[size + 1]; //we need extra char for NUL
|
||||||
|
memcpy(buffer, str.c_str(), size + 1);
|
||||||
|
return buffer;
|
||||||
|
DEBUG_END()
|
||||||
|
}
|
||||||
const char* SALVIUM_TransactionInfo_description(void* txInfo_ptr) {
|
const char* SALVIUM_TransactionInfo_description(void* txInfo_ptr) {
|
||||||
DEBUG_START()
|
DEBUG_START()
|
||||||
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
Monero::TransactionInfo *txInfo = reinterpret_cast<Monero::TransactionInfo*>(txInfo_ptr);
|
||||||
|
|||||||
@@ -162,12 +162,16 @@ extern ADDAPI bool SALVIUM_TransactionInfo_isPending(void* txInfo_ptr);
|
|||||||
extern ADDAPI bool SALVIUM_TransactionInfo_isFailed(void* txInfo_ptr);
|
extern ADDAPI bool SALVIUM_TransactionInfo_isFailed(void* txInfo_ptr);
|
||||||
// virtual bool isCoinbase() const = 0;
|
// virtual bool isCoinbase() const = 0;
|
||||||
extern ADDAPI bool SALVIUM_TransactionInfo_isCoinbase(void* txInfo_ptr);
|
extern ADDAPI bool SALVIUM_TransactionInfo_isCoinbase(void* txInfo_ptr);
|
||||||
|
// virtual uint8_t type() const = 0;
|
||||||
|
extern ADDAPI uint8_t SALVIUM_TransactionInfo_type(void* txInfo_ptr);
|
||||||
// virtual uint64_t amount() const = 0;
|
// virtual uint64_t amount() const = 0;
|
||||||
extern ADDAPI uint64_t SALVIUM_TransactionInfo_amount(void* txInfo_ptr);
|
extern ADDAPI uint64_t SALVIUM_TransactionInfo_amount(void* txInfo_ptr);
|
||||||
// virtual uint64_t fee() const = 0;
|
// virtual uint64_t fee() const = 0;
|
||||||
extern ADDAPI uint64_t SALVIUM_TransactionInfo_fee(void* txInfo_ptr);
|
extern ADDAPI uint64_t SALVIUM_TransactionInfo_fee(void* txInfo_ptr);
|
||||||
// virtual uint64_t blockHeight() const = 0;
|
// virtual uint64_t blockHeight() const = 0;
|
||||||
extern ADDAPI uint64_t SALVIUM_TransactionInfo_blockHeight(void* txInfo_ptr);
|
extern ADDAPI uint64_t SALVIUM_TransactionInfo_blockHeight(void* txInfo_ptr);
|
||||||
|
// virtual std::string asset() const = 0;
|
||||||
|
extern ADDAPI const char* SALVIUM_TransactionInfo_asset(void* txInfo_ptr);
|
||||||
// virtual std::string description() const = 0;
|
// virtual std::string description() const = 0;
|
||||||
extern ADDAPI const char* SALVIUM_TransactionInfo_description(void* txInfo_ptr);
|
extern ADDAPI const char* SALVIUM_TransactionInfo_description(void* txInfo_ptr);
|
||||||
// virtual std::set<uint32_t> subaddrIndex() const = 0;
|
// virtual std::set<uint32_t> subaddrIndex() const = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user