@moosty/lisk-service-events
v0.0.137
Published
Lisk service events
Downloads
34
Readme
Lisk Service Events
Service events provider, you can access last block, forgers, fee estimates, transactions and round, through the useServiceEvents()
hook.
+ import { ServiceEventsProvider } from "@moosty/lisk-service-events"
const App = () => {
return (
<LiskServiceProvider endpoints={targetNetwork}>
+ <ServiceEventsProvider>
<... />
+ </ServiceEventsProvider>
</LiskServiceProvider>)
}
Usage
import { useServiceEvents } from "@moosty/lisk-service-events"
const Component = () => {
const {block, forgers, feeEstimates, transactions, round} = useServiceEvents()
}
This package exports:
import {
ServiceEventsProvider, // Provider
useServiceEvents, // Hook
ServiceEventsProps, // Hook return interface
BlockType,
FeeEstimatesType,
ForgersType,
RoundType,
TransactionsType
} from "@moosty/lisk-service-events"