CreateIndexer
Creates a new indexer to listen to chain events
Request Parameters
-
name
(required)A name for the indexer
-
binary_id
(required)The ID of the executable binary to run as the indexer. This should be the ID provided by UploadBinary
-
subscriptions
(required)The event subscriptions to configure for the indexer, which determines which events the indexer will receive. At least one subscription must be provided.
-
transactions
Subscribe the indexer to transaction events
-
filter_programs
(optional)A list of program addresses to filter transactions by. If provided, the indexer will only receive transactions that include an instruction for at least one of the specified programs.
-
filter_accounts
(optional)A list of account addresses to filter transactions by. If provided, the indexer will only receive transactions that include at least one of the specified accounts.
-
-
Response
-
indexer
(object)The created indexer object
Example Request
{
"jsonrpc": "2.0",
"method": "dyndexer_createIndexer",
"params": [
{
"name": "my-indexer",
"binary_id": "binary-123456",
"subscriptions": [
{ "transaction": {} }
]
}
],
}
Example Response
{
"jsonrpc": "2.0",
"result": {
"indexer": {
"id": "indexer-123456",
"name": "my-indexer",
"binary_id": "binary-123456",
}
}
}