@moosty/lisk-service-provider
v0.0.137
Published
Lisk service provider component to connect react to Lisk service
Downloads
30
Readme
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, // see @moosty/lisk-connection-provider
coreClient,
} = useLiskService()
}
This package exports:
import {
LiskServiceProvider, // Provider
NetworkEndpoint,
ConnectionProviderProps,
ConnectionState,
LiskClientContext,
useLiskService,
ServiceRPCController
} from "@moosty/lisk-service-provider"