hirosystems/ordinals-api

How can ordhook send events to Ordinals-API?

Closed this issue · 2 comments

First of all thank you for this great project, extremely wonderful and will save time for many people in the ecosystem.

Describe the bug
When Ordinals-API starts with Ordinals predicate starting from block 813209, I think it is okay to get the events back to Ordinals-API, but not help.

{"level":"info","time":"2023-11-04T14:08:29.746Z","pid":442006,"hostname":"n-btcmain-full-0lo11ltx2","name":"api","reqId":"req-8","req":{"method":"POST","url":"/chainhook/dcf4050d-6e9b-42e2-97d6-8b3a3aa547a2","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":40076},"msg":"incoming request"}
{"level":"info","time":"2023-11-04T14:08:29.766Z","pid":442006,"hostname":"n-btcmain-full-0lo11ltx2","name":"api","reqId":"req-8","msg":"Route POST:/chainhook/dcf4050d-6e9b-42e2-97d6-8b3a3aa547a2 not found"}

When the project starts, it can get events and other data from Ordhook, and stores it into PG, then it can provide APIs to users. I wonder if it is right or not, thus I can not see the router that parses the data from Ordhook.

Anything else, should me to build another server to get the data from Ordhook instand of Ordinals-API?

First of all thank you for this great project, extremely wonderful and will save time for many people in the ecosystem.

Describe the bug When Ordinals-API starts with Ordinals predicate starting from block 813209, I think it is okay to get the events back to Ordinals-API, but not help.

{"level":"info","time":"2023-11-04T14:08:29.746Z","pid":442006,"hostname":"n-btcmain-full-0lo11ltx2","name":"api","reqId":"req-8","req":{"method":"POST","url":"/chainhook/dcf4050d-6e9b-42e2-97d6-8b3a3aa547a2","hostname":"127.0.0.1:3000","remoteAddress":"127.0.0.1","remotePort":40076},"msg":"incoming request"}
{"level":"info","time":"2023-11-04T14:08:29.766Z","pid":442006,"hostname":"n-btcmain-full-0lo11ltx2","name":"api","reqId":"req-8","msg":"Route POST:/chainhook/dcf4050d-6e9b-42e2-97d6-8b3a3aa547a2 not found"}

When the project starts, it can get events and other data from Ordhook, and stores it into PG, then it can provide APIs to users. I wonder if it is right or not, thus I can not see the router that parses the data from Ordhook.

Anything else, should me to build another server to get the data from Ordhook instand of Ordinals-API?

I fix it by changing the serverOpts.external_base_url to http://127.0.0.1:3099, I think that chainhook-client misses the ENV.EVENT_PORT

We intentionally leave the EXTERNAL_BASE_URL without an explicit port so you can add it manually via ENV to its value e.g. EXTERNAL_BASE_URL=http://127.0.0.1:3099. We do this because we commonly have a reverse proxy between the API and ordhook that may use a different port from the internal EVENT_PORT. Because of this, I don't think adding the port via code is the best idea. I'll close this issue but let me know if you have further comments.