Lisk Service Provider
With Lisk Service provider, you can access the lisk service apis.
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
import { useLiskService } from "@moosty/lisk-service-provider"
const Component = () => {
const {
endpoints,
connections,
serviceClient,
coreClient,
} = useLiskService()
}
This package exports:
import {
LiskServiceProvider,
NetworkEndpoint,
ConnectionProviderProps,
ConnectionState,
LiskClientContext,
useLiskService,
ServiceRPCController
} from "@moosty/lisk-service-provider"