Skip to content

@lelantos-org/sdk / index / AssetUnits

Interface: AssetUnits ​

Defined in: @lelantos-org/sdk/dist/wallet/assets/amount.d.ts:173

The fields amount conversion reads. AssetInfo satisfies it, as does an app's own registry row with these three fields.

Properties ​

decimals? ​

ts
optional decimals?: number;

Defined in: @lelantos-org/sdk/dist/wallet/assets/amount.d.ts:179

ERC-20 decimals. Optional so an AssetInfo whose token reported none still satisfies this type; parseAmount / formatAmount then reject INVALID_ARGUMENT, while toBaseUnits / fromBaseUnits do not read it.


index? ​

ts
optional index?: bigint;

Defined in: @lelantos-org/sdk/dist/wallet/assets/amount.d.ts:183

Yield index, RAY-scaled. Absent or RAY for a plain asset.


scale ​

ts
scale: bigint;

Defined in: @lelantos-org/sdk/dist/wallet/assets/amount.d.ts:181

Circuit units → base units multiplier.