LocalClientProvider
helper class simplifies the interaction with a local Cardano node.
It provides functionalities like state query, mempool tx monitoring and tx submission through protocol specific
clients on a single connection.
Create and start a LocalClientProvider.
LocalClientProvider localClientProvider = new LocalClientProvider(nodeSocketFile, protocolMagic)
localQueryProvider.start();
LocalStateQueryClient localStateQueryClient = localClientProvider.getLocalStateQueryClient()
LocalTxSubmissionClient localTxSubmissionClient = localClientProvider.getTxSubmissionClient()
LocalTxMonitorClient localTxMonitorClient = localClientProvider.getTxMonitorClient()
The following listeners can be added to LocalClientProvider to listen to events or get results.
localClientProvider.addLocalStateQueryListener(listener)
localClientProvider.addTxMonitorListener(listener)
localClientProvider.addTxSubmissionListener(listener)
localClientProvider.setLocalClientProviderListener(listener)
localClientProvider.shutdown()