Add eth filter RPC endpoints and FilterChanges type. (#3150)
This commit is contained in:
@@ -73,6 +73,13 @@ const types: DefinitionsTypes = {
|
|||||||
Null: 'Null'
|
Null: 'Null'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
EthFilterChanges: {
|
||||||
|
_enum: {
|
||||||
|
Logs: 'Vec<EthLog>',
|
||||||
|
Hashes: 'Vec<H256>',
|
||||||
|
Empty: 'Null'
|
||||||
|
}
|
||||||
|
},
|
||||||
EthFilterTopic: {
|
EthFilterTopic: {
|
||||||
_enum: {
|
_enum: {
|
||||||
Single: 'EthFilterTopicInner',
|
Single: 'EthFilterTopicInner',
|
||||||
|
|||||||
@@ -131,6 +131,20 @@ export const rpc: DefinitionsRpc = {
|
|||||||
],
|
],
|
||||||
type: 'Bytes'
|
type: 'Bytes'
|
||||||
},
|
},
|
||||||
|
getFilterChanges: {
|
||||||
|
description: 'Returns filter changes since last poll.',
|
||||||
|
params: [
|
||||||
|
{ name: 'index', type: 'U256' }
|
||||||
|
],
|
||||||
|
type: 'EthFilterChanges'
|
||||||
|
},
|
||||||
|
getFilterLogs: {
|
||||||
|
description: 'Returns all logs matching given filter (in a range \'from\' - \'to\').',
|
||||||
|
params: [
|
||||||
|
{ name: 'index', type: 'U256' }
|
||||||
|
],
|
||||||
|
type: 'Vec<EthLog>'
|
||||||
|
},
|
||||||
getLogs: {
|
getLogs: {
|
||||||
description: 'Returns logs matching given filter object.',
|
description: 'Returns logs matching given filter object.',
|
||||||
params: [
|
params: [
|
||||||
@@ -239,6 +253,23 @@ export const rpc: DefinitionsRpc = {
|
|||||||
params: [],
|
params: [],
|
||||||
type: 'bool'
|
type: 'bool'
|
||||||
},
|
},
|
||||||
|
newBlockFilter: {
|
||||||
|
description: 'Returns id of new block filter.',
|
||||||
|
params: [],
|
||||||
|
type: 'U256'
|
||||||
|
},
|
||||||
|
newFilter: {
|
||||||
|
description: 'Returns id of new filter.',
|
||||||
|
params: [
|
||||||
|
{ name: 'filter', type: 'EthFilter' }
|
||||||
|
],
|
||||||
|
type: 'U256'
|
||||||
|
},
|
||||||
|
newPendingTransactionFilter: {
|
||||||
|
description: 'Returns id of new block filter.',
|
||||||
|
params: [],
|
||||||
|
type: 'U256'
|
||||||
|
},
|
||||||
protocolVersion: {
|
protocolVersion: {
|
||||||
description: 'Returns protocol version encoded as a string (quotes are necessary).',
|
description: 'Returns protocol version encoded as a string (quotes are necessary).',
|
||||||
params: [],
|
params: [],
|
||||||
@@ -292,5 +323,12 @@ export const rpc: DefinitionsRpc = {
|
|||||||
description: 'Returns an object with data about the sync status or false.',
|
description: 'Returns an object with data about the sync status or false.',
|
||||||
params: [],
|
params: [],
|
||||||
type: 'EthSyncStatus'
|
type: 'EthSyncStatus'
|
||||||
|
},
|
||||||
|
uninstallFilter: {
|
||||||
|
description: 'Uninstalls filter.',
|
||||||
|
params: [
|
||||||
|
{ name: 'index', type: 'U256' }
|
||||||
|
],
|
||||||
|
type: 'bool'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user