Skip to main content
Defined in: guardrails/types.ts:231 Parses an amount into { atomic: bigint; asset?: string }.

Parameters

value

The amount value to parse (bigint, string, or Amount object). string | bigint | Amount

asset?

string Optional asset identifier to scope the amount.

Returns

Parsed amount with atomic bigint value and optional asset.

atomic

asset?

Throws

"amount_unparseable" on bad input.