eth_uninstallFilter
Remove filter subscription on the Centrifuge network.
Parameters#
Varies by method. Please refer to the official Centrifuge JSON-RPC: eth_uninstallFilter documentation for detailed parameter information.
Returns#
The return value depends on the specific method being called.
Implementation Example#
- cURL
- JavaScript
# Create a short-lived filter so we have an ID to remove (requires jq)
FILTER_ID=$(curl -s -X POST https://api-centrifuge.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [{
"fromBlock": "latest",
"toBlock": "latest",
"address": null,
"topics": []
}],
"id": 1
}' | jq -r '.result')
# Uninstall the filter and confirm the response
curl -s -X POST https://api-centrifuge.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d "$(jq -n --arg id \"$FILTER_ID\" '{jsonrpc:\"2.0\", method:\"eth_uninstallFilter\", params:[$id], id:1}')"
const endpoint = 'https://api-centrifuge.n.dwellir.com/YOUR_API_KEY';
const createFilter = async () => {
const payload = {
jsonrpc: '2.0',
method: 'eth_newFilter',
params: [{ fromBlock: 'latest', toBlock: 'latest', address: null, topics: [] }],
id: 1
};
const response = await fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
const { result } = await response.json();
return result;
};
const filterId = await createFilter();
const response = await fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_uninstallFilter',
params: [filterId],
id: 2
})
});
const data = await response.json();
console.log(data.result);
Response Example#
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
Need help? Contact our support team or check the Centrifuge documentation.