Commit Graph

64 Commits (3073a0e81c7749d61c77588cbf3326c01cc7044d)

Author SHA1 Message Date
Paul Shapiro 3073a0e81c c 2018 -> 2019
5 years ago
Paul Shapiro 8116a319fc Merge branch 'develop' of github.com:mymonero/mymonero-core-js into develop
6 years ago
Paul Shapiro e2b6ac470c fixed payment_id_string key name in sendingFunds.spec.js
6 years ago
Guten Ye 5950000a06 Added decodeRctSimple
6 years ago
Paul Shapiro 8ceb35f95a
Merge pull request #71 from ExodusMovement/guten/derivation_to_scalar
6 years ago
Guten Ye dd9df3a39b Remove newline at the end of file
6 years ago
Guten Ye 3902091a7f Added derivation_to_scalar
6 years ago
Guten Ye d5e4151a6d Added estimate_rct_tx_size
6 years ago
Paul Shapiro 47db6a2763 fixed up tests/monero_utils.spec having removed monero_utils/monero_utils
6 years ago
Paul Shapiro 4b66149c0d fixed up sendingFunds test call interface
6 years ago
Paul Shapiro 9bfa1acee0 big changes: removed monero_utils file, plus IPCSafe_remote_monero_utils (this is now up to applications); completely reworked monero_sendingFunds - SendFunds is gone, now implemented in MyMoneroCoreBridge; removed response_parser_utils unspent outs parsing; updated sendingFunds.spec.... next commit will change CoreBridge return { err_msg } to throws since no IPC is necessary anymore
6 years ago
Paul Shapiro ba44bdb61e support for sending err_msg from server back to C++ to free heap vals container and return err
6 years ago
Paul Shapiro 1ba894aed3 added emscr async send bridge, beginning to implement new async send bridge
6 years ago
Paul Shapiro 2c3f0dc7bd fixed undefined 'moment' error and added tx parsing tests to hit moment codepath
6 years ago
Paul Shapiro f31674bb34 api-breaking change: switched monero_utils from returning a promise to returning a promise-returning-function
6 years ago
Paul Shapiro 18b281e134 enabled asmjs as additional build target, and added code to monero_utils/MyMoneroCoreBridge.js with preliminary wasm support detection and fallback to loading separated asm.js file (and different MyMoneroCoreCpp for ASMJS) to remove need for wasm users to load asmjs and asmjs loading code; the asm.js file is separated out from MyMoneroCoreCpp_ASMJS.js with --separate-asm to improve initial load time and, more importantly here, to enable bin/package_browser_js and other webpack like builds to keep the majority of the asmjs separate from the main mymonero_core.js (or e.g. mymonero_app_browser.js) bundle, so that wasm users don't have to load the asmjs along with the main app bundle - however, the overhead of bundling MyMoneroCoreCpp_ASMJS.js into such a main bundle does still exist. in near future, it would be nice to add an option to webpack.config.browser.common.js or bin/package_browser_js or possible just inheriting/alternate versions of those which can opt to remove asmjs support and throw an exception or alert if it's simply not supported - this is probably what MyMonero will move to within a year or two as legacy browsers fade from usage
6 years ago
Paul Shapiro 64bc1cfa96 monero_utils/monero_utils: added webassembly detection with separate flag to indicate availability of asmjs in build (set to off for now until it can be packaged and loaded separately - probably requires exception in webpack config; tweaks to asmjs build flags to improve performance; added tests/web/test_harness.html (run with simple http server having copied webpacked build/mymonero-core.js and build/mymonero_core_js/ to tests/web/
6 years ago
Paul Shapiro 789c1fa71b breaking change to UnspentOuts hostedMoneroAPIClient method callback args: removed redundant unusedOutputs and switched over to mandatory return of per byte fee - prefers per b in API response with fallback to per kb for deploy rollover - per kb can be removed in the future
6 years ago
Paul Shapiro 5611835d14 updated mymonero-core-cpp; updated bridge for new stepwise sending implementation (ported majority of SendFunds to C++ as send_step*_…; updated tests and removed removed bridge methods like calculate_fee, estimate rct tx size, and create_transaction; New: added tests/sendingFunds.spec.js as integration tests for new monero_sendingFunds_utils implementation - run with 'npm test -- tests/sendingFunds.spec.js'; CMakeLists: enabled ASSERTIONS
6 years ago
Paul Shapiro 3d64d6e0ba added a way to build for and run asmjs
6 years ago
Paul Shapiro 6ce669c76c MyMoneroCoreBridge: setting est fee bulletproof flag default true; tests minor similar updates
6 years ago
Paul Shapiro 6932103c4b rebuild MyMoneroCoreCpp.(js,wasm) with updated ringsize cpp and updated tests with enough decoys to construct tx
6 years ago
Paul Shapiro cc4c1d24d6 removed old function
6 years ago
Paul Shapiro 299c0c4bd6 added address_and_keys_from_seed (aka create_address in previous mymonero-core-js), generate_key_derivation, derive_public_key, derive_subaddress_public_key, and decodeRct
6 years ago
Paul Shapiro 0e48a02c29 cleaned up code around test declarations; revived a few old tests for new methods for #56, and added method scaffolds for them (incremental commit); replaced Jest with Mocha
6 years ago
Paul Shapiro ade81fff6a view only wallet login tests
6 years ago
Paul Shapiro 5518bf3ae4 added wallet creation check
6 years ago
Paul Shapiro 1675952d68 added calculate_fee, estimated_tx_network_fee, estimate_rct_tx_size bridge fns
6 years ago
Paul Shapiro ba5681be39 renamed some tests; (partial) uncommented fee est fns
6 years ago
Paul Shapiro ef830ad28a lots of moving things around; implemented promise constructor for monero_utils (which is actually MyMoneroCoreBridge, a new class to replace cnUtil).. this was chosen after trying both promises directly in the functions and async/await in one or two decent patterns in order to avoid the requirement that integrators support async/await and to retain the option for calls to monero_utils to remain synchronous - added src/module-post as a post-js in order to fix emscripten .then infinite loop ... this PR does not include any kind of support for calling from electron renderer to electron main - that is, the code to detect electron renderer, then intercept ret.err_msg and throw only if not in electron renderer, and relay ret.err_msg otherwise has been removed for the moment.. will likely be added back
6 years ago
Paul Shapiro 4a789ffcfe moved test file
6 years ago
Paul Shapiro 0381c76760 tests: clarified how to load cryptonote_utils
6 years ago
Paul Shapiro 3a764f57ed removed old jest tests.. test which requires index.js triggers Math.random throw somehow.. crypto module / env probably not detected in emscripten.. considering dumping jest(..\?); --verbose on jest call
6 years ago
Paul Shapiro f5e6f1ef99 removed a bunch of tests which don't apply - they should be implemented on monero-core - this commit lacks updates to tests/cryptonote_utils.spec.js, some of which still apply
6 years ago
Paul Shapiro 0bad8449de unlock_time exposed; updating to fixed output amount overflow check
6 years ago
Paul Shapiro f6428658f0 updated mymonerocorecpp to remove need to send dsts to create tx and to fix short pid create tx issue
6 years ago
Paul Shapiro 34954b3dca updated mymonerocorecpp to remove requirement to precompute/pass dsts is_subaddress
6 years ago
Paul Shapiro a39bb6ebf2 updated mymonerocorecpp for lang code prefix checking support
6 years ago
Paul Shapiro 49b7c51811 updated mymonerocorecpp for language_code support
6 years ago
Paul Shapiro dfab7203fa fixed up nettype in seed_and_keys_from_mnemonic call; cryptonote_utils and monero_wallet_utils: moved mnemonic equals and language implementation to C++
6 years ago
Paul Shapiro a0f3bcd69c bridged are_equal_mnemonics
6 years ago
Paul Shapiro b7a996349e some minor cleanups and rebuilds.. switching to O3 instead of Oz to retest speed of key img gen under asm.js before wasm given now no openssl dep
6 years ago
Paul Shapiro d517038059 switching from wasm to asm.js for numerous reasons such as load time (currently, tradeoff is that seed-and-keys-from-mnemonic takes a long time for some reason, maybe keccak... keep JS impl?), switching optimizations to speed
6 years ago
Paul Shapiro 59a383c7c1 bridged new serial_bridge_index methods and added all manual call test cases in MyMoneroCoreCpp_int.node.js - pending replacing JS API fns with these calls. this commit shows the first working POC of transpiling the major monero src to JS, and has shown that startup time must be optimized. that's currently a WIP.. contribution welcome
6 years ago
Paul Shapiro 902a35253c updated MyMoneroCoreCpp.js build; cryptonote_utils: extracted destination formatting and money amount formatting to sendingFunds_utils and money_format_utils respectively, and added IPCsafe (string instead of JSBigInt params) create_transaction variant to support call from electron renderer procs etc, and added more complete load readiness waiting interface, and added locateFile impl for passing as emscripten Module template to locate wasm file in various environments; monero_cryptonote_utils_instance: detecting electron renderer and exposing via electron.remote call (will this cause issues with anyone's build systems trying to include electron\?); commenting logs
6 years ago
Paul Shapiro b529bdbeaa fix ups to emscripten build procedures; swapped cryptonote_crypto_EMSCRIPTEN with MyMoneroCoreCpp.(js,wasm), and had to introduce blocking to methods which use CNCrypto var due to new async Module init; updated Readme
6 years ago
Paul Shapiro c04651731e sc_reduce32 poc
6 years ago
Paul Shapiro 7a7148537c initial emjs build & test chain impl - excluding it from global jest tests pending imminent wasm parent path fix PR merge
6 years ago
HenryNguyen5 cc16607acd Add test for simple rct signature generation
6 years ago
HenryNguyen5 4618329ac1 Add with_fee test, split out helper utils and clean up tests
6 years ago