# multisignature.io — Tezos X WalletConnect Static Preview

This package is a deployable static preview of a Tezos X and WalletConnect integrated website/article for **multisignature.io**.

It is intentionally built as a no-build static app so the UI can be previewed immediately on Cloudflare Pages, Netlify, Vercel, GitHub Pages, S3/static hosting, Tiiny.site, or any basic HTTP server.

## What is included

- `index.html` — article + wallet control-plane UI
- `css/app.css` — polished black-ice / electric-green / Tezos X design system
- `js/app.js` — theme, article hash, UI binding, receipt rendering
- `js/receipts.js` — local evidence receipts + evidence JSON export
- `js/tezosx-wallets.js` — native Tezos octez.connect-style wallet flow, EVM injected provider flow, WalletConnect provider flow, preview fallbacks
- `manifest.webmanifest` + `sw.js` — installable PWA-style static preview
- `_headers` + `_redirects` — Cloudflare Pages / Netlify-compatible static deployment metadata
- `schemas/tezosx-wallet-preview-evidence-pack.schema.json` — exported evidence pack schema
- `tools/validate-static.mjs` — package validation script

## Core concept

The site turns an institutional multisignature article into an interactive control-plane preview:

1. A reader can connect a native Tezos wallet through a octez.connect-compatible path.
2. A reader can connect an EVM wallet through an injected EIP-1193 provider.
3. A reader can connect through WalletConnect once a project ID and current Tezos X EVM chain parameters are supplied.
4. Each meaningful action emits a local structured receipt.
5. Receipts can be exported as an evidence JSON package.

This is a static UI/testing package, not a custody product, not a bank product, not investment advice, and not legal advice.

## Run locally

```bash
cd multisignature-tezosx-walletconnect-preview
npm run validate
npm run serve
```

Open:

```text
http://localhost:4173
```

You can also open `index.html` directly, but a local web server is better because service workers and module imports require HTTP(S).

## Configure real WalletConnect testing

Open `index.html` and edit `window.MSIG_APP_CONFIG`:

```js
window.MSIG_APP_CONFIG = {
  tezosX: {
    nativeRpcUrl: "https://michelson.previewnet.tezosx.nomadic-labs.com",
    tzktApiUrl: "https://tzkt.previewnet.tezosx.nomadic-labs.com",
    evmRpcUrl: "https://evm.previewnet.tezosx.nomadic-labs.com",
    evmChainIdDecimal: 128064,
    evmChainIdHex: "0x1f440"
  },
  walletConnect: {
    projectId: ""
  }
};
```

Set:

- `walletConnect.projectId` — your WalletConnect/Reown project ID.
- `tezosX.evmChainIdDecimal` — the current Tezos X EVM chain ID.
- `tezosX.evmChainIdHex` — optional; the app computes it from decimal if omitted.
- `tezosX.evmRpcUrl` — the current EVM RPC URL.

The included preview intentionally leaves the chain ID blank because preview network parameters can change. The UI remains fully usable in preview mode without it.

## Configure native Tezos wallet testing

The native Tezos path dynamically imports the current octez.connect SDK:

```text
https://esm.sh/@tezos-x/octez.connect-sdk@4.8.3?bundle
```

The integration attempts to request permissions against a custom network using the configured Tezos X native RPC URL. If the SDK is unavailable, the user declines, or the local environment blocks wallet interaction, the app gracefully enters a clearly labeled static preview session and records that fact as a receipt.

## Receipt model

Receipts are stored in localStorage under:

```text
msig-tezosx-receipts-v1
```

Receipt examples:

- `static_preview_loaded`
- `tezos_wallet_connected`
- `tezos_message_signed`
- `evm_wallet_connected`
- `walletconnect_evm_connected`
- `runtime_config_applied`
- `policy_check_passed`
- `evidence_pack_exported`

Production should replace local-only receipts with:

- server-side signature verification,
- one-time nonce issuance and consumption,
- durable append-only storage,
- tamper-evident hashes,
- wallet allowlists where appropriate,
- Cloudflare Worker / D1 / R2 / KV evidence persistence.

## Static deploy

### Cloudflare Pages

1. Create a new Pages project.
2. Upload this folder or connect a repository.
3. Build command: leave blank.
4. Output directory: `/` or the repository root.
5. Deploy.

### Netlify

1. Drag-and-drop the folder into Netlify.
2. Netlify will apply `_headers` and `_redirects`.
3. Deploy.

### Vercel

1. Import repository.
2. Framework preset: Other.
3. Build command: none.
4. Output directory: root.

## Production hardening checklist

Before any live production deployment with real users or regulated activity:

- Confirm current Tezos X network parameters from primary Tezos/Tezos X sources.
- Confirm current WalletConnect/Reown provider configuration.
- Replace local receipt storage with a backend evidence plane.
- Add server-side Tezos signature verification.
- Add server-side EVM signature verification.
- Add nonce freshness and replay protection.
- Split preview UI from production transaction authorization.
- Add explicit disclosures for every money instrument: stablecoin, deposit token, custody account, reserve claim, or bank deposit claim.
- Add accessibility QA, mobile QA, CSP QA, and wallet integration QA.
- Add E2E tests for wallet-present, wallet-absent, denied-permission, and incorrect-chain flows.

## Architecture notes

The package intentionally separates four responsibilities:

| Layer | File | Responsibility |
|---|---|---|
| Content + shell | `index.html` | Article, structure, static config |
| Visual system | `css/app.css` | Responsive design, tokens, UI polish |
| Wallet logic | `js/tezosx-wallets.js` | Beacon, injected EVM, WalletConnect, signatures |
| Evidence logic | `js/receipts.js` | Receipt storage, hash, export |
| UI binding | `js/app.js` | DOM rendering, buttons, article hash |

## License / rights

© 2026 Quantum Field Inc. All rights reserved unless separately licensed.
