Solana
Solana
Solana
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
On Solana, a root is the slot the cluster has finalized under its Proof-of-History plus Proof-of-Stake consensus, and rootSubscribe opens a PubSub subscription that pushes the new root slot number each time finalization advances. It is the WebSocket way to follow the settled tip of the chain — the point past which transactions paid for in SOL will not be rolled back — without re-polling getSlot. 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 rootUnsubscribe.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| integer | A numeric subscription id. rootNotification pushes the new root slot (number). |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
slotSubscribe, but each one is fully settled rather than provisional.wss PubSub connection, and you stop it by passing the subscription id to rootUnsubscribe.