Solana
Solana
Solana
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
slotSubscribe opens a Solana PubSub subscription that pushes a small notification — { parent, root, slot } — every time the node processes a new slot. Solana advances a slot roughly every 400ms under Proof-of-History, so this is a steady, lightweight heartbeat of the chain's leading edge, useful on a network whose fees are paid in SOL. The matching JSON-RPC endpoint is https://solana.therpc.io/YOUR_API_KEY, and you stop the stream by passing the returned subscription id to slotUnsubscribe.
getSlot.root field advance to see finalization keep pace with the leading slot.Cette méthode ne prend aucun paramètre. Passez un tableau vide [].
| Type | Description |
|---|---|
| integer | A numeric subscription id. slotNotification pushes { parent, root, slot }. |
| Code | Message | Cause |
|---|---|---|
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
processed slots, which are not yet finalized and can be skipped or rolled back — if you need a settled view, map slots to a commitment yourself or follow rootSubscribe instead.wss PubSub connection, and you stop it by passing the subscription id to slotUnsubscribe.