diff options
| author | Im-Beast <franik.mateusz@gmail.com> | 2024-10-14 17:01:44 +0200 |
|---|---|---|
| committer | Im-Beast <franik.mateusz@gmail.com> | 2024-10-14 17:01:44 +0200 |
| commit | de8c27c0f528738a3377f3e6b4a0ee729d3ce4d8 (patch) | |
| tree | 1cbb8d226ae029160f0481c6fc8e327d5c951e6c /impls | |
| parent | 44fd5e17bbce52caf681850ac79f463d9ce6bb31 (diff) | |
regression tests
Diffstat (limited to 'impls')
| -rw-r--r-- | impls/monero.ts/README.md | 10 | ||||
| -rw-r--r-- | impls/monero.ts/src/wallet.ts | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/impls/monero.ts/README.md b/impls/monero.ts/README.md index e3b20f6..773e8f6 100644 --- a/impls/monero.ts/README.md +++ b/impls/monero.ts/README.md @@ -7,10 +7,16 @@ This library does not ship with `monero_c` libraries.\ To use these bindings you have to bring your own `monero_c` libraries.\ There are at least two ways to do so: + - Ahead-of-time, during builds where you only ship necessary library for a given platform.\ - See [monero-tui](https://github.com/Im-Beast/monero-tui/blob/main/.github/workflows/dev-build.yml) build workflow as an example of doing so. + See [monero-tui](https://github.com/Im-Beast/monero-tui/blob/main/.github/workflows/dev-build.yml) build workflow as + an example of doing so. ```ts - import { loadDylib, Wallet, WalletManager } from "https://raw.githubusercontent.com/MrCyjaneK/monero_c/master/impls/monero.ts/mod.ts"; + import { + loadDylib, + Wallet, + WalletManager, + } from "https://raw.githubusercontent.com/MrCyjaneK/monero_c/master/impls/monero.ts/mod.ts"; // Try to load dylib from the default lib/* path loadDylib(); diff --git a/impls/monero.ts/src/wallet.ts b/impls/monero.ts/src/wallet.ts index 07c40ce..e3aae2e 100644 --- a/impls/monero.ts/src/wallet.ts +++ b/impls/monero.ts/src/wallet.ts @@ -19,6 +19,10 @@ export class Wallet { this.sanitizer = sanitizer; } + getPointer(): WalletPtr { + return this.#walletPtr; + } + async store(path = ""): Promise<boolean> { const bool = await dylib.symbols.MONERO_Wallet_store(this.#walletPtr, CString(path)); await this.throwIfError(); |
