diff options
| author | Mateusz Franik <47059999+Im-Beast@users.noreply.github.com> | 2024-10-16 07:55:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 07:55:11 +0200 |
| commit | fd7bb6ae1c27ffe5d41f3a818ee9034d9bb76138 (patch) | |
| tree | 01e57a1c483370a3f023ed27d401069502694396 /impls/monero.ts/src/transaction_history.ts | |
| parent | 44fd5e17bbce52caf681850ac79f463d9ce6bb31 (diff) | |
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
Diffstat (limited to 'impls/monero.ts/src/transaction_history.ts')
| -rw-r--r-- | impls/monero.ts/src/transaction_history.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/impls/monero.ts/src/transaction_history.ts b/impls/monero.ts/src/transaction_history.ts index cc76fc2..aab64da 100644 --- a/impls/monero.ts/src/transaction_history.ts +++ b/impls/monero.ts/src/transaction_history.ts @@ -1,6 +1,5 @@ -import { dylib } from "./bindings.ts"; import { TransactionInfo, TransactionInfoPtr } from "./transaction_info.ts"; -import { CString } from "./utils.ts"; +import { CString, getSymbol } from "./utils.ts"; export type TransactionHistoryPtr = Deno.PointerObject<"transactionHistory">; @@ -12,24 +11,23 @@ export class TransactionHistory { } async count(): Promise<number> { - return await dylib.symbols.MONERO_TransactionHistory_count(this.#txHistoryPtr); + return await getSymbol("TransactionHistory_count")(this.#txHistoryPtr); } async transaction(index: number): Promise<TransactionInfo> { return new TransactionInfo( - (await dylib.symbols.MONERO_TransactionHistory_transaction( - this.#txHistoryPtr, - index, - )) as TransactionInfoPtr, + ( + await getSymbol("TransactionHistory_transaction")(this.#txHistoryPtr, index) + ) as TransactionInfoPtr, ); } async refresh(): Promise<void> { - await dylib.symbols.MONERO_TransactionHistory_refresh(this.#txHistoryPtr); + await getSymbol("TransactionHistory_refresh")(this.#txHistoryPtr); } async setTxNote(transactionId: string, note: string): Promise<void> { - await dylib.symbols.MONERO_TransactionHistory_setTxNote( + await getSymbol("TransactionHistory_setTxNote")( this.#txHistoryPtr, CString(transactionId), CString(note), |
