---
title: Mining
---

## Request a mining job

`POST /wallets/{address}/mining/jobs`

Each request creates independent work valid for one hour. Multiple distinct proofs can earn synthetic USD from one job.

**Request**

```http
POST /wallets/01a1f8d3-ea7b-7a12-8b34-56789abcdef0/mining/jobs
```

| Input | Meaning and format |
| --- | --- |
| `address` | Wallet address. UUIDv7 (RFC 9562), lowercase, 36 characters. |

**Response: `201 Created`**

```json
{
  "meta": {
    "network": "bubblegum",
    "at": "2026-11-20T12:01:00.123000000Z"
  },
  "data": {
    "public": {
      "ticket": "<ticket>",
      "seed": "38520a69288fba8020dc5806d5f6662f77de60bf38104654b124d90a072a44e9",
      "target": "0000000800000000",
      "expires_at": "2026-11-20T13:01:00.123000000Z"
    }
  }
}
```

| Output | Meaning and format |
| --- | --- |
| `ticket` | Job ticket. Opaque string; submit unchanged with proofs. |
| `seed` | Mining seed. 32 bytes encoded as 64 lowercase hexadecimal characters. |
| `target` | Exclusive upper bound for the unsigned 64-bit hash result. 16 lowercase hexadecimal characters, most significant digit first. |
| `expires_at` | Proof acceptance deadline. RFC 3339 (ISO 8601 profile), UTC (`Z`), exactly 9 fractional digits (nanoseconds). |
| `network` | Selected network. String. |
| `at` | Response time. RFC 3339 (ISO 8601 profile), UTC (`Z`), exactly 9 fractional digits (nanoseconds). |

### HashWX mining procedure

Mining uses HashWX 1.0.0. For an unsigned 64-bit nonce `n`:

1. Compute `SHA-256(seed_bytes || uint64_little_endian(floor(n / 463)))`.
2. Generate the HashWX program with those 32 bytes and execute it with `n`.
3. Submit the nonce if the unsigned result is strictly less than `target`.

## Submit a mining proof

`POST /wallets/{address}/mining/proofs`

**Request**

```http
POST /wallets/01a1f8d3-ea7b-7a12-8b34-56789abcdef0/mining/proofs
Content-Type: application/json

{
  "ticket": "<ticket>",
  "nonce": "0000000022e1e903"
}
```

| Input | Meaning and format |
| --- | --- |
| `address` | Wallet address. UUIDv7 (RFC 9562), lowercase, 36 characters. |
| `ticket` | Job ticket for this wallet and network. Opaque string. |
| `nonce` | Unsigned 64-bit nonce. 16 lowercase hexadecimal characters, most significant digit first. |

Retry with the same ticket and nonce. A proof credits once; a previously credited proof remains retrievable after its job expires.

**Response: `201 Created`**

```json
{
  "meta": {
    "network": "bubblegum",
    "at": "2026-11-20T12:05:00.124000000Z"
  },
  "data": {
    "public": {
      "transaction": "01a1f8d4-d4db-8a12-8b34-56789abcdef1",
      "asset": {
        "id": "fiat-USD",
        "units": "1.003285026636055158"
      }
    }
  }
}
```

| Output | Meaning and format |
| --- | --- |
| `transaction` | Mining reward reference. UUIDv8 (RFC 9562), lowercase, 36 characters. |
| `asset.id` | Reward asset. `fiat-USD`. |
| `asset.units` | Amount of synthetic USD credited. Positive plain decimal string, up to 18 decimal places; no trailing fractional zeros. |
| `network` | Selected network. String. |
| `at` | Response time. RFC 3339 (ISO 8601 profile), UTC (`Z`), exactly 9 fractional digits (nanoseconds). |