9 Commits

Author SHA1 Message Date
Mateusz Franik
85770ea6f1 tests: run integration and regression tests on other platforms (#93)
* tests: add script to download test dependencies from fallback mirrors

* tests: use the new download_deps script, run tests on macos

* ci: download proper artifact for macos

* chore: make download_deps script download everything to dir named `monero_c` when ran directly

* tests: await downloading deps

* tests download  proper monero_c version in prepareMoneroC

* tests: fix typos

* tests: add file data for more targets

* tests: print why retrieving tags failed

* chore: change mirror url endpoint from `monero_c` to `download_mirror`

* tests: use cached releases endpoint to prevent ratelimits

* ci: remove brew@1.76 dependency

* tests: fix macos dylib path

* feat!(monero.ts): make `createTransactionMultDest` optionally return `null`

* feat(monero.ts): make `Wallet_reconnectDevice` symbol optional

* tests: don't try to extract file if out already exists

* tests: remove unnecesary directory rm calls

* ci: set regression tests to use canary
2024-12-30 10:39:28 +01:00
Mateusz Franik
40c1a1bda4 feat!: monero.ts rewrite, integration tests (#80)
* feat: move spend/view key symbols to the monero.ts implementation
* feat: add integration tests for `0001-polyseed.patch`
* feat(monero.ts): add support for backgroundSync and closing the wallet
* feat: add integration tests for `0002-wallet-background-sync-with-just-the-view-key.patch`
* feat!: require users to provide own node url
BREAKING CHANGE: Requires users manual call to `Wallet.initWallet` after wallet creation with preferred node url
* feat: add background sync test for `0002-wallet-background-sync-with-just-the-view-key.patch`
* ci: add integration tests step
* feat(monero.ts): support creating and recovering wallet from polyseed
* feat: actually test polyseeds in the integration test
* chore: remove legacy comments
* fix: uncomment getting moneroC
* feat(monero.ts): add support for reading wallet's seed
* feat: add seed test for `0009-Add-recoverDeterministicWalletFromSpendKey.patch`
* chore: slight refactor
* feat(monero.ts): add bindings for `setOffline` and `isOffline`
* feat: add integration tests for `0012-WIP-UR-functions.patch`
* fix: use correct node depending on the coin
* fix: prevent segfaults on wownero
* feat(monero.ts): add partial bindings for `Coins` and `CoinsInfo`
* feat: add integration tests for `0004-coin-control.patch`
* fix coin control
* clean up console.logs
* chore: comment out the entire block
* dev: add devcontainer config for deno
* fix(monero.ts): invalid PendingTransactionPtr brand
* feat(monero.ts): add bindings for retrieving keys and managing transactions
* feat: improve `0012-WIP-UR-functions.patch` tests to follow the airgap doc
* fix(monero.ts): make UR methods optional so wownero can load properly
* remove flaky balance assertions
* tests: add a little bit of delay to make 0002 patch test less flake-y
* tests: run wallet transaction tests on ci
* enable logging to determine why it segfaults on ci
* add delay to every syncBlockchain call
* its console logging time
* even more console.logs
* eep
* eep more
* dont assert that its not frozen
* remove console.logs
* fix(monero.ts): type typo becoming a default value
* feat(monero.ts): add bindings for `createTransactionMultDest`
* feat(monero.ts): support returning multiple values whenever necessary
* feat(monero.ts): add missing reexports
* feat(monero.ts)!: rewrite bindings
BREAKING CHANGES!:
 - Calls to methods no longer automatically throw errors, you should take care of handling errors yourself
 	- This means the whole sanitizer ordeal is gone, no more sanitize arguments etc.
 	- Some misplaced methods have been moved to their "proper" place, e.g. creating Wallet is now possible using WalletManager instance methods, instead of passing WalletManager instance to Wallet's static method
 	- Return types probably changed in places, methods were inconsitent about returning string or empty string and `string | null`, now its always `string | null`
 - Every available symbol should now be available in `symbols`, even for the things that are not yet implemented, so you can access them in that case
* tests: adapt tests to monero.ts changes
* tests: reuse dylib in tests

---------

Co-authored-by: cyan <cyjan@mrcyjanek.net>
2024-12-01 09:02:20 -05:00
Mateusz Franik
fd7bb6ae1c feat: wownero typescript bindings, regression tests (#71)
* regression tests
* ci: move regression_check to full_check workflow, reuse artifact build
* feat: support wownero in monero.ts bindings
* ci: test wownero regressions as well
* extract wownero-cli as wownero
* actually load wownero when specified
* fix: commitUR not being a symbol in wownero
2024-10-16 07:55:11 +02:00
Czarek Nakamoto
b72d2dff62 feat: split MONERO and WOWNERO prefixed functions
So basically: when we open the .so file, we define some
symbols, and it appears that if we load something else,
with the same symbols, under the same thread we cause
some funky behaviour - like calling function a wownero
function MONERO_Wallet_address() resulting in a monero
address being generated.
Needless to say, this is undesired, and a blocker for
https://github.com/cypherstack/stack_wallet/pull/818

I'm afraid that this may not solve all of our issues (but
will solve some significant roadblocks), because of the
"genesis block" issue, as output of
nm -gDC release/wownero/x86_64-linux-gnu_libwallet2_api_c.so | grep genesis
indicate that these functions may share *something* in
common across both WOW and XMR libraries.
In a case in which this fix won't be sufficient, I think that
the way forward would be to close the dynamic libraries,
but before we do that I want to check if maybe there is
a change to run multiple wallets at once.
2024-03-31 09:19:47 +02:00
Czarek Nakamoto
2b685de9a4 update monero to use upstream with patches instead of fork 2024-03-12 19:17:40 +01:00
Czarek Nakamoto
06c7a260e0 feat: sailfishos port (initial) 2024-02-28 07:34:26 +01:00
Czarek Nakamoto
67c47c5491 add signing functionality 2024-02-17 18:10:28 +01:00
Czarek Nakamoto
48e6f06142 feat: cache build results
debug:
void MONERO_DEBUG_test0();
bool MONERO_DEBUG_test1(bool x);
int MONERO_DEBUG_test2(int x);
uint64_t MONERO_DEBUG_test3(uint64_t x);
void* MONERO_DEBUG_test4(uint64_t x);
const char* MONERO_DEBUG_test5();
const char* MONERO_DEBUG_test5_std();
2023-12-30 13:47:07 +01:00
Czarek Nakamoto
0f612f0bbe Initial commit 2023-12-26 21:43:14 +01:00