# Checkpoint Desktop local beta access v1

This beta uses the existing XRBC Xaman browser sign-in and read-only XRPL proxy.
It adds no entitlement server, database, proxy method, Render plan change or
hosted mailbox service. The receipt and local state are modifiable. They are
not a signed license or proof that Desktop independently verified ownership of
the wallet. MIT license rights remain intact.

## Activation and access

1. Desktop generates a random 32-byte pairing challenge, valid for ten minutes,
   and opens `https://xrbitcoincash.com/checkpoint-desktop.html` with the fragment
   `#checkpoint-pair=<64 lowercase hex characters>`. No project text or secrets
   enter the URL. Starting another activation replaces the pending challenge.
2. The page authenticates a wallet through Xaman, checks its XRBC trustline and
   exports the unsigned access file described below. A typed wallet address is
   not the browser sign-in flow. The file contains no SDK token, seed or key.
3. The user imports that file into Desktop. Desktop requires the current
   challenge and a receipt observed within five minutes (at most 30 seconds in
   the future), then independently reads that account's validated trustline.
   The challenge is consumed only after successful verification and state save.
4. The first successful activation starts one 72-hour local program trial.
   Switching wallets or projects does not restart it. A verified XRBC trustline
   is required during the trial. Afterward, the current wallet must hold at least
   10 XRBC. Issued-currency decimal strings are compared exactly, without binary
   floating-point rounding, including scientific notation.
5. The UI requests a refresh every five minutes while open. A successful ledger
   observation remains usable for at most fifteen minutes. Errors do not turn
   into a zero balance or extend the previous observation. Once that grace
   expires, new beta auto-save pauses. Returning funds and refreshing restores
   access; no payment or token transfer to the application is involved.

Manual save, reading, copying, exporting, explicit recovery, and retaining all
existing checkpoint and recovery files remain available. The UI may flush a
dirty opted-in draft once when access becomes paused to protect current work.
The access store never reads, modifies or deletes project files.

## Receipt format

All seven fields are strings. Unknown fields confer no additional authority.
Desktop does not accept browser-supplied balances or trial dates.

```json
{
  "schema": "xrbc-checkpoint-beta-access-v1",
  "challenge": "<64 lowercase hex characters from Desktop>",
  "account": "<Xaman-authenticated classic public XRPL account>",
  "observedAt": "<ISO 8601 UTC timestamp ending in Z>",
  "network": "mainnet",
  "issuer": "rEjwniYhYR5QDZzK1a1x2359j8j8N43Ypw",
  "currency": "5852626974636F696E6361736800000000000000"
}
```

Input files are limited to 16 KiB. Replays, replaced or expired challenges,
wrong assets, wrong networks, malformed dates and incomplete ledger responses
fail without starting a trial. File modification is still possible: this is
deliberately limited local beta enforcement, not a cryptographic entitlement.

## Bounded ledger read

Desktop sends one `account_lines` JSON-RPC POST to the existing fixed HTTPS
endpoint `https://xrbitcoincash-github-io.onrender.com`, with the account, the
exact issuer as `peer`, `ledger_index: "validated"`, and `limit: 400`. It never
submits a transaction. Requests have a total fifteen-second deadline, no
automatic retries or redirects, and a 512 KiB response limit. The user can retry
after a proxy cold start. A marker is an incomplete result and is rejected;
Desktop does not perform an unbounded history or pagination scan.

Accepted responses must identify the requested account, a validated positive
ledger index and 64-character ledger hash, and an unambiguous matching XRBC
line. A complete response without XRBC is a verified absent trustline. A
transport error, malformed response or wrong issuer is an unknown result.
Older ledger indices are rejected. Equal indices must retain the same hash,
and, for the same account, the same exact balance and trustline presence.
An unchanged ledger never renews freshness, including across re-pairing or
wallet switches. An advancing ledger is required to renew the grace period.

The initial observation relies on the existing proxy honoring the validated
ledger request. The response has no ledger close timestamp, so Desktop does
not independently prove initial ledger age. Retrieval time is recorded and
unchanged-ledger detection bounds reuse; it is not a blockchain timestamp.

## Local state and limits

The per-user application settings folder contains `BetaAccess/access.json` and
a writer lock. Atomic replacement preserves the previous state on write
failure. It records the first activation, current public account, exact balance,
ledger reference, last observation, clock high-water mark and pending pairing
challenge. No wallet secret is stored. Linked state paths are refused. Damaged
records fail closed for beta access rather than silently awarding a new trial.

Clock rollback beyond a two-second scheduling tolerance pauses beta access;
the high-water mark is saved at least once per minute during status polling.
These checks deter accidental resets, not a user modifying local state or
code. Deleting app settings, reinstalling on another machine or changing this
open-source build can bypass the local gate. A future strong entitlement
service would be a separate, explicitly scoped change.

The native API is `BetaAccessStore(settingsDirectory)`,
`CreateActivationUrl(utcNow)`, `ImportAsync(file, utcNow)`,
`RefreshAsync(utcNow)` and `GetStatus(utcNow)`. Status exposes `Allowed`,
`Message`, `Account`, `TrialEndsUtc` and `FreshUntilUtc`. All supplied times must
have `DateTimeKind.Utc`. A test-only constructor injects the JSON-RPC transport;
the included tests make no network requests or wallet transactions.
