starknet-specs
starknet-specs copied to clipboard
RPC Spec for starknet_getEvents does not seem correct
The rpc spec says that there is a "from_block" property, but in reality this has to be called "fromBlock" Also the spec says that the page_size and page_number are their own object, this is not true Example:
{ "jsonrpc": "2.0", "id": 0, "method": "starknet_getEvents", "params": [ { "fromBlock": { "block_number": 2271 }, "toBlock": { "block_number": 2272}, "page_size": 10, "page_number": 1 } ] }
--> "fromBlock" rather than "from_block" --> "page_size" / "page_number" are part of same object
Can you review and update. (Im using pathfinder v0.3.01)
Regards
That would be a bug in pathfinder :) I'll open an issue and link it to this one.
The page_size
and page_number
being part of the same object I think is intended as it is part of all_of
?
~~Nevermind scratch that.~~
hiya: in the spec there is:
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/EVENT_FILTER"
},
{
"$ref": "#/components/schemas/RESULT_PAGE_REQUEST"
}
]
}
This suggests 2x objects, when in my request above its only 1
I'm not sure that implies two objects? As I understand it, it implies there is a single object which complies with all of the below schema's.
Two objects would need explicit naming as separate properties.
OK no probs, thanks for the linked issue