How does one get the next instance ID in an object space? Like, if I wanted to predict what the account ID of the next account to be created will be, how could one get that information? Wondering about this generally, for any object space. (So in other words, not just wondering how to find out how many accounts are registered — it could be any object type where I want to find out in advance which one is "next".) Is there an API call that will return this? Or an object I could query that holds the object counter for various spaces?
... it's a generic question as it's come up a few time w.r.t different object types, but basically what I'm trying to do is to list the "most recent" objects of some such type to be created. So if I can get the "next" object ID, then I can request, say, the ten preceding objects to get the "ten most recent".
Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.
[x] API (the application programming interface)
[ ] Build (the build process or something prior to compiled code)
[ ] CLI (the command line wallet)
[ ] Deployment (the deployment process after building such as Docker, Travis, etc.)
[ ] DEX (the Decentralized EXchange, market engine, etc.)
[ ] P2P (the peer-to-peer network for transaction/block propagation)
[ ] Performance (system or user efficiency, etc.)
[ ] Protocol (the blockchain logic, consensus, validation, etc.)
[ ] Security (the security of system or user data, etc.)
User Story
As a client application developer I want an API to get the next instance ID that will be assigned to an object space.
Things to consider:
Additional Context (optional)
Mentioned by @christophersanborn in the BitShares Development Telegram group:
Impacts Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.
CORE TEAM TASK LIST