@moosty/lisk-service-events
TypeScript icon, indicating that this package has built-in type declarations

0.0.137 • Public • Published

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"

Package Sidebar

Install

npm i @moosty/lisk-service-events

Weekly Downloads

0

Version

0.0.137

License

none

Unpacked Size

19.4 kB

Total Files

9

Last publish

Collaborators

  • moostyteam
  • corbifex