Skip to main content

Overview

  • Aggregates balances, asset metadata, and prices across all chains in the Initia registry into a single portfolio view.
  • Groups assets by symbol and computes per-chain and total portfolio value.
  • Tracks loading state and provides manual refetching for all underlying queries.

Prerequisites

  • Must be rendered within InterwovenKitProvider.
  • Must be used within a React Query QueryClientProvider.
  • Must be used within a wagmi WagmiProvider.
  • Client-only (no SSR): Put this in a use client provider tree, or use a dynamic import in Next.js.

Quickstart

This example assumes providers are already set up. For complete setup configurations, see Provider Setup.

Return Value

The hook returns an object with aggregated portfolio data, grouped assets, and control methods: Aggregated values:
totalValue
number
Estimated total USD value across all chains.
chainsByValue
PortfolioChainItem[]
List of chains sorted by portfolio value on each chain.
Grouped assets:
assetGroups
PortfolioAssetGroup[]
Aggregated assets grouped by symbol across chains.
unlistedAssets
PortfolioAssetItem[]
Assets without registry metadata, kept separate from grouped assets.
Loading and control:
isLoading
boolean
true while any underlying query is loading.
refetch
() => void
Manually refetches all balances, assets, and prices.

Notes

  • The portfolio view only includes chains and assets that have non‑zero balances.
  • totalValue sums listed asset groups. Assets in unlistedAssets are returned separately and are not included in that total.

Type Reference (Advanced)