From de8c27c0f528738a3377f3e6b4a0ee729d3ce4d8 Mon Sep 17 00:00:00 2001 From: Im-Beast Date: Mon, 14 Oct 2024 17:01:44 +0200 Subject: regression tests --- impls/monero.ts/README.md | 10 ++++++++-- impls/monero.ts/src/wallet.ts | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'impls') 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 { const bool = await dylib.symbols.MONERO_Wallet_store(this.#walletPtr, CString(path)); await this.throwIfError(); -- cgit v1.2.3