#Get app id by address

18 messages · Page 1 of 1 (latest)

dry bolt
#

is that possible?

rotund nexus
#

Yeah, never done that but app accounts are deterministic, so just look at how they’re derived and reverse the process

#

Not at my computer atm but I can dig up more detail later if someone else doesn’t beat me to it

sinful knot
#

Not possible

#

Unless you are able to reverse hashes

dry bolt
#

👺

#

alright, I'm mcgyvering it then

rotund nexus
#

ah yes it's hashed before encoding so nvm

dry bolt
#

wonder if there was specific thinking around not having a rest endpoint for that.
I get the encoding, so we can be sure the account is truly belonging to the app, but why not indexing it is interesting

rotund nexus
#

i think the overall idea is to keep algod lightweight, relationships between accounts, assets, app id and addresses etc are "derived", not "stored"

#

i.e., you can go from app id to app address because it's derived deterministically, so there's no need to store that in a lookup table. Since you can't do the reverse, it's not made available

#

you could add it to the indexer or something i guess but kind of a slippery slope toward bloat

rugged tree
#

AlgoScan used to index this mapping so that it could display AppIDs for addresses “magically”

#

RIP AlgoScan

dry bolt
rugged tree
#

Oh sweet