open-index/open-npm huggingface dataset:
npm package: @moosty/lisk-service-events
Description: Lisk service events
Author: Moosty
Latest version: 0.0.137

# Lisk Service Events

Service events provider, you can access last block, forgers, fee estimates, transactions and round, through the `useServiceEvents()` hook.

```jsx
+ import { ServiceEventsProvider } from "@moosty/lisk-service-events"

const App = () => {
  
  return (
    <LiskServiceProvider endpoints={targetNetwork}>
+      <ServiceEventsProvider>
        <... />
+      </ServiceEventsProvider>
    </LiskServiceProvider>)
}
```

# Usage

```tsx
import { useServiceEvents } from "@moosty/lisk-service-events"

const Component = () => {
  const {block, forgers, feeEstimates, transactions, round} = useServiceEvents()
}
```

This package exports:

```tsx
import {
  ServiceEventsProvider, // Provider
  useServiceEvents, // Hook
  ServiceEventsProps, // Hook return interface
  BlockType, 
  FeeEstimatesType,
  ForgersType,
  RoundType,
  TransactionsType
} from "@moosty/lisk-service-events"
```
npm package: @moosty/lisk-service-provider
Description: Lisk service provider component to connect react to Lisk service
Author: Moosty
Latest version: 0.0.137

# Lisk Service Provider

With Lisk Service provider, you can access the lisk service apis.

```jsx
import { LiskServiceProvider } from "@moosty/lisk-service-provider"

const targetNetwork = [
  {
    host: "wss://gateway-testnet.liskscan.com",
    type: "serviceRPC",
  },
]

ReactDOM.render(
  +<LiskServiceProvider endpoints={targetNetwork}>
    <App />
    + </LiskServiceProvider>,
  document.getElementById("root"),
)
```

# Usage
also see [@moosty/lisk-connection-provider](https://github.com/Moosty/moosty-tools/blob/main/packages/lisk-connection-provider/README.md)
```jsx
import { useLiskService } from "@moosty/lisk-service-provider"

const Component = () => {
  const {
    endpoints,
    connections,
    serviceClient, // see @moosty/lisk-connection-provider
    coreClient,
  } = useLiskService()
}
```

This package exports:

```tsx
import {
  LiskServiceProvider, // Provider
  NetworkEndpoint,
  ConnectionProviderProps,
  ConnectionState,
  LiskClientContext,
  useLiskService,
  ServiceRPCController

} from "@moosty/lisk-service-provider"
```