diff --git a/packages/mymonero-monero-client/prepare.sh b/packages/mymonero-monero-client/prepare.sh old mode 100644 new mode 100755 index 79d325af..f8e47b66 --- a/packages/mymonero-monero-client/prepare.sh +++ b/packages/mymonero-monero-client/prepare.sh @@ -5,12 +5,15 @@ set -e # Exit on any error # Dependencies ## These should be audited! +# Use the webassembly-cleanup branch: mymonero_core_cpp_url='https://github.com/mymonero/mymonero-core-cpp' -mymonero_core_cpp_hash='69408962a900c64483311c42768fa876381d3d57' +mymonero_core_cpp_hash='005fcf096ef429ddc157f489d69b1d3ca7d16244' + +# Use the master branch: monero_core_custom_url='https://github.com/mymonero/monero-core-custom' -monero_core_custom_hash='c601fdc3a7aa0c449a3e2c99df230f503fb67e3c' +monero_core_custom_hash='936afd97467375511032d6a4eef6e76c982148dd' -if [ "$(basename "$(pwd)")" != "mymonero-core-js" ]; then +if [ "$(basename "$(pwd)")" != "mymonero-monero-client" ]; then echo "Should be ran from the repo dir!" exit 1 fi @@ -34,8 +37,8 @@ function clonerepo { # source, target, commit echo "Cloning dependencies..." rm -rf 'src/submodules' && mkdir -p 'src/submodules' -clonerepo "${mymonero_core_cpp_url}" 'src/submodules/mymonero-core-cpp' #"${mymonero_core_cpp_hash}" -clonerepo "${monero_core_custom_url}" 'src/submodules/monero-core-custom' #"${monero_core_custom_hash}" +clonerepo "${mymonero_core_cpp_url}" 'src/submodules/mymonero-core-cpp' "${mymonero_core_cpp_hash}" +clonerepo "${monero_core_custom_url}" 'src/submodules/monero-core-custom' "${monero_core_custom_hash}" # Prepare for build diff --git a/packages/mymonero-monero-client/src/WABridge.js b/packages/mymonero-monero-client/src/WABridge.js index 92a7b548..85c24475 100644 --- a/packages/mymonero-monero-client/src/WABridge.js +++ b/packages/mymonero-monero-client/src/WABridge.js @@ -15,18 +15,17 @@ class WABridge { /** * Creates a transfer of funds to the recipient address and returns the raw signed tx. * @param {object} options - * @param {number} options.amount - * @param {string} options.recipientAddress * @param {number} options.priority * @param {string} options.address * @param {string} options.privateViewKey * @param {string} options.publicSpendKey * @param {string} options.privateSpendKey + * @param {array} options.destinations - Array of to_address and send_amount * @param {boolean} options.shouldSweep * @param {string} options.nettype - The network name eg MAINNET. * @param {object} options.unspentOuts - List of unspent outs as well as per byte fee. * @param {randomOutsCallback} options.randomOutsCb - Used to fetch the random outs from the light wallet service. - * @returns + * @returns {object} - Signed transaction */ async createTransaction (options) { const self = this @@ -176,7 +175,7 @@ class WABridge { * Derives the seed and keys from the mnemonic string. * @param {string} mnemonic - The string of mnemonic words. * @param {string} nettype - The network name eg MAINNET. - * @returns {array} List of public and private keys. + * @returns {object} List of public and private keys. */ seedAndKeysFromMnemonic (mnemonic, nettype) { checkNetType(nettype) @@ -205,7 +204,7 @@ class WABridge { * @param {string} privateSpendKey - The wallet private spend key. * @param {string} seed - The seed as optional. * @param {string} nettype - The network name eg MAINNET. - * @returns {array} Returns if its valid, view only and the public view and spend keys. + * @returns {object} Returns if its valid, view only and the public view and spend keys. */ isValidKeys (address, privateViewKey, privateSpendKey, seed, nettype) { checkNetType(nettype) @@ -227,7 +226,7 @@ class WABridge { * Decodes address to provide spend and view keys. * @param {string} address - The primary address to decode. * @param {string} nettype - The network name eg MAINNET. - * @returns {array} Break down of the address. + * @returns {object} Break down of the address. */ decodeAddress (address, nettype) { checkNetType(nettype) @@ -249,7 +248,7 @@ class WABridge { * Creates a new wallet based on the locale. * @param {string} localeLanguageCode The locale based on language and Country. eg. en-US. * @param {string} nettype - The network name eg MAINNET. - * @returns {array} mnemonic details as well as the public and private keys. + * @returns {object} mnemonic details as well as the public and private keys. */ generateWallet (localeLanguageCode, nettype) { checkNetType(nettype) @@ -291,7 +290,7 @@ class WABridge { * (Deprecated) Returns a list of public amd private keys derived from the seed. * @param {string} seed - The seed string. not to be confused with the mnemonic seed. * @param {string} nettype - The network name eg MAINNET. - * @returns {array} A breakdown of the public and private keys. + * @returns {object} A breakdown of the public and private keys. */ addressAndKeysFromSeed (seed, nettype) { checkNetType(nettype) diff --git a/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.cpp b/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.cpp index 02e77805..1fb9940d 100644 --- a/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.cpp +++ b/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include //