@moosty/lisk-connection-provider
v0.0.137
Published
Lisk connection provider component to connect react to Lisk endpoints
Downloads
32
Readme
Lisk Connection Provider
Usage
import { useLiskService } from "@moosty/lisk-connection-provider"
const Component = () => {
const { serviceClient } = useLiskService()
useEffect(() => {
const getBlocks = async () => {
console.log(await serviceClient.get('get.blocks', {limit: 10}))
}
if (serviceClient) {
getBlocks()
}
}, [serviceClient])
}
This package exports:
import {
useLiskService,
ServiceRPCController,
ConnectionState,
ConnectionProviderProps,
NetworkEndpoint,
} from "@moosty/lisk-connection-provider"