Solana
Solana
Solana
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
signatureSubscribe opens a Solana PubSub subscription that watches a single base-58 transaction signature and pushes exactly one notification the moment that transaction reaches your chosen commitment (processed, confirmed, or finalized). The push tells you whether the transaction — which paid its fee in SOL lamports — succeeded or carries an error, and then the subscription auto-cancels. It is the WebSocket way to await a confirmation instead of polling getSignatureStatuses. The matching JSON-RPC endpoint is https://solana.therpc.io/YOUR_API_KEY, and you can cancel an as-yet-unfired subscription with signatureUnsubscribe.
confirmed or finalized, instead of looping over getSignatureStatuses.sendTransaction, then block on this subscription for the result."received" signal as soon as the cluster sees the transaction by setting enableReceivedNotification: true.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | signature | string | Sí | Base-58 transaction signature to watch. |
| 2 | config | object | No | Options: commitment, enableReceivedNotification (bool). |
| Tipo | Descripción |
|---|---|
| integer | A numeric subscription id. signatureNotification pushes { err } (or "received") once, then auto-cancels. |
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
signatureUnsubscribe if you want to drop a subscription that has not fired yet.