Bitcoin Forum
June 21, 2024, 09:38:37 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get ordinals range on a given Bitcoin wallet address?  (Read 60 times)
tictalic (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 02, 2024, 02:45:21 PM
 #1

Hey everyone, what API can I use that supports retrieving ranges of ordinals on a given Bitcoin address?

Something like Ordiscan does when you input an address and retrieves a list of rare satoshis, but I’d like to get all satoshi numbers on an address?
odolvlobo
Legendary
*
Offline Offline

Activity: 4354
Merit: 3273



View Profile
March 03, 2024, 08:46:43 PM
Last edit: March 03, 2024, 11:03:27 PM by odolvlobo
 #2

While it is possible to list all of the the ordinals at an address (or more specifically, in a UTXO), it might not be practical because each time a range of ordinals is involved in a transaction, the range may be split in several places.

At the extreme, an address with 1 BTC could contain 100,000,000 distinct ranges of 1 sat each.

Likewise, though it may be possible to have a database with the location of each ordinal, it is not practical as the size of the database would be huge. It is more likely that Ordiscan just tracks the locations of specific ordinals, and just looks to see if any are at the address you supply. Finding the UTXO with a specific ordinal involves scanning the block chain for the chain of transactions involving the ordinal, starting at the originating block.

This shows how ordinals are created and transferred:

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Yamane_Keto
Sr. Member
****
Offline Offline

Activity: 504
Merit: 487



View Profile WWW
March 04, 2024, 12:35:18 AM
 #3

It can be done by managing the ongoing observer, where you push data from your node to a database that works better with Ordinals, scan the blockchain by block height, push the BRC-20 inscription data to the new database and then create your own index.

Ordhook provides you with a tool to customize your database or use the Ordinals API

https://www.hiro.so/blog/how-to-get-ordinals-inscription-data-with-ordhook
https://www.hiro.so/blog/introducing-the-ordinals-explorer-and-ordinals-api

聞こえません。
Fingerprint:  7B466339E31BE9F2566088B7469C8FBE21C99A41
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!