omsWallet.indexer is independent from the stateful wallet client. Its read-only methods accept any address and use the project’s publishable key. They do not require authentication, an active session, or the active wallet address.
Query balances for an address
formatUnits(BigInt(balance.balance), decimals) from viem. Contract token decimals can be absent from metadata; do not infer them from the network’s native token. Price and metadata fields are optional even when requested.
BalancesResult separates native assets into NativeTokenBalance[] and contract assets into ContractTokenBalance[]. Contract balances carry a contract address and token ID; optional contract, token, and price metadata is undefined when unavailable. Use the package API reference when you need every response field.
Query transaction history
Choose network scope
Passnetworks when you know the exact SDK networks to query. If networks is omitted or empty, networkType controls the group:
'MAINNETS'is the default.'TESTNETS'queries configured test networks.'ALL'queries both groups.
networks take precedence over networkType. Network values must come from the SDK’s closed network registry.
Filter results
Balance requests can filter by contract address, token ID, and verification status. SetomitPrices: true to omit price data. includeMetadata defaults to true; set it to false when contract and token metadata are unnecessary.
History requests can filter by contract addresses, EVM transaction hashes, OMS transaction IDs, block range, or token ID:
metadataOptions only for history metadata enrichment: verifiedOnly, unverifiedOnly, and includeContracts. It does not replace the balance request’s contractStatus filter.
Paginate
Both methods default to page0 with pageSize: 40. Continue while the optional response page reports more: true.
before or after values supplied by the indexer instead of interpreting their format.