import { createSuiClient } from "@shinami/clients/sui";
const nodeClient = createSuiClient({{nodeAccessKey}});
// get the current gas price
await nodeClient.getReferenceGasPrice();
import { createSuiClient } from "@shinami/clients/sui";
const nodeClient = createSuiClient({{nodeAccessKey}});
// when you subscribe, you receive a function to unsubscribe
let unsubscribeFunction = await nodeClient.subscribeEvent({
filter: {
// receive all events emitted by a Move package
Package: "thePackageId"
},
// What you want to happen when an event is received
onMessage: yourCallbackFunction
});
// returns true if successful, false if not
let result = await unsubscribeFunction();
Reliability. Scalability.
Give your users the experience they demand, no matter how big you grow.