Wide values
sqrt_price and every *_x_128 fee-growth field use u256::U256:
(hi << 128) | lo. Do not parse either limb through a JavaScript number.
Native token amounts
The contract uses token program base units directly.PoolState contains only token0, token1, fee, and enabled. It has no scale0 or scale1 fields.
The API can add display metadata such as symbol and decimals. Keep that metadata separate from the contract mapping value.
Records
PositionNFT includes both owner and immutable withdrawal. MintComplianceRecord includes nonce, recipient, and withdrawal. Token inputs and outputs are dynamic records, so resolve their concrete program through the deployment registry.
Deadlines
Contract swap deadlines areu32 Aleo block heights. Do not encode Unix seconds in that field, even if a stale API description or client label calls it a timestamp.
Source of truth
Use this precedence when types disagree:- The deployed program for the selected environment.
- The matching contract registry and pinned contract source.
- The API OpenAPI document and transaction schema endpoint.
- Client-side TypeScript types.