From b15227884f33023c3095e2ffbb9087385498702c Mon Sep 17 00:00:00 2001 From: KtorZ Date: Fri, 19 Aug 2022 16:02:06 +0200 Subject: [PATCH] Add support for tx-monitor in the TypeScript REPL. --- clients/TypeScript/packages/repl/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/TypeScript/packages/repl/src/index.ts b/clients/TypeScript/packages/repl/src/index.ts index 995f104e36..d4105fc33a 100644 --- a/clients/TypeScript/packages/repl/src/index.ts +++ b/clients/TypeScript/packages/repl/src/index.ts @@ -9,6 +9,7 @@ import { getServerHealth, Schema, StateQuery, + TxMonitor, TxSubmission } from '@cardano-ogmios/client' import chalk from 'chalk' @@ -78,6 +79,11 @@ const logObject = (obj: Object) => stakeDistribution: () => StateQuery.stakeDistribution(context), systemStart: () => StateQuery.systemStart(context), submitTx: (bytes: string) => TxSubmission.submitTx(context, bytes), + awaitAcquire: () => TxMonitor.awaitAcquire(context), + hasTx: (id: Schema.TxId) => TxMonitor.hasTx(context, id), + nextTx: (args: { fields?: 'all' } = {}) => TxMonitor.nextTx(context, args), + sizeAndCapacity: () => TxMonitor.sizeAndCapacity(context), + releaseMempool: () => TxMonitor.release(context), utxo: (filters?: Schema.Address[]|Schema.TxIn[]) => StateQuery.utxo(context, filters) })