import { JsonRpcProvider } from '@mysten/sui.js';
const provider = new JsonRpcProvider("wss://sui-devnet.shinami.com/ws/v1/ACCESS_KEY");
// create a subscription to see events for transferObjects
const subscriptionId = await provider.subscribeEvent(
{ EventType: 'TransferObject' },
(event: SuiEventEnvelope) => {
// handle subscription notification message here. This function is called once per subscription message.
}
);
// to unsubscribe, call 'sui_unsubscribeEvent' with params: [ subscriptionId ]
const subFoundAndRemoved = await provider.unsubscribeEvent(subscriptionId);
import { JsonRpcProvider } from '@mysten/sui.js';
const provider = new JsonRpcProvider("https://sui-devnet.shinami.com/api/v1/ACCESS_KEY");
const suiSupply = await provider.getTotalSupply("0x2::sui::SUI");
Dynamically scalable
Perfectly elastic
Whether growth is predictable or faster than you imagined, your app will seamlessly scale to meet the demand.