---
title: EstimatedUsd
description: Dollars derived from published rates. Not the bill.
---

Dollars derived from published rates. Not the bill.

**There is no way to get a number out of this**

No `valueOf`, no `toJSON`, no `Symbol.toPrimitive`, no `add`, and no constructor. So
`Number(usd)` is `NaN`, `usd * 2` is `NaN`, `+usd` is `NaN`, and `JSON.stringify(usd)`
answers `{}`. The figure comes out through \[`Self::amount`], a **string** — one visible
step that keeps the type name at the call site, which is a decision a reviewer can see.

## Accessors

### amount

#### Get Signature

```ts
get amount(): string;
```

The figure as an exact decimal **string**.

A string and not a number: a JS double cannot hold `0.0000276944` summed a few
thousand times without drifting in the direction of a bill nobody can reproduce.

##### Returns

`string`

***

### displayAmount

#### Get Signature

```ts
get displayAmount(): string;
```

The figure at display precision: two places at a dollar or more, six below.

##### Returns

`string`

## Methods

### toString()

```ts
toString(): string;
```

`~$X (estimated)`.

#### Returns

`string`

## Provenance

This page is generated from `bindings/microvms-js/index.d.ts` by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run dts`. `mise run dts:check` fails when the committed file no longer matches the source.