> For the complete documentation index, see [llms.txt](https://doc.crocwallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.crocwallet.com/developers/assets-and-balances.md).

# Assets and Balances

SDK 1.0.0 exposes namespace requests and Canton contract queries. It does not expose a `getAssetCatalog()`, `getCoinsBalance()` or `getCoinsList()` SDK facade. Internal Wallet Backend routes are not a replacement public dApp API.

## Canton holdings

Connect a Canton account, then query a reviewed concrete template or interface visible to that account:

```ts
import { crocWallet } from "@croc-wallet/dapp-sdk";

async function readHoldings(pageToken?: string) {
  return crocWallet.getActiveContracts({
    chainId: "canton:production",
    interfaceId: "#splice-api-token-holding-v1:Splice.Api.Token.HoldingV1:Holding",
    limit: 50,
    ...(pageToken === undefined ? {} : { pageToken }),
  });
}
```

The result contains `contracts` and `nextPageToken`. At least one of `templateId` or `interfaceId` is required. `limit` must be an integer from 1 to 100. Pass `nextPageToken` to the next query until it is null.

Each contract includes `contractId`, `templateId`, `payload`, `interfaceViews`, `createdEventBlob` and `synchronizerId`. Retain interface views and the original opaque disclosure blob. Interpret balances only according to the selected template/interface schema; there is no universal `payload.amount` or assumption that every visible holding is spendable.

Queries do not upload a DAR, expand party visibility or authorize an execution. Current Extension/backend template and choice rules still apply.

## EVM native balance

```ts
import { crocWallet } from "@croc-wallet/dapp-sdk";

async function readEthereumBalance() {
  const session = await crocWallet.getSession();
  const chainId = "eip155:1";
  if (!session.croc.accountsByChain[chainId]?.length) {
    throw new Error("Ethereum Mainnet was not approved");
  }
  const address = session.croc.primaryAddresses.eip155;
  if (!address) throw new Error("No EVM account was approved");
  return crocWallet.request({ chainId, method: "eth_getBalance", params: [address, "latest"] });
}
```

`eth_getBalance` returns the RPC result, not a formatted fiat value. Keep amounts in exact integer/decimal representations rather than JavaScript floating-point arithmetic. Other RPC methods remain subject to the Extension's chain and origin permissions.

## Identity and display

Match a Canton instrument by its exact registry identity, or an exact Backend-issued `asset_id` when an approved transfer flow uses that identifier. Display names, aliases and symbols are labels; multiple instruments may share them. Do not select or aggregate different assets by symbol alone.

Read the active account from the approved session and invalidate data when that session changes. A missing price is unknown, not zero, and asset labels do not prove verification or spendability.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.crocwallet.com/developers/assets-and-balances.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
