Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Ordinal be self aware of its blockheight regardless of the ordinal browser being used? #3880

Open
shiftshapr opened this issue Jul 30, 2024 · 4 comments

Comments

@shiftshapr
Copy link

Hey Raph

Great to meet you at Inscribing Nashville!

As I mentioned, I want the ordinal I am building to be self-aware of its own blockheight and inscriptionId. I understand that I can get the block information within an ordinal if I parse the query_string to get the inscription id, and then use /r/inscription/[INSCRIPTIONID] to get the blockheight... This works on Ordinals.com but some other ordinal browsers like ord.io use the inscription number rather than the inscription Id in the query string. e.g., https://ord.io/0. With such browsers, I am unable to get the inscriptionId from the query string so the ordinal would not know it's block number and therefore not function correctly.

Am I missing something or do we need a new endpoint to get the ordinal's inscriptionId so we can use /r/inscription/[INSCRIPTIONID] endpoint to get the blockheight or /r/inscription/[INSCRIPTION NUMBER]?

@vinkim
Copy link

vinkim commented Aug 6, 2024

The example you linked to is an image, and it seems ord.io just caches that mimetype, and serves it from their cdn.

If you have look at this example HTML (which I assume is what you'll be inscribing aswell) , you'll see that its being served inside an iframe, so the window.location.pathname should point to something where you'll be able to extract the inscription id. In the end it depends on what you're using to actually extract the inscription id.

@raphjaph
Copy link
Collaborator

raphjaph commented Aug 6, 2024

ord.io should really start using the inscription id. nobody cares about the numbers anymore

@shiftshapr
Copy link
Author

Thanks for the responses, @raphjaph and @vinkim. I agree that ordinal numbers are not as useful anymore. However, I still think they provide a sense of when an inscription was made and offer a shorter number that can be easily remembered or shared.

I believe having an endpoint that allows an inscription to quickly find its inscription number would be transformative. There is one specific use case that could make ordinals more resilient and adaptable: by retrieving the inscription number, obtaining the corresponding satoshi number, and checking for any more recent inscriptions, we could evaluate the most up-to-date version. This approach would allow for corrections, updates, or added functionality to existing inscriptions by simply reinscribing the new information onto the same satoshi. (This process could also be automated if specified in the metadata.)

@raphjaph
Copy link
Collaborator

raphjaph commented Sep 3, 2024

You can retrieve the inscription number through the /r/inscription/<ID> endpoint. It's really on ord.io to support this. The docs clearly specify it here: https://docs.ordinals.com/inscriptions/recursion.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants