hirosystems / ordinals-api

Bitcoin Ordinals API
Apache License 2.0
201 stars 61 forks source link

feature: support for BRC-20 tokens #49

Closed diwakergupta closed 1 year ago

diwakergupta commented 1 year ago

Relaying from a builder in the ecosystem: "What we need from the API is a route for address balance of BRC-20 tokens. The balance of tokens is the result of ordinals inscription and transfers events. A nice to have would be a transaction history API."

markmhendrickson commented 1 year ago

We'd apply it here in the wallet https://github.com/hirosystems/wallet/issues/3629

markmhendrickson commented 1 year ago

UniSat's indexer is now open-sourced and perhaps worth a look re: this functionality https://twitter.com/unisat_wallet/status/1654136995210223616

diwakergupta commented 1 year ago

To clarify, what their indexer does is given pre-processed data from Bitcoin in a very specific format, it can build up state on BRC-20 tokens and presumably compute things like available supply through transfers and such.

igorsyl commented 1 year ago

I believe publishing a BRC-20 spec similar to https://docs.ordinals.com/ will help cement the BRC-20 protocol as an authoritative standard.

fiftyeightandeight commented 1 year ago

Hi all, fyi, we are currently using Bestinslot.xyz indexer (https://docs.bestinslot.xyz/reference/api-reference/brc-20).

rafaelcr commented 1 year ago

Hello everyone. The current work for BRC-20 indexing is being tracked in PR https://github.com/hirosystems/ordinals-api/pull/78. The initial plan is to support the following endpoints:

Are there any additional endpoints you'd like to see supported?

diwakergupta commented 1 year ago

Another BRC-20 API for reference: https://docs.bestinslot.xyz/reference/api-reference/brc-20

fiftyeightandeight commented 1 year ago

Hi @rafaelcr , will /ordinals/brc-20/tokens/:ticker/events map to https://brc20api.bestinslot.xyz/v1/get_brc20_activity/:tick/:filter_type/:page/:sort_type? Assuming that is the case, it will be great if we can further filter the data based on

fiftyeightandeight commented 1 year ago

Hi @rafaelcr , it will be good if we can have an endpoint that tells if a given transfer inscription was already spent (i.e. the given inscription was already used in the past to move some balances).