hirosystems / ordinals-api

Bitcoin Ordinals API
Apache License 2.0
197 stars 58 forks source link

delegate inscription content not displayed #370

Open DeeList opened 2 months ago

DeeList commented 2 months ago

The following inscriptions fail to appear in Leather:

https://ordinals.hiro.so/inscription/a77c2fda458fc67028cb444b3b3fdcdf36b168d89ceb7286630d2fc76b21a714i476 https://ordinals.hiro.so/inscription/fc7e21fc4e8140100f5913a0e0d6ce1675b73298ba97de65ef0130169369f3dci421

hiro hiro2
plasmatech8 commented 2 months ago

The /ordinals/v1/inscriptions/:id/content endpoint is not returning any data for some inscriptions.

Not even throwing an error, just returning an empty response. example

Could this be related to not supporting unknown and/or HTML mime types?

Edit:

Using the "genesis-ID" way seems to work while sat number doesn't.

More complicated inscriptions (which I assume have things like parent inscriptions) still don't work.

It feels like it is could be related to this, but I can't see any problem in the code.

rafaelcr commented 3 weeks ago

Transferring to ordhook. I have confirmed the content for some locations is not being sent correctly via predicates, for example (note content_bytes and content_length):

{
  "inscription_revealed": {
    "content_bytes": "0x",
    "content_length": 0,
    "content_type": "image/png",
    "curse_type": "Generic",
    "delegate": "b84f7b75e366a4300fb98ad5267803f398c2607a72a3134021f622dff7e6c6fbi0",
    "inscriber_address": "bc1pdfmqcefzn3t28lzdvv8s5kv7t25pnq49t4sqtnkyujt5kytt4njqydkqup",
    "inscription_fee": 3123550,
    "inscription_id": "a77c2fda458fc67028cb444b3b3fdcdf36b168d89ceb7286630d2fc76b21a714i476",
    "inscription_input_index": 0,
    "inscription_number": {
      "classic": -4060551,
      "jubilee": 68700091
    },
    "inscription_output_value": 330,
    "inscription_pointer": 157080,
    "metadata": null,
    "metaprotocol": null,
    "ordinal_block_height": 152477,
    "ordinal_number": 762387222060184,
    "ordinal_offset": 2222060184,
    "parent": null,
    "satpoint_post_inscription": "a77c2fda458fc67028cb444b3b3fdcdf36b168d89ceb7286630d2fc76b21a714:476:0",
    "transfers_pre_inscription": 0,
    "tx_index": 891
  }
},
rafaelcr commented 3 weeks ago

This is really an API bug, we should be displaying the content of the delegate inscription.

EDIT: Ordhook provides this and other missing fields as

metaprotocol
inscription_pointer
inscription_output_value
inscription_input_index
delegate