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"