useCalm() reads the active provider’s configuration — destination
chain, currency, and address. Throws when called outside a provider tree.
Import
Usage
app/page.tsx
Return Type
address
`0x${string}`
The wallet address the active provider is configured with. Always present —
the provider throws during render without one.
apiUrl
string
The Calm API root (https://api.calmtreasury.xyz by default; the
provider’s apiUrl prop overrides).
name
string
Your app’s name, as your users know it. Rendered beside balances.
chain
Chain (a chain id number)
Destination chain id for the payout. Initialized from the provider’s chain
prop. See Supported chains and tokens for the ids and what each
chain settles in.
setChain
(next: Chain) => void
Switch the destination chain at runtime.
destinationToken
"USDC" | "USDm" | "AUSD" | "USDC.e"
Which of chain’s payout tokens the deposit settles into. Set once on the
provider — the end user never picks it. Only Polygon and Monad offer a
choice; see Supported chains and tokens.
currency
"USD" | "GBP" | "EUR"
Display currency for prices and balances.
country
string
The buyer’s country, ISO-3166 alpha-2. The card rail’s payment-method catalog
is keyed by country, and quotes price per (country, method).
locale
string
The BCP-47 locale amounts render in — "en-US", "de-DE", "fr-FR", and
any other tag the runtime’s Intl supports. Separators and grouping follow
the locale’s own conventions; digits are always ASCII, whatever numbering
system the locale names. A tag Intl doesn’t support falls back to
"en-US" rather than throwing.