canton-network-docs
Scan Aggregates API
Scan Aggregates API - Canton Network Docs
Skip to main content
which yielded a response:
This response is in the same format as
As contract ID is
Scan provides a couple shortcuts for using theDocumentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
scan_bulk_data_api to look up Amulet and Amulet Name Service records.
Amulet Summaries
While it’s possible to figure total Amulet balance from thescan_bulk_data_api, figuring the effect of holding fees can be tricky for a new Splice app unfamiliar with the on-ledger data model of Amulet.
With a valid time from v0_state_acs_snapshot-timestamp, knowing the latest migration ID, and one or more party IDs to look up Amulet holdings for, Scan will gather Amulet statistics for each matching party and yield them. Here’s an example payload passed to /v0/holdings/summary on a test network:
total_available_coin is the most useful element for most Splice apps, as it represents how much Amulet the party has available for transfers right now, taking fees and locks into account. Note that the first summary above isn’t the first of the owner_party_ids argument list; you must correlate with the party_id response property when you look up Amulet for more than one party ID.
Detailed Amulet Holdings
For more information about Amulet on the ledger, use /v0/holdings/state instead. Repeating the request for Amulet Summaries above, but adding in the separately-introduced and requiredpage_size parameter as this API is paginated, Scan would yield something like
v0_state_acs but is restricted to contracts of Daml templates Amulet and LockedAmulet.
Looking up ANS Entries
/v0/ans-entries/by-party and /v0/ans-entries/by-name are quick ways to look up ANS entries, by owner party ID and entry name, respectively, without searching the ACS. They share a response format in common with /v0/ans-entries, which searches by name prefix rather than exact name. For example, with a test of/v0/ans-entries?name_prefix=dso&page_size=5, Scan responds with something like
null, this is an ANS entry provided by the DSO; in fact, this is the DSO’s own special entry. (Note that there is also no expiry.) Here’s a more ordinary response yielded by changing the prefix to alice_2e5: