Core SDKExplanation

Money and Accounts

Understand exact asset identity, token quantities, fiat values, and Account positions.

An AssetId identifies one token on one chain. An AssetAmount contains that identity and a major-unit decimal value. Money contains a fiat currency and a fiat value. A token symbol or fiat peg does not identify an asset.

Select an exact asset

The Core SDK exports the admitted Base Sepolia test assets through TOKENS:

import { TOKENS, type AssetId } from "@capxul/sdk";

const usdc: AssetId = TOKENS.BASE_SEPOLIA.CAPXUL_TEST_USDC;
const usdt: AssetId = TOKENS.BASE_SEPOLIA.CAPXUL_TEST_USDT;
const weth: AssetId = TOKENS.BASE_SEPOLIA.CAPXUL_TEST_WETH;

The catalog uses typed keys. It prevents a consumer from selecting an unknown network or token by mistake. Each leaf comes from the configuration-owned registry. The catalog does not copy metadata and does not grant authority.

Keep quantity and value separate

USDC and USDT can both have a USD peg. They remain different assets because they have different contract addresses. WETH can have no fiat peg. It still has an exact AssetId and an exact quantity.

An Account keeps one position for each asset in balances. Use requireAsset(position.asset) for its symbol and precision. Use valueIn with a rate source when the screen needs a fiat valuation. A valuation does not execute a conversion or prove that a payment settled.

Keep authority separate

An AssetId selects a unit. It does not authorize a payment, faucet mint, or Organization spend. The applicable Account, Budget, signer, and backend rules still decide whether an operation can run.

On this page