signatureUnsubscribe – Solana
The signatureUnsubscribe JSON-RPC method allows clients to unsubscribe from signature confirmation notifications.
The signatureUnsubscribe RPC Solana method is used to cancel an active signature subscription.
When a subscription ID is provided, the server will stop sending notifications for the corresponding transaction signature.
Supported Networks
Mainnet
Devnet
Parameters
Required Parameter
number: The subscription ID to cancel.
Result
The response returns a boolean value indicating the status of the unsubscribe operation.
Result Format
bool: true if the unsubscribe was successful; otherwise, false.
Request Example
API Endpoints
JSON-RPC Request
Response
A successful request returns a boolean value.
Example Response
In this response:
result: true indicates the unsubscribe operation was successful.
Error Handling
Common signatureUnsubscribe error scenarios:
Invalid subscription ID: The provided ID does not match an active subscription.
Network issues: Problems with the Solana JSON-RPC API endpoints.
signatureunsubscribe error: invalid subscription id: This error occurs if an invalid ID is passed to the RPC call.
Example Error Response
Use Cases
The Solana signatureUnsubscribe method is essential for:
Managing network resources by terminating unnecessary subscriptions.
Optimizing dApp performance.
Reducing network bandwidth consumption.
Code signatureUnsubscribe Example – Web3 Integration
Integration with Web3
By integrating Web3 signatureUnsubscribe into Solana's Core API, developers can:
Manage subscriptions more effectively.
Reduce network congestion.
Optimize application performance.
Last updated