diff --git a/.env.example b/.env.example index 24692fa..a74ae48 100644 --- a/.env.example +++ b/.env.example @@ -10,3 +10,17 @@ MN_MNEMONIC="" # Alternative to MN_MNEMONIC: raw hex seed. MN_SEED= + +# Optional path to an existing private wallet env file. The v2 stagenet +# deployer accepts MN_SEED/MN_MNEMONIC in that file and maps WALLET_SEED to +# MN_SEED. The file is read locally and never copied or printed. +MN_WALLET_ENV_FILE= + +# Required by the v2 stagenet deployer: absolute path to a durable private +# maintenance signing-key file. The deployer creates/reuses it at mode 0600 +# before wallet startup. Back it up; never commit or print its contents. +MN_MAINTENANCE_KEY_FILE= + +# Optional v2 wallet synchronization timeout in milliseconds. The deployer +# defaults to 300000 and accepts values from 30000 through 900000. +MN_WALLET_SYNC_TIMEOUT_MS= diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5c1b19..41b4a55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + env: - COMPACT_VERSION: '0.31.1' + COMPACT_V1_VERSION: '0.31.1' + COMPACT_V2_VERSION: '0.34.0' jobs: - unit: - name: Unit tests (simulator) + unit-v1: + name: Unit tests (v1 simulator) runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -30,7 +34,7 @@ jobs: - name: Setup Compact compiler uses: midnightntwrk/setup-compact-action@b622629bee2c06d0f8b4db5b62a93f98dcbd41bf with: - compact-version: ${{ env.COMPACT_VERSION }} + compact-version: ${{ env.COMPACT_V1_VERSION }} - name: Install dependencies run: bun install --frozen-lockfile @@ -45,6 +49,37 @@ jobs: - name: Run unit tests run: bun run test:unit + unit-v2: + name: Unit tests (v2 simulator) + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + + - uses: oven-sh/setup-bun@v2 + + - name: Setup Compact compiler + uses: midnightntwrk/setup-compact-action@b622629bee2c06d0f8b4db5b62a93f98dcbd41bf + with: + compact-version: ${{ env.COMPACT_V2_VERSION }} + + - name: Install v2 dependencies + run: npm ci + working-directory: contracts/v2 + + - name: Compile v2 contract + run: bun run compact:v2:fast + + - name: Typecheck v2 package + run: bun run typecheck:v2 + + - name: Run v2 unit tests + run: bun run test:v2 + frontend: name: Frontend (typecheck + build) runs-on: ubuntu-latest @@ -58,13 +93,10 @@ jobs: - uses: oven-sh/setup-bun@v2 - # Both installs matter. The frontend imports the compiled contract from - # ../src/managed (outside its package root), so root node_modules is what - # Rollup would resolve the WASM-bearing midnight packages from for those - # files — a second physical copy whose classes fail the app's instanceof - # checks. vite.config.ts `resolve.dedupe` is the fix; installing ONLY the - # frontend deps would remove the second copy and make the build pass - # trivially, testing nothing. Install both to reproduce the real thing. + # Every install matters. The v1/v2 package trees intentionally carry + # separate WASM class identities; vite.config.ts routes each generated + # contract import through its matching profile runtime. Install every + # tree to reproduce that physical layout in CI. - name: Install root dependencies run: bun install --frozen-lockfile @@ -72,8 +104,16 @@ jobs: run: bun install --frozen-lockfile working-directory: frontend + - name: Install v1 browser protocol dependencies + run: npm ci + working-directory: frontend/protocols/v1 + + - name: Install v2 browser protocol dependencies + run: npm ci + working-directory: frontend/protocols/v2 + # No compact compile: src/managed is committed, and vite copies it into - # dist/contract/compiled for FetchZkConfigProvider. + # the matching v1/v2 output trees for FetchZkConfigProvider. - name: Typecheck run: bun run typecheck working-directory: frontend @@ -82,8 +122,8 @@ jobs: run: bun run build working-directory: frontend - reproducible-build: - name: Byte-exact contract rebuild + reproducible-build-v1: + name: Byte-exact v1 contract rebuild runs-on: ubuntu-latest # Full ZK key generation for all 11 circuits measures ~15s; the headroom is # for a cold compiler install. @@ -93,10 +133,10 @@ jobs: - uses: oven-sh/setup-bun@v2 - - name: Setup Compact compiler + - name: Setup Compact v1 compiler uses: midnightntwrk/setup-compact-action@b622629bee2c06d0f8b4db5b62a93f98dcbd41bf with: - compact-version: ${{ env.COMPACT_VERSION }} + compact-version: ${{ env.COMPACT_V1_VERSION }} # Deliberately NOT cached: restoring src/managed would compare the # committed artifacts against themselves and prove nothing. No `bun @@ -108,18 +148,47 @@ jobs: # files untouched and the diff below would pass while having verified # nothing — a green run indistinguishable from a real one. Compiling into # an empty tree makes the assertion mean what it claims. - - name: Recompile contract from source + - name: Recompile v1 contract from source run: | rm -rf src/managed bun run compact # `--intent-to-add` stages untracked paths so `git diff` reports files the # compiler ADDED, not just ones it changed or removed. - - name: Assert src/managed is unchanged + - name: Assert v1 artifacts are unchanged run: | git add --intent-to-add -A src/managed if ! git diff --exit-code --stat -- src/managed; then - echo "::error::Recompiling src/shielded-night.compact with compact ${COMPACT_VERSION} did not reproduce the committed src/managed/. The deployed contract's verifiability claim (README 'Verifying the deployment') depends on this being byte-exact — commit the regenerated artifacts or investigate the toolchain difference." + echo "::error::Recompiling src/shielded-night.compact with compact ${COMPACT_V1_VERSION} did not reproduce the committed src/managed/. The deployed contract's verifiability claim (README 'Verifying the deployment') depends on this being byte-exact — commit the regenerated artifacts or investigate the toolchain difference." + exit 1 + fi + + reproducible-build-v2: + name: Byte-exact v2 contract rebuild + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + + - name: Setup Compact v2 compiler + uses: midnightntwrk/setup-compact-action@b622629bee2c06d0f8b4db5b62a93f98dcbd41bf + with: + compact-version: ${{ env.COMPACT_V2_VERSION }} + + # Compile into an empty tree so this cannot pass by comparing the + # committed artifacts with themselves. The compiler is standalone. + - name: Recompile v2 contract from source + run: | + rm -rf contracts/v2/managed + bun run compact:v2 + + - name: Assert v2 artifacts are unchanged + run: | + git add --intent-to-add -A contracts/v2/managed + if ! git diff --exit-code --stat -- contracts/v2/managed; then + echo "::error::Recompiling contracts/v2/shielded-night.compact with compact ${COMPACT_V2_VERSION} did not reproduce the committed contracts/v2/managed/. Commit the regenerated artifacts or investigate the toolchain difference." exit 1 fi @@ -139,7 +208,7 @@ jobs: - name: Setup Compact compiler uses: midnightntwrk/setup-compact-action@b622629bee2c06d0f8b4db5b62a93f98dcbd41bf with: - compact-version: ${{ env.COMPACT_VERSION }} + compact-version: ${{ env.COMPACT_V1_VERSION }} # docker.io rate-limits anonymous pulls from shared runners; the Google # mirror serves the same images without the limit (canary's pattern). @@ -158,7 +227,7 @@ jobs: uses: actions/cache@v4 with: path: src/managed - key: compact-${{ env.COMPACT_VERSION }}-${{ hashFiles('src/shielded-night.compact') }} + key: compact-${{ env.COMPACT_V1_VERSION }}-${{ hashFiles('src/shielded-night.compact') }} - name: Compile contract if: steps.compact-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 72619ed..175ea25 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,30 +1,119 @@ name: Deploy frontend -# Manual only. Nothing ships on a push or a merge — a deploy is always an -# explicit click, on an explicit ref. +# A successful CI push for the repository's current main commit publishes to +# production automatically. workflow_run can read secrets even when the +# triggering workflow could not, so the deploy job rejects every other event, +# repository, branch and conclusion before checking out or running source. on: + workflow_run: + workflows: [CI] + types: [completed] + branches: [main] workflow_dispatch: inputs: branch: - description: 'Cloudflare Pages branch — "main" is the production URL (shielded-night.pages.dev); anything else gets a throwaway preview URL.' + description: 'Cloudflare Pages branch. "main" requires this exact ref to be current main with successful push CI; another name creates a preview deployment.' type: string default: 'preview' required: true -concurrency: - group: deploy-${{ github.event.inputs.branch }} - cancel-in-progress: false +permissions: + actions: read + contents: read + +env: + SOURCE_SHA: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }} + PAGES_BRANCH: ${{ github.event_name == 'workflow_run' && 'main' || inputs.branch }} jobs: + validate: + name: Validate release source + if: >- + github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_run' && + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.event == 'push' && + github.event.workflow_run.head_branch == 'main' && + github.event.workflow_run.head_repository.full_name == github.repository) + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Validate deployment target + shell: bash + run: | + set -euo pipefail + if [[ ! "${SOURCE_SHA}" =~ ^[0-9a-f]{40}$ ]]; then + echo "::error::Refusing to deploy an invalid source SHA." + exit 1 + fi + if [[ ! "${PAGES_BRANCH}" =~ ^[A-Za-z0-9][A-Za-z0-9._/-]*$ ]] || + ! git check-ref-format --branch "${PAGES_BRANCH}" >/dev/null; then + echo "::error::Invalid Cloudflare Pages branch name." + exit 1 + fi + + # Production must be the current main commit. Manual production also + # proves that this exact SHA has a successful push-triggered CI run. + - name: Validate production source + if: env.PAGES_BRANCH == 'main' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + current_main="$(gh api "/repos/${GITHUB_REPOSITORY}/git/ref/heads/main" --jq '.object.sha')" + if [[ "${SOURCE_SHA}" != "${current_main}" ]]; then + echo "::error::Refusing stale production deploy: ${SOURCE_SHA} is not current main ${current_main}." + exit 1 + fi + + if [[ "${GITHUB_EVENT_NAME}" == 'workflow_dispatch' ]]; then + ci_run_id="$(gh api --method GET \ + "/repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/runs" \ + -f branch='main' \ + -f event='push' \ + -f status='success' \ + -f head_sha="${SOURCE_SHA}" \ + -f per_page='1' \ + --jq '.workflow_runs[0].id // empty')" + if [[ -z "${ci_run_id}" ]]; then + echo "::error::Production requires successful push CI for this exact main commit (${SOURCE_SHA})." + exit 1 + fi + echo "Validated CI run ${ci_run_id} for ${SOURCE_SHA}." + fi + deploy: name: Build and deploy to Cloudflare Pages + needs: validate runs-on: ubuntu-latest timeout-minutes: 30 - # Add required reviewers to this environment in the repo settings to gate - # production deploys behind an approval. - environment: ${{ github.event.inputs.branch == 'main' && 'production' || 'preview' }} + environment: ${{ (github.event_name == 'workflow_run' || inputs.branch == 'main') && 'production' || 'preview' }} + # The read-only validation gate runs before this serialized lane. Keeping + # cancel-in-progress false prevents a late older completion (or a failed CI + # event whose validation is skipped) from cancelling a newer production + # release. Freshness is checked again after entering the lane. + concurrency: + group: deploy-${{ github.event_name == 'workflow_run' && 'main' || inputs.branch }} + cancel-in-progress: false steps: + - name: Recheck queued production source + if: env.PAGES_BRANCH == 'main' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + current_main="$(gh api "/repos/${GITHUB_REPOSITORY}/git/ref/heads/main" --jq '.object.sha')" + if [[ "${SOURCE_SHA}" != "${current_main}" ]]; then + echo "::error::Main advanced to ${current_main} while this release was queued; refusing stale source ${SOURCE_SHA}." + exit 1 + fi + - uses: actions/checkout@v4 + with: + ref: ${{ env.SOURCE_SHA }} + persist-credentials: false - uses: actions/setup-node@v4 with: @@ -32,18 +121,23 @@ jobs: - uses: oven-sh/setup-bun@v2 - # The addresses are committed in frontend/.env on purpose (public data, - # git history is the audit trail). Echo them so the run log records - # exactly which contract this bundle points at. - - name: Record deployed contract addresses + # The addresses are public and committed; the summary links the exact + # checked-out source and its network mappings to this Pages deployment. + - name: Record source and contract addresses + shell: bash run: | - echo "### Contract addresses in this build" >> "$GITHUB_STEP_SUMMARY" - echo '```' >> "$GITHUB_STEP_SUMMARY" - grep -E '^[A-Z]+_ADDRESS=' frontend/.env >> "$GITHUB_STEP_SUMMARY" - echo '```' >> "$GITHUB_STEP_SUMMARY" + { + echo "### Frontend deployment" + echo "- Source: \`${SOURCE_SHA}\`" + echo "- Pages branch: \`${PAGES_BRANCH}\`" + echo + echo '```' + grep -E '^[A-Z]+_ADDRESS=' frontend/.env + echo '```' + } >> "${GITHUB_STEP_SUMMARY}" - # See the comment in ci.yml's frontend job: both installs are required for - # the vite dedupe to be exercised rather than bypassed. + # All four installs reproduce the physical dependency layout whose + # distinct WASM/runtime generations the frontend build keeps isolated. - name: Install root dependencies run: bun install --frozen-lockfile @@ -51,6 +145,14 @@ jobs: run: bun install --frozen-lockfile working-directory: frontend + - name: Install v1 browser protocol dependencies + run: npm ci + working-directory: frontend/protocols/v1 + + - name: Install v2 browser protocol dependencies + run: npm ci + working-directory: frontend/protocols/v2 + - name: Typecheck run: bun run typecheck working-directory: frontend @@ -59,6 +161,21 @@ jobs: run: bun run build working-directory: frontend + # Narrow the race between the queued-source check and the upload. A newer + # release waits in the same lane and will publish after this run exits. + - name: Recheck production freshness + if: env.PAGES_BRANCH == 'main' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + current_main="$(gh api "/repos/${GITHUB_REPOSITORY}/git/ref/heads/main" --jq '.object.sha')" + if [[ "${SOURCE_SHA}" != "${current_main}" ]]; then + echo "::error::Main advanced to ${current_main} during the build; refusing stale upload of ${SOURCE_SHA}." + exit 1 + fi + - name: Deploy to Cloudflare Pages uses: cloudflare/wrangler-action@v3 with: @@ -67,4 +184,4 @@ jobs: command: >- pages deploy frontend/dist --project-name shielded-night - --branch ${{ github.event.inputs.branch }} + --branch ${{ env.PAGES_BRANCH }} diff --git a/.gitignore b/.gitignore index 6902eb4..edd4751 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ midnight-level-db*/ .claude/ .wrangler/ .debug-tx.hex +.local/ diff --git a/README.md b/README.md index c8dc524..cd01839 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Convert native **unshielded NIGHT** into **shielded sNight** (a contract-minted wrapper token) and back, on Midnight. -Live (preview): https://shielded-night.pages.dev +Live (Preview / Preprod / Stagenet selector): https://shielded-night.pages.dev ## What this is @@ -56,7 +56,7 @@ Locked NIGHT backs the wrapper 1:1 across both models - the invariant `locked NI │ └── lib/ # connector, providers, walletAdapter, contract, swap, tokens, networks, runtime-config ├── .github/workflows/ │ ├── ci.yml # unit, frontend, byte-exact rebuild, integration -│ └── deploy.yml # manual-only frontend deploy to Cloudflare Pages +│ └── deploy.yml # automatic production + manual preview Pages deploy ├── TESTING.md └── README.md ``` @@ -66,12 +66,14 @@ Locked NIGHT backs the wrapper 1:1 across both models - the invariant `locked NI The frontend is a Vite + React app that connects to any `window.midnight` wallet (e.g. Lace), reads your NIGHT/sNight balances, and runs the atomic one-transaction swaps (one wallet approval each way). Proving is delegated to the wallet. ```bash -cd frontend -bun install -bun run dev # http://localhost:5173 (uses the committed .env) +bun install --frozen-lockfile +bun --cwd frontend install --frozen-lockfile +npm --prefix frontend/protocols/v1 ci +npm --prefix frontend/protocols/v2 ci +bun --cwd frontend run dev # http://localhost:5173 (uses the committed .env) ``` -Needs a Midnight wallet extension and the compiled artifacts in `src/managed/` (run `bun run compact` at the repo root if missing). Deploy details and the wallet-proving model are in [frontend/README.md](frontend/README.md). +Needs a Midnight wallet extension, the v1 artifacts in `src/managed/`, and the v2 artifacts in `contracts/v2/managed/`. The two protocol installs remain separate because their ledger/runtime WASM generations cannot share class identities. Deploy details and the wallet-proving model are in [frontend/README.md](frontend/README.md). Deploy a contract (needs a funded, DUST-registered wallet). Put the deployer credentials in the repo-root `.env` (gitignored - template in @@ -91,6 +93,49 @@ Two `.env` files, opposite policies: the root `.env` holds **secrets** and is gitignored; [frontend/.env](frontend/.env) holds only **public contract addresses** and is committed (the deployed address lives in git history). +### Deploying the 2.x contract to Stagenet + +Contract deployment is a local-host operation; the GitHub workflow only builds and uploads the static website. Install the isolated v2 dependency tree, reproduce the compiler 0.34.0 artifacts, and run the deployer with a funded, DUST-registered Stagenet wallet and a compatible proof server (the default proof-server URL is `http://127.0.0.1:6300`): + +The configured deployment is `052051d38424bcb5e1b6616598aed7863fbe5e6a2db55215ef9ad45fc2bc1403`, transaction `00ef87fbc290dd8720ca4c2748f3144ca590ce2f9aa7b5409e1d20f8d5121162a2`, from source `f23f39a74a5dc2f90a73e7b718ccdef03f825fac`. Its metadata and all 11 verifier keys match the committed compiler 0.34.0 artifacts; its intentionally unlocked 1-of-1 maintenance authority matches the durably retained key's public identity. The earlier `e42e55384b2aa147e098d0da487db219e8cdf4c3d74261ff16b800b1d95bbec6` deployment remains historical evidence and is not configured because its maintenance key was not retained. + +```bash +npm --prefix contracts/v2 ci +bun run compact:v2 + +# Required durable custody path. The deployer creates or reuses this private +# file at mode 0600 before it starts the wallet or can submit a transaction. +mkdir -p /private/durable/shielded-night +chmod 700 /private/durable/shielded-night + +# Read WALLET_SEED from an existing private file without copying it into this repo. +MN_MAINTENANCE_KEY_FILE=/private/durable/shielded-night/stagenet-maintenance-key.json \ +MN_WALLET_ENV_FILE=/private/path/to/wallet.env MN_ENV=stagenet bun run deploy:v2 + +# Or use MN_MNEMONIC / MN_SEED from the gitignored root .env shown above. +MN_MAINTENANCE_KEY_FILE=/private/durable/shielded-night/stagenet-maintenance-key.json \ +MN_ENV=stagenet bun run deploy:v2 +``` + +`MN_MAINTENANCE_KEY_FILE` is mandatory and must be an absolute path on durable storage. The file contains the maintenance signing key, so back it up securely and never print or commit it. A repeat invocation reads the existing file, enforces mode 0600, re-derives its public key and reuses that exact key. When the deployer runs inside a temporary Docker container, bind-mount the host directory and point the variable at the mounted path; a path inside an ephemeral container or volume is not durable: + +```bash +docker run --rm \ + --mount type=bind,src=/private/durable/shielded-night,dst=/run/shielded-night-private \ + -e MN_MAINTENANCE_KEY_FILE=/run/shielded-night-private/stagenet-maintenance-key.json \ + your-deployment-image bun run deploy:v2 +``` + +Wallet synchronization uses a five-minute timeout by default and then requires positive NIGHT and DUST balances before provider initialization or transaction construction. Set `MN_WALLET_SYNC_TIMEOUT_MS` to an integer from `30000` through `900000` when a slower indexer needs a different bounded wait. + +The deployer closes and read-back validates the key file before wallet startup, passes that exact key to Midnight.js, and verifies that its derived public key is the 1-of-1 on-chain maintenance authority. It then confirms the transaction, compares the circuit set and verifier keys with `contracts/v2/managed`, reports the maintenance-authority state, and writes a private record to `.local/deployments/v2-stagenet-
.json` by default. It does not lock the maintenance authority. Preserve the printed `STAGENET_ADDRESS` as public data in `frontend/.env`, then independently repeat the read-only verification: + +```bash +MN_ENV=stagenet CV_ADDRESS= bun run verify:deployment:v2 +``` + +That committed public address becomes part of the frontend build; after the change reaches `main` and same-SHA CI succeeds, the Pages workflow below publishes it automatically. Never commit the wallet file, seed, mnemonic, or `.local` deployment record. + ### Deploying into a stack you already have Everything above assumes the local devnet is on this host's loopback and that a @@ -122,7 +167,7 @@ On `undeployed` the deployer seed defaults to the genesis seed (`…0001`). Set `MN_SEED` to a dedicated one whenever anything else on that stack uses genesis — two facades on one wallet knock each other offline. -## Locking the contract +## Locking a 1.x contract Every Midnight contract has a **maintenance authority** - a committee of keys allowed to change its rules (e.g. swap out a circuit's verifier key). On a fresh deploy that committee is just the deployer (1-of-1), so the deployer can still alter the contract after the fact. For a trustless release you remove that power. @@ -143,11 +188,11 @@ Locking installs an **empty committee at threshold 1**. No signature set can eve - **Locked = un-upgradeable, not disabled.** All circuits keep working; only the rules can never change. Users can rely on the code (and the solvency invariant) never shifting under them. - **It is a one-way door.** A locked contract can't be unlocked. To change anything, deploy a fresh instance and point `frontend/.env` at the new address. -The live preview contract is locked. To iterate, deploy a fresh instance and repoint the frontend. +The existing live Preview 1.x contract is locked. The new Stagenet 2.x deployer deliberately reports and preserves its maintenance authority instead of locking it; its deployment record must not claim immutability. To iterate on a locked v1 contract, deploy a fresh instance and repoint the frontend. ## Verifying the deployment -Anyone can check, without trusting us, that (1) the deployed contract is exactly the code in this repo and (2) it can never be changed. Both checks are read-only - no wallet or seed needed. +The steps below verify the existing 1.x deployments against `src/managed` and, where locked, prove their maintenance authority cannot change them. Both checks are read-only - no wallet or seed needed. The Stagenet 2.x verifier is the separate `verify:deployment:v2` command above and reports its intentionally unlocked authority. ### 1. Reproduce the compiled artifacts byte-for-byte @@ -240,18 +285,25 @@ Unit tests run every circuit against an in-memory context, including security an | Job | What it guards | | --- | --- | -| **Unit tests** | Every circuit against the in-memory simulator, plus a repo-wide typecheck. Seconds. | -| **Frontend** | `tsc --noEmit` and a real `vite build`. Installs **both** the root and frontend dependency trees on purpose — the compiled contract is imported from outside the frontend package root, so that is the only way the `resolve.dedupe` protection against duplicate WASM instances is actually exercised rather than bypassed. | -| **Byte-exact rebuild** | Deletes `src/managed/`, recompiles `src/shielded-night.compact` into the empty tree, and asserts the result is identical to what was committed. Deliberately uncached, and deliberately deleting first — either shortcut would let the job compare the artifacts against themselves and pass without verifying anything. This is what backs the verifiability claim above. ~15s. | +| **Unit tests** | Runs the v1 simulator and repo typecheck with Compact 0.31.1, plus the isolated v2 simulator and typecheck after a Compact 0.34.0 fast compile. | +| **Frontend** | Installs the root, frontend, v1 browser protocol, and v2 browser protocol lockfiles before `tsc --noEmit` and a real `vite build`. This reproduces the physical package layout used to keep the two WASM/runtime generations isolated. | +| **Byte-exact rebuilds** | Independent jobs delete and rebuild `src/managed/` with Compact 0.31.1 and `contracts/v2/managed/` with Compact 0.34.0, then assert each tree is byte-identical to the committed artifacts. Compiling into empty trees prevents either check from passing against untouched outputs. | | **Integration tests** | Full docker stack: node + indexer + proof server. | -[`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) builds the frontend and ships it to Cloudflare Pages. It is **`workflow_dispatch` only** — nothing deploys on a merge. The `branch` input picks the target: `main` is the production URL, anything else (default `preview`) gets a throwaway preview URL. The run summary records the contract addresses baked into the bundle. +[`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) builds the frontend and uploads `frontend/dist` to the existing Cloudflare Pages project. A successful push-triggered CI run for the repository's current `main` commit automatically publishes that exact commit to `shielded-night.pages.dev`. Failed CI, pull-request CI, fork-originated runs, and CI for a commit that is no longer current `main` cannot publish. Production runs share a serialized concurrency lane and recheck `main` after waiting, so a late older CI completion cannot cancel or overwrite a newer release. + +The workflow also retains manual dispatch. Select the source ref in GitHub's **Run workflow** control, then set `branch`: + +- `preview` (the default), or another valid branch name, builds that selected ref and creates a Cloudflare preview deployment. +- `main` publishes production only when the selected source is the current `main` commit and that exact SHA already has successful push-triggered CI. This validation prevents a manual run from bypassing CI. + +The run summary records the source SHA, Pages branch, and public contract addresses baked into the bundle. GitHub documents why privileged [`workflow_run` jobs must not run untrusted source](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run); the workflow therefore checks the triggering repository, event, branch, conclusion and SHA before checkout. Cloudflare documents this prebuilt-asset flow as [Pages Direct Upload with continuous integration](https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/). It needs two repository secrets: | Secret | Where to get it | | --- | --- | -| `CLOUDFLARE_API_TOKEN` | Cloudflare dashboard → My Profile → API Tokens, using the **Edit Cloudflare Workers** template (Pages deploys use the same permission). | +| `CLOUDFLARE_API_TOKEN` | Cloudflare dashboard → My Profile → API Tokens, scoped to the correct account with **Cloudflare Pages: Edit**. Store only the token value, without the `Bearer` prefix. | | `CLOUDFLARE_ACCOUNT_ID` | Cloudflare dashboard → Workers & Pages, in the right-hand sidebar. | -Each `branch` value maps to a GitHub environment (`production` / `preview`), so production deploys can be put behind required reviewers in the repo's environment settings. +Store both as GitHub Actions secrets available to this public repository. Each target maps to a GitHub environment (`production` / `preview`); environment protection rules can add approval gates independently of the source and CI checks above. diff --git a/bun.lock b/bun.lock index 0306d99..6fbaf9b 100644 --- a/bun.lock +++ b/bun.lock @@ -20,6 +20,7 @@ "yaml": "^2.9.0", }, "devDependencies": { + "@midnight-ntwrk/dapp-connector-api": "4.0.1", "@types/node": "^24.10.0", "@types/ws": "^8.18.1", "testcontainers": "^11.12.0", @@ -58,6 +59,8 @@ "@midnight-ntwrk/compact-runtime": ["@midnight-ntwrk/compact-runtime@0.16.0", "", { "dependencies": { "@midnight-ntwrk/onchain-runtime-v3": "^3.0.0", "@types/object-inspect": "^1.8.1", "object-inspect": "^1.12.3" } }, "sha512-UR8+MI5zol+gkne17ZZru8xmZNf11xMgQJkiLT9KWsF+QD8Wuz1WONaqQLL0RAZ2aN2XlRsBFd0ViKDVh8prFw=="], + "@midnight-ntwrk/dapp-connector-api": ["@midnight-ntwrk/dapp-connector-api@4.0.1", "", {}, "sha512-IstRo8xfmlJlGgUcAJeRzPUmGCp0/xZR3/bfTOk33MHrzbGmB79r/zYziGavcclo1pkkoBHAodX4vz3xgFxczw=="], + "@midnight-ntwrk/ledger-v8": ["@midnight-ntwrk/ledger-v8@8.1.0", "", {}, "sha512-rwOVP5kBwACpYmmY6+oLeaiM3e5gHscRMjbZUOntOC5QdtqLdpeep6eQW1OngI+sxjjdVoGg2eE16sLf+DAHmQ=="], "@midnight-ntwrk/midnight-js": ["@midnight-ntwrk/midnight-js@4.1.1", "", { "dependencies": { "@midnight-ntwrk/midnight-js-contracts": "4.1.1", "@midnight-ntwrk/midnight-js-network-id": "4.1.1", "@midnight-ntwrk/midnight-js-protocol": "4.1.1", "@midnight-ntwrk/midnight-js-types": "4.1.1", "@midnight-ntwrk/midnight-js-utils": "4.1.1" } }, "sha512-n6g3+NA3umlZ0FT/lU7VktKyhaYcJsrh3Jcr50pHkUZw5wMqy0gncWZklQmp8qU8F6/igy5LywKZ30PIL3wOHA=="], diff --git a/contracts/v2/managed/compiler/contract-info.json b/contracts/v2/managed/compiler/contract-info.json new file mode 100644 index 0000000..9a5137f --- /dev/null +++ b/contracts/v2/managed/compiler/contract-info.json @@ -0,0 +1,491 @@ +{ + "compiler-version": "0.34.0", + "language-version": "0.26.0", + "runtime-version": "0.19.0", + "circuits": [ + { + "name": "name", + "pure": false, + "proof": true, + "arguments": [ + ], + "result-type": { + "type-name": "Opaque", + "tsType": "string" + } + }, + { + "name": "symbol", + "pure": false, + "proof": true, + "arguments": [ + ], + "result-type": { + "type-name": "Opaque", + "tsType": "string" + } + }, + { + "name": "decimals", + "pure": false, + "proof": true, + "arguments": [ + ], + "result-type": { + "type-name": "Uint", + "maxval": 255 + } + }, + { + "name": "tokenColor", + "pure": false, + "proof": true, + "arguments": [ + ], + "result-type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "depositUnshielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "secret", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "amount", + "type": { + "type-name": "Uint", + "maxval": 18446744073709551615 + } + } + ], + "result-type": { + "type-name": "Tuple", + "types": [ + ] + } + }, + { + "name": "depositShielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "secret", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "coin", + "type": { + "type-name": "Struct", + "name": "ShieldedCoinInfo", + "elements": [ + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "color", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "value", + "type": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + } + ] + } + } + ], + "result-type": { + "type-name": "Tuple", + "types": [ + ] + } + }, + { + "name": "withdrawUnshielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "secret", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "amount", + "type": { + "type-name": "Uint", + "maxval": 18446744073709551615 + } + }, + { + "name": "recipient", + "type": { + "type-name": "Struct", + "name": "Either", + "elements": [ + { + "name": "is_left", + "type": { + "type-name": "Boolean" + } + }, + { + "name": "left", + "type": { + "type-name": "Struct", + "name": "ContractAddress", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + }, + { + "name": "right", + "type": { + "type-name": "Struct", + "name": "UserAddress", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + } + ] + } + } + ], + "result-type": { + "type-name": "Tuple", + "types": [ + ] + } + }, + { + "name": "withdrawShielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "secret", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "amount", + "type": { + "type-name": "Uint", + "maxval": 18446744073709551615 + } + }, + { + "name": "recipient", + "type": { + "type-name": "Struct", + "name": "ZswapCoinPublicKey", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + }, + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ], + "result-type": { + "type-name": "Struct", + "name": "ShieldedCoinInfo", + "elements": [ + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "color", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "value", + "type": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + } + ] + } + }, + { + "name": "getBalance", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "secret", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ], + "result-type": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + }, + { + "name": "convertToShielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "amount", + "type": { + "type-name": "Uint", + "maxval": 18446744073709551615 + } + }, + { + "name": "recipient", + "type": { + "type-name": "Struct", + "name": "ZswapCoinPublicKey", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + }, + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ], + "result-type": { + "type-name": "Struct", + "name": "ShieldedCoinInfo", + "elements": [ + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "color", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "value", + "type": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + } + ] + } + }, + { + "name": "convertToUnshielded", + "pure": false, + "proof": true, + "arguments": [ + { + "name": "coin", + "type": { + "type-name": "Struct", + "name": "ShieldedCoinInfo", + "elements": [ + { + "name": "nonce", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "color", + "type": { + "type-name": "Bytes", + "length": 32 + } + }, + { + "name": "value", + "type": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + } + ] + } + }, + { + "name": "recipient", + "type": { + "type-name": "Struct", + "name": "Either", + "elements": [ + { + "name": "is_left", + "type": { + "type-name": "Boolean" + } + }, + { + "name": "left", + "type": { + "type-name": "Struct", + "name": "ContractAddress", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + }, + { + "name": "right", + "type": { + "type-name": "Struct", + "name": "UserAddress", + "elements": [ + { + "name": "bytes", + "type": { + "type-name": "Bytes", + "length": 32 + } + } + ] + } + } + ] + } + } + ], + "result-type": { + "type-name": "Tuple", + "types": [ + ] + } + } + ], + "witnesses": [ + ], + "contracts": [ + ], + "ledger": [ + { + "name": "balances", + "index": 0, + "exported": true, + "storage": "Map", + "key": { + "type-name": "Bytes", + "length": 32 + }, + "value": { + "type-name": "Uint", + "maxval": 340282366920938463463374607431768211455 + } + }, + { + "name": "_name", + "index": 1, + "exported": true, + "storage": "Cell", + "type": { + "type-name": "Opaque", + "tsType": "string" + } + }, + { + "name": "_symbol", + "index": 2, + "exported": true, + "storage": "Cell", + "type": { + "type-name": "Opaque", + "tsType": "string" + } + }, + { + "name": "_decimals", + "index": 3, + "exported": true, + "storage": "Cell", + "type": { + "type-name": "Uint", + "maxval": 255 + } + } + ] +} diff --git a/contracts/v2/managed/compiler/contract-manifest.json b/contracts/v2/managed/compiler/contract-manifest.json new file mode 100644 index 0000000..9e27b16 --- /dev/null +++ b/contracts/v2/managed/compiler/contract-manifest.json @@ -0,0 +1,258 @@ +{ + "manifest-version": "1", + "compiler-version": "0.34.0", + "language-version": "0.26.0", + "runtime-version": "0.19.0", + "compiler": { + "type": "directory", + "contract-info.json": { + "type": "file", + "size": 10824, + "hash": "4be77d9071bc7df292cd47a8c0b592647164faf581676ea713c82f0f7db33bf0" + } + }, + "contract": { + "type": "directory", + "index.d.ts": { + "type": "file", + "size": 10829, + "hash": "8245a78e2fd8eef31d71263a5e051aabac69e76643aa8b76e59e7ab24a8e9da3" + }, + "index.js": { + "type": "file", + "size": 128904, + "hash": "9e7b680be14300945c4245a974352f2440bed7191863b1df839a231f0d0b521c" + }, + "index.js.map": { + "type": "file", + "size": 6146, + "hash": "94abf23852fd44bd9cf8b51879a10d3e9e76fb3a5f9e0cbafa3c9616e250d563" + } + }, + "zkir": { + "type": "directory", + "convertToShielded.bzkir": { + "type": "file", + "size": 608, + "hash": "d18d0a123c07e091e8399c9038cec0d196ac6d690175b018829483898bb4dc8d" + }, + "convertToShielded.zkir": { + "type": "file", + "size": 8848, + "hash": "46ffbeb4fea6fdb8f62cf3bf3a343fa5efdfdd0b2bb5cc3e6000292d5c57e40b" + }, + "convertToUnshielded.bzkir": { + "type": "file", + "size": 1113, + "hash": "322e44797c423f495d330b495990f7ef1f0aba3a5b970aaebf9c2040261399b4" + }, + "convertToUnshielded.zkir": { + "type": "file", + "size": 16072, + "hash": "510e51237aeef4384631fe03b49c96013b92d120a7e831b0fb6e307a8e209310" + }, + "decimals.bzkir": { + "type": "file", + "size": 71, + "hash": "bcba28c871a59908f3949f670c82ece40b30a8c5405eda14e39ba8636480c71f" + }, + "decimals.zkir": { + "type": "file", + "size": 953, + "hash": "ea3d2d1a65f5388d28645fd4c0fa4a1f9d516e01a164c4e2e7138aa82fb95fb9" + }, + "depositShielded.bzkir": { + "type": "file", + "size": 930, + "hash": "73f91b44a64c982c130a54bb10fbc22da242ca7a9560711729a740be82259ac1" + }, + "depositShielded.zkir": { + "type": "file", + "size": 13821, + "hash": "16e7d5ada1adea0dd09e9203574fe898fa2ae3198272fda84b12cfbc06507558" + }, + "depositUnshielded.bzkir": { + "type": "file", + "size": 576, + "hash": "bbeb4e4e56b498ba769089bd8f8c26e515dee25166831e9a1d44a98594714d58" + }, + "depositUnshielded.zkir": { + "type": "file", + "size": 8859, + "hash": "274f10abffd9ffd00c191b34ec4d658b0eb57336f8e563630bd82a1980b201ee" + }, + "getBalance.bzkir": { + "type": "file", + "size": 131, + "hash": "c9cfcae07512a89916bc6baba36f189ac2927a7007687e0b4232fc6972c6d86e" + }, + "getBalance.zkir": { + "type": "file", + "size": 1694, + "hash": "ce9fea83599adf8ff4e2c66f431f585d5013662a467112fd41d48c0d6ef071de" + }, + "name.bzkir": { + "type": "file", + "size": 103, + "hash": "7663272ca075a1e6d0d0502251cc8224e92a4576eb40ebbebeb14ce5206ffb56" + }, + "name.zkir": { + "type": "file", + "size": 954, + "hash": "8e8597767f0199f401448d572f251356cfb9ae15ecf364430e7c949650c55893" + }, + "symbol.bzkir": { + "type": "file", + "size": 105, + "hash": "0c0165a89e575ffc4e53fc5c04b7ce9496a081a874914af06c89c78d4e20c2fb" + }, + "symbol.zkir": { + "type": "file", + "size": 993, + "hash": "53a787199d7441b40e651f0bf8d5bc7e672d02d34ac8ea1b6d47bf7534694cf3" + }, + "tokenColor.bzkir": { + "type": "file", + "size": 141, + "hash": "a5ca334193560fb755c20a91bd6675e2cf865b5cad480d9e755e257b1d026a86" + }, + "tokenColor.zkir": { + "type": "file", + "size": 1542, + "hash": "60168cbd0bef54494966388e3f672dd108f78a9d4c8aae15522e41f632f26ace" + }, + "withdrawShielded.bzkir": { + "type": "file", + "size": 711, + "hash": "1c7c58003085134023c4002a6beb899dafd6f45986e98ed157fac3cb5d154b3b" + }, + "withdrawShielded.zkir": { + "type": "file", + "size": 10348, + "hash": "5e73ba4f7765db4ac8c5f9758e6d1f56b5bcae0cae073ef051f31a9016571640" + }, + "withdrawUnshielded.bzkir": { + "type": "file", + "size": 1097, + "hash": "96ec6dd5aaa8753a8da11618706166fc7373664ba87fd4169febb9b5d9b10eb8" + }, + "withdrawUnshielded.zkir": { + "type": "file", + "size": 16165, + "hash": "2de2779327d878142f7349bdd4c8ffac20651dd883f42ddce9ff9c18d99de9dc" + } + }, + "keys": { + "type": "directory", + "convertToShielded.prover": { + "type": "file", + "size": 5204863, + "hash": "39732387554c10974a04365dfc5e46f4f024f5f426752d850b0b124b66c77711" + }, + "convertToShielded.verifier": { + "type": "file", + "size": 2119, + "hash": "ceb794f4a07d5d0f4a200a364cc6334f6b3a8f08fa5a37ba3c99edac4da968eb" + }, + "convertToUnshielded.prover": { + "type": "file", + "size": 5206057, + "hash": "fd0790325985b5afed1f88c93a1a864a12b26c6f8e50d5cc89033923b4e15911" + }, + "convertToUnshielded.verifier": { + "type": "file", + "size": 2119, + "hash": "527e93c8b02cc14d86c625834d874556183d5e45ea615338bbe4966fb503eb4d" + }, + "decimals.prover": { + "type": "file", + "size": 22436, + "hash": "4833687440dcc5a3b27e8af9b6442a84decfd62f07f523aef9c450af07f249eb" + }, + "decimals.verifier": { + "type": "file", + "size": 1351, + "hash": "95a209a810ddd347aa984bb6c6a5c57ba66ef29b4221f1fafd3f04e1fa4fdec9" + }, + "depositShielded.prover": { + "type": "file", + "size": 9994806, + "hash": "bf31c7665560f782d7e05e1bed238e91a9bab688c35cb55aa2129faf4f3249d6" + }, + "depositShielded.verifier": { + "type": "file", + "size": 2119, + "hash": "50ec1aa10bc46a20ecfdaae1fb3354cff6c33dc61fa5c97b3e49e87878cba46c" + }, + "depositUnshielded.prover": { + "type": "file", + "size": 2824062, + "hash": "dfb0813bfce8c813d2e288653a39865d1ae07b9492090cbb268d61fe36454940" + }, + "depositUnshielded.verifier": { + "type": "file", + "size": 2119, + "hash": "72e482e604354b866f7cab1852144c091d06bd913e9a5bd8979046275d88fdc2" + }, + "getBalance.prover": { + "type": "file", + "size": 2820035, + "hash": "33b24cefc9a26ed21b4c1f6d8f8b1a87d64a0a6787eef11440f88a26f06a9a26" + }, + "getBalance.verifier": { + "type": "file", + "size": 2119, + "hash": "7981e85490a0d425652636da8c3b5aa9a3d998ce72ef04c16d3524dba08416bf" + }, + "name.prover": { + "type": "file", + "size": 22436, + "hash": "b05b5111aea5700ed9f8074772535b073481137e0206581ad7ba21c2f08b14f0" + }, + "name.verifier": { + "type": "file", + "size": 1351, + "hash": "b36a8137f9cb7bce5546e12d5194c5e72a8caa1b11441c35a0f2379246e04387" + }, + "symbol.prover": { + "type": "file", + "size": 22434, + "hash": "4b84581f1f43f14bbb8eeaba4acb8a65b87e040dcf6939173779ecf78904f295" + }, + "symbol.verifier": { + "type": "file", + "size": 1351, + "hash": "21005ce77566c9a7f5fed12b07c79796abd19b6d6afbc6553ae6aeb9e908b6d9" + }, + "tokenColor.prover": { + "type": "file", + "size": 2814667, + "hash": "17525dbbe8be1e855e12adc581d89745398ef224cd62c8bb12c7fdac5b4ae7a8" + }, + "tokenColor.verifier": { + "type": "file", + "size": 2119, + "hash": "904cecd3fab66d4f598eee1d90709771e735695cff5344c71cf8afc31a319b5d" + }, + "withdrawShielded.prover": { + "type": "file", + "size": 5212557, + "hash": "0787d27d03f1bbe5b3c2f3f8b6a2144756ea52d282f52848605a75cc5b741de4" + }, + "withdrawShielded.verifier": { + "type": "file", + "size": 2119, + "hash": "71019ebd128964628325541c6a14db941c2dbf024689525132a1e13dff457b42" + }, + "withdrawUnshielded.prover": { + "type": "file", + "size": 2821823, + "hash": "8ea30a2e29cd2b72dc3d2bdf7088f88ad24c33c8fd457a2a1d99ad0c7b92168c" + }, + "withdrawUnshielded.verifier": { + "type": "file", + "size": 2119, + "hash": "b04e3748e1b1146648f490531eabf874f6fa8bb1331680c458b234125a590a37" + } + } +} diff --git a/contracts/v2/managed/contract/index.d.ts b/contracts/v2/managed/contract/index.d.ts new file mode 100644 index 0000000..d4f5d9a --- /dev/null +++ b/contracts/v2/managed/contract/index.d.ts @@ -0,0 +1,178 @@ +import type * as __compactRuntime from '@midnight-ntwrk/compact-runtime'; + +export type Witnesses = { +} + +export type ImpureCircuits = { + name(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + symbol(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + decimals(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + tokenColor(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + depositUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint): Promise<__compactRuntime.CircuitResults>; + depositShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + coin_0: { nonce: Uint8Array, color: Uint8Array, value: bigint + }): Promise<__compactRuntime.CircuitResults>; + withdrawUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; + withdrawShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + getBalance(context: __compactRuntime.CircuitContext, secret_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToShielded(context: __compactRuntime.CircuitContext, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToUnshielded(context: __compactRuntime.CircuitContext, + coin_0: { nonce: Uint8Array, + color: Uint8Array, + value: bigint + }, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; +} + +export type ProvableCircuits = { + name(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + symbol(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + decimals(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + tokenColor(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + depositUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint): Promise<__compactRuntime.CircuitResults>; + depositShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + coin_0: { nonce: Uint8Array, color: Uint8Array, value: bigint + }): Promise<__compactRuntime.CircuitResults>; + withdrawUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; + withdrawShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + getBalance(context: __compactRuntime.CircuitContext, secret_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToShielded(context: __compactRuntime.CircuitContext, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToUnshielded(context: __compactRuntime.CircuitContext, + coin_0: { nonce: Uint8Array, + color: Uint8Array, + value: bigint + }, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; +} + +export type PureCircuits = { +} + +export type Circuits = { + name(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + symbol(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + decimals(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + tokenColor(context: __compactRuntime.CircuitContext): Promise<__compactRuntime.CircuitResults>; + depositUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint): Promise<__compactRuntime.CircuitResults>; + depositShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + coin_0: { nonce: Uint8Array, color: Uint8Array, value: bigint + }): Promise<__compactRuntime.CircuitResults>; + withdrawUnshielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; + withdrawShielded(context: __compactRuntime.CircuitContext, + secret_0: Uint8Array, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + getBalance(context: __compactRuntime.CircuitContext, secret_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToShielded(context: __compactRuntime.CircuitContext, + amount_0: bigint, + recipient_0: { bytes: Uint8Array }, + nonce_0: Uint8Array): Promise<__compactRuntime.CircuitResults>; + convertToUnshielded(context: __compactRuntime.CircuitContext, + coin_0: { nonce: Uint8Array, + color: Uint8Array, + value: bigint + }, + recipient_0: { is_left: boolean, + left: { bytes: Uint8Array }, + right: { bytes: Uint8Array } + }): Promise<__compactRuntime.CircuitResults>; +} + +export type Ledger = { + balances: { + isEmpty(): boolean; + size(): bigint; + member(key_0: Uint8Array): boolean; + lookup(key_0: Uint8Array): bigint; + [Symbol.iterator](): Iterator<[Uint8Array, bigint]> + }; + readonly _name: string; + readonly _symbol: string; + readonly _decimals: bigint; +} + +export type ContractReferenceLocations = any; + +export declare const contractReferenceLocations : ContractReferenceLocations; + +export declare class Contract = Witnesses> { + witnesses: W; + circuits: Circuits; + impureCircuits: ImpureCircuits; + provableCircuits: ProvableCircuits; + constructor(witnesses: W); + initialState(context: __compactRuntime.ConstructorContext, + name__0: string, + symbol__0: string, + decimals__0: bigint): Promise<__compactRuntime.ConstructorResult>; +} + +export declare function ledger(state: __compactRuntime.StateValue | __compactRuntime.ChargedState): Ledger; +export declare const pureCircuits: PureCircuits; +export declare const expectedVk: Record; diff --git a/contracts/v2/managed/contract/index.js b/contracts/v2/managed/contract/index.js new file mode 100644 index 0000000..8baddf8 --- /dev/null +++ b/contracts/v2/managed/contract/index.js @@ -0,0 +1,2010 @@ +import * as __compactRuntime from '@midnight-ntwrk/compact-runtime'; +__compactRuntime.checkRuntimeVersion('0.19.0'); + +const _descriptor_0 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8); + +const _descriptor_1 = new __compactRuntime.CompactTypeBytes(32); + +class _ZswapCoinPublicKey_0 { + alignment() { + return _descriptor_1.alignment(); + } + fromValue(value_0) { + return { + bytes: _descriptor_1.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_1.toValue(value_0.bytes); + } +} + +const _descriptor_2 = new _ZswapCoinPublicKey_0(); + +const _descriptor_3 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16); + +class _ShieldedCoinInfo_0 { + alignment() { + return _descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_3.alignment())); + } + fromValue(value_0) { + return { + nonce: _descriptor_1.fromValue(value_0), + color: _descriptor_1.fromValue(value_0), + value: _descriptor_3.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_1.toValue(value_0.nonce).concat(_descriptor_1.toValue(value_0.color).concat(_descriptor_3.toValue(value_0.value))); + } +} + +const _descriptor_4 = new _ShieldedCoinInfo_0(); + +const _descriptor_5 = __compactRuntime.CompactTypeBoolean; + +class _ContractAddress_0 { + alignment() { + return _descriptor_1.alignment(); + } + fromValue(value_0) { + return { + bytes: _descriptor_1.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_1.toValue(value_0.bytes); + } +} + +const _descriptor_6 = new _ContractAddress_0(); + +class _UserAddress_0 { + alignment() { + return _descriptor_1.alignment(); + } + fromValue(value_0) { + return { + bytes: _descriptor_1.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_1.toValue(value_0.bytes); + } +} + +const _descriptor_7 = new _UserAddress_0(); + +class _Either_0 { + alignment() { + return _descriptor_5.alignment().concat(_descriptor_6.alignment().concat(_descriptor_7.alignment())); + } + fromValue(value_0) { + return { + is_left: _descriptor_5.fromValue(value_0), + left: _descriptor_6.fromValue(value_0), + right: _descriptor_7.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_5.toValue(value_0.is_left).concat(_descriptor_6.toValue(value_0.left).concat(_descriptor_7.toValue(value_0.right))); + } +} + +const _descriptor_8 = new _Either_0(); + +const _descriptor_9 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1); + +const _descriptor_10 = __compactRuntime.CompactTypeOpaqueString; + +class _QualifiedShieldedCoinInfo_0 { + alignment() { + return _descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_3.alignment().concat(_descriptor_0.alignment()))); + } + fromValue(value_0) { + return { + nonce: _descriptor_1.fromValue(value_0), + color: _descriptor_1.fromValue(value_0), + value: _descriptor_3.fromValue(value_0), + mt_index: _descriptor_0.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_1.toValue(value_0.nonce).concat(_descriptor_1.toValue(value_0.color).concat(_descriptor_3.toValue(value_0.value).concat(_descriptor_0.toValue(value_0.mt_index)))); + } +} + +const _descriptor_11 = new _QualifiedShieldedCoinInfo_0(); + +class _Either_1 { + alignment() { + return _descriptor_5.alignment().concat(_descriptor_2.alignment().concat(_descriptor_6.alignment())); + } + fromValue(value_0) { + return { + is_left: _descriptor_5.fromValue(value_0), + left: _descriptor_2.fromValue(value_0), + right: _descriptor_6.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_5.toValue(value_0.is_left).concat(_descriptor_2.toValue(value_0.left).concat(_descriptor_6.toValue(value_0.right))); + } +} + +const _descriptor_12 = new _Either_1(); + +const _descriptor_13 = __compactRuntime.CompactTypeField; + +const _descriptor_14 = new __compactRuntime.CompactTypeBytes(21); + +class _CoinPreimage_0 { + alignment() { + return _descriptor_14.alignment().concat(_descriptor_4.alignment().concat(_descriptor_5.alignment().concat(_descriptor_1.alignment()))); + } + fromValue(value_0) { + return { + domain_sep: _descriptor_14.fromValue(value_0), + info: _descriptor_4.fromValue(value_0), + dataType: _descriptor_5.fromValue(value_0), + data: _descriptor_1.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_14.toValue(value_0.domain_sep).concat(_descriptor_4.toValue(value_0.info).concat(_descriptor_5.toValue(value_0.dataType).concat(_descriptor_1.toValue(value_0.data)))); + } +} + +const _descriptor_15 = new _CoinPreimage_0(); + +const _descriptor_16 = new __compactRuntime.CompactTypeVector(2, _descriptor_1); + +const _descriptor_17 = new __compactRuntime.CompactTypeVector(2, _descriptor_13); + +class _Either_2 { + alignment() { + return _descriptor_5.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment())); + } + fromValue(value_0) { + return { + is_left: _descriptor_5.fromValue(value_0), + left: _descriptor_1.fromValue(value_0), + right: _descriptor_1.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_5.toValue(value_0.is_left).concat(_descriptor_1.toValue(value_0.left).concat(_descriptor_1.toValue(value_0.right))); + } +} + +const _descriptor_18 = new _Either_2(); + +class _Maybe_0 { + alignment() { + return _descriptor_5.alignment().concat(_descriptor_4.alignment()); + } + fromValue(value_0) { + return { + is_some: _descriptor_5.fromValue(value_0), + value: _descriptor_4.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_5.toValue(value_0.is_some).concat(_descriptor_4.toValue(value_0.value)); + } +} + +const _descriptor_19 = new _Maybe_0(); + +class _ShieldedSendResult_0 { + alignment() { + return _descriptor_19.alignment().concat(_descriptor_4.alignment()); + } + fromValue(value_0) { + return { + change: _descriptor_19.fromValue(value_0), + sent: _descriptor_4.fromValue(value_0) + } + } + toValue(value_0) { + return _descriptor_19.toValue(value_0.change).concat(_descriptor_4.toValue(value_0.sent)); + } +} + +const _descriptor_20 = new _ShieldedSendResult_0(); + +const _descriptor_21 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4); + +export class Contract { + witnesses; + constructor(...args_0) { + if (args_0.length !== 1) { + throw new __compactRuntime.CompactError(`Contract constructor: expected 1 argument, received ${args_0.length}`); + } + const witnesses_0 = args_0[0]; + if (typeof(witnesses_0) !== 'object') { + throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor is not an object'); + } + this.witnesses = witnesses_0; + this.circuits = { + name: async (...args_1) => { + if (args_1.length !== 1) { + throw new __compactRuntime.CompactError(`name: expected 1 argument (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('name', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 121 char 1', + 'CircuitContext', + contextOrig_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._name_0(context, partialProofData); + partialProofData.output = { value: _descriptor_10.toValue(result_0), alignment: _descriptor_10.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + symbol: async (...args_1) => { + if (args_1.length !== 1) { + throw new __compactRuntime.CompactError(`symbol: expected 1 argument (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('symbol', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 127 char 1', + 'CircuitContext', + contextOrig_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._symbol_0(context, partialProofData); + partialProofData.output = { value: _descriptor_10.toValue(result_0), alignment: _descriptor_10.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + decimals: async (...args_1) => { + if (args_1.length !== 1) { + throw new __compactRuntime.CompactError(`decimals: expected 1 argument (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('decimals', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 133 char 1', + 'CircuitContext', + contextOrig_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._decimals_0(context, partialProofData); + partialProofData.output = { value: _descriptor_9.toValue(result_0), alignment: _descriptor_9.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + tokenColor: async (...args_1) => { + if (args_1.length !== 1) { + throw new __compactRuntime.CompactError(`tokenColor: expected 1 argument (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('tokenColor', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 139 char 1', + 'CircuitContext', + contextOrig_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._tokenColor_0(context, partialProofData); + partialProofData.output = { value: _descriptor_1.toValue(result_0), alignment: _descriptor_1.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + depositUnshielded: async (...args_1) => { + if (args_1.length !== 3) { + throw new __compactRuntime.CompactError(`depositUnshielded: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const secret_0 = args_1[1]; + const amount_0 = args_1[2]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('depositUnshielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 207 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(secret_0.buffer instanceof ArrayBuffer && secret_0.BYTES_PER_ELEMENT === 1 && secret_0.length === 32)) { + __compactRuntime.typeError('depositUnshielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 207 char 1', + 'Bytes<32>', + secret_0) + } + if (!(typeof(amount_0) === 'bigint' && amount_0 >= 0n && amount_0 <= 18446744073709551615n)) { + __compactRuntime.typeError('depositUnshielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 207 char 1', + 'Uint<0..18446744073709551616>', + amount_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_1.toValue(secret_0).concat(_descriptor_0.toValue(amount_0)), + alignment: _descriptor_1.alignment().concat(_descriptor_0.alignment()) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._depositUnshielded_0(context, + partialProofData, + secret_0, + amount_0); + partialProofData.output = { value: [], alignment: [] }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + depositShielded: async (...args_1) => { + if (args_1.length !== 3) { + throw new __compactRuntime.CompactError(`depositShielded: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const secret_0 = args_1[1]; + const coin_0 = args_1[2]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('depositShielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 237 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(secret_0.buffer instanceof ArrayBuffer && secret_0.BYTES_PER_ELEMENT === 1 && secret_0.length === 32)) { + __compactRuntime.typeError('depositShielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 237 char 1', + 'Bytes<32>', + secret_0) + } + if (!(typeof(coin_0) === 'object' && coin_0.nonce.buffer instanceof ArrayBuffer && coin_0.nonce.BYTES_PER_ELEMENT === 1 && coin_0.nonce.length === 32 && coin_0.color.buffer instanceof ArrayBuffer && coin_0.color.BYTES_PER_ELEMENT === 1 && coin_0.color.length === 32 && typeof(coin_0.value) === 'bigint' && coin_0.value >= 0n && coin_0.value <= 340282366920938463463374607431768211455n)) { + __compactRuntime.typeError('depositShielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 237 char 1', + 'struct ShieldedCoinInfo, color: Bytes<32>, value: Uint<0..340282366920938463463374607431768211456>>', + coin_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_1.toValue(secret_0).concat(_descriptor_4.toValue(coin_0)), + alignment: _descriptor_1.alignment().concat(_descriptor_4.alignment()) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._depositShielded_0(context, + partialProofData, + secret_0, + coin_0); + partialProofData.output = { value: [], alignment: [] }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + withdrawUnshielded: async (...args_1) => { + if (args_1.length !== 4) { + throw new __compactRuntime.CompactError(`withdrawUnshielded: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const secret_0 = args_1[1]; + const amount_0 = args_1[2]; + const recipient_0 = args_1[3]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('withdrawUnshielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 269 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(secret_0.buffer instanceof ArrayBuffer && secret_0.BYTES_PER_ELEMENT === 1 && secret_0.length === 32)) { + __compactRuntime.typeError('withdrawUnshielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 269 char 1', + 'Bytes<32>', + secret_0) + } + if (!(typeof(amount_0) === 'bigint' && amount_0 >= 0n && amount_0 <= 18446744073709551615n)) { + __compactRuntime.typeError('withdrawUnshielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 269 char 1', + 'Uint<0..18446744073709551616>', + amount_0) + } + if (!(typeof(recipient_0) === 'object' && typeof(recipient_0.is_left) === 'boolean' && typeof(recipient_0.left) === 'object' && recipient_0.left.bytes.buffer instanceof ArrayBuffer && recipient_0.left.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.left.bytes.length === 32 && typeof(recipient_0.right) === 'object' && recipient_0.right.bytes.buffer instanceof ArrayBuffer && recipient_0.right.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.right.bytes.length === 32)) { + __compactRuntime.typeError('withdrawUnshielded', + 'argument 3 (argument 4 as invoked from Typescript)', + 'shielded-night.compact line 269 char 1', + 'struct Either>, right: struct UserAddress>>', + recipient_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_1.toValue(secret_0).concat(_descriptor_0.toValue(amount_0).concat(_descriptor_8.toValue(recipient_0))), + alignment: _descriptor_1.alignment().concat(_descriptor_0.alignment().concat(_descriptor_8.alignment())) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._withdrawUnshielded_0(context, + partialProofData, + secret_0, + amount_0, + recipient_0); + partialProofData.output = { value: [], alignment: [] }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + withdrawShielded: async (...args_1) => { + if (args_1.length !== 5) { + throw new __compactRuntime.CompactError(`withdrawShielded: expected 5 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const secret_0 = args_1[1]; + const amount_0 = args_1[2]; + const recipient_0 = args_1[3]; + const nonce_0 = args_1[4]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('withdrawShielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 317 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(secret_0.buffer instanceof ArrayBuffer && secret_0.BYTES_PER_ELEMENT === 1 && secret_0.length === 32)) { + __compactRuntime.typeError('withdrawShielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 317 char 1', + 'Bytes<32>', + secret_0) + } + if (!(typeof(amount_0) === 'bigint' && amount_0 >= 0n && amount_0 <= 18446744073709551615n)) { + __compactRuntime.typeError('withdrawShielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 317 char 1', + 'Uint<0..18446744073709551616>', + amount_0) + } + if (!(typeof(recipient_0) === 'object' && recipient_0.bytes.buffer instanceof ArrayBuffer && recipient_0.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.bytes.length === 32)) { + __compactRuntime.typeError('withdrawShielded', + 'argument 3 (argument 4 as invoked from Typescript)', + 'shielded-night.compact line 317 char 1', + 'struct ZswapCoinPublicKey>', + recipient_0) + } + if (!(nonce_0.buffer instanceof ArrayBuffer && nonce_0.BYTES_PER_ELEMENT === 1 && nonce_0.length === 32)) { + __compactRuntime.typeError('withdrawShielded', + 'argument 4 (argument 5 as invoked from Typescript)', + 'shielded-night.compact line 317 char 1', + 'Bytes<32>', + nonce_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_1.toValue(secret_0).concat(_descriptor_0.toValue(amount_0).concat(_descriptor_2.toValue(recipient_0).concat(_descriptor_1.toValue(nonce_0)))), + alignment: _descriptor_1.alignment().concat(_descriptor_0.alignment().concat(_descriptor_2.alignment().concat(_descriptor_1.alignment()))) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._withdrawShielded_0(context, + partialProofData, + secret_0, + amount_0, + recipient_0, + nonce_0); + partialProofData.output = { value: _descriptor_4.toValue(result_0), alignment: _descriptor_4.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + getBalance: async (...args_1) => { + if (args_1.length !== 2) { + throw new __compactRuntime.CompactError(`getBalance: expected 2 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const secret_0 = args_1[1]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('getBalance', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 344 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(secret_0.buffer instanceof ArrayBuffer && secret_0.BYTES_PER_ELEMENT === 1 && secret_0.length === 32)) { + __compactRuntime.typeError('getBalance', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 344 char 1', + 'Bytes<32>', + secret_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_1.toValue(secret_0), + alignment: _descriptor_1.alignment() + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._getBalance_0(context, + partialProofData, + secret_0); + partialProofData.output = { value: _descriptor_3.toValue(result_0), alignment: _descriptor_3.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + convertToShielded: async (...args_1) => { + if (args_1.length !== 4) { + throw new __compactRuntime.CompactError(`convertToShielded: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const amount_0 = args_1[1]; + const recipient_0 = args_1[2]; + const nonce_0 = args_1[3]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('convertToShielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 370 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(typeof(amount_0) === 'bigint' && amount_0 >= 0n && amount_0 <= 18446744073709551615n)) { + __compactRuntime.typeError('convertToShielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 370 char 1', + 'Uint<0..18446744073709551616>', + amount_0) + } + if (!(typeof(recipient_0) === 'object' && recipient_0.bytes.buffer instanceof ArrayBuffer && recipient_0.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.bytes.length === 32)) { + __compactRuntime.typeError('convertToShielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 370 char 1', + 'struct ZswapCoinPublicKey>', + recipient_0) + } + if (!(nonce_0.buffer instanceof ArrayBuffer && nonce_0.BYTES_PER_ELEMENT === 1 && nonce_0.length === 32)) { + __compactRuntime.typeError('convertToShielded', + 'argument 3 (argument 4 as invoked from Typescript)', + 'shielded-night.compact line 370 char 1', + 'Bytes<32>', + nonce_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_0.toValue(amount_0).concat(_descriptor_2.toValue(recipient_0).concat(_descriptor_1.toValue(nonce_0))), + alignment: _descriptor_0.alignment().concat(_descriptor_2.alignment().concat(_descriptor_1.alignment())) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._convertToShielded_0(context, + partialProofData, + amount_0, + recipient_0, + nonce_0); + partialProofData.output = { value: _descriptor_4.toValue(result_0), alignment: _descriptor_4.alignment() }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + }, + convertToUnshielded: async (...args_1) => { + if (args_1.length !== 3) { + throw new __compactRuntime.CompactError(`convertToUnshielded: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`); + } + const contextOrig_0 = args_1[0]; + const coin_0 = args_1[1]; + const recipient_0 = args_1[2]; + if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) { + __compactRuntime.typeError('convertToUnshielded', + 'argument 1 (as invoked from Typescript)', + 'shielded-night.compact line 405 char 1', + 'CircuitContext', + contextOrig_0) + } + if (!(typeof(coin_0) === 'object' && coin_0.nonce.buffer instanceof ArrayBuffer && coin_0.nonce.BYTES_PER_ELEMENT === 1 && coin_0.nonce.length === 32 && coin_0.color.buffer instanceof ArrayBuffer && coin_0.color.BYTES_PER_ELEMENT === 1 && coin_0.color.length === 32 && typeof(coin_0.value) === 'bigint' && coin_0.value >= 0n && coin_0.value <= 340282366920938463463374607431768211455n)) { + __compactRuntime.typeError('convertToUnshielded', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 405 char 1', + 'struct ShieldedCoinInfo, color: Bytes<32>, value: Uint<0..340282366920938463463374607431768211456>>', + coin_0) + } + if (!(typeof(recipient_0) === 'object' && typeof(recipient_0.is_left) === 'boolean' && typeof(recipient_0.left) === 'object' && recipient_0.left.bytes.buffer instanceof ArrayBuffer && recipient_0.left.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.left.bytes.length === 32 && typeof(recipient_0.right) === 'object' && recipient_0.right.bytes.buffer instanceof ArrayBuffer && recipient_0.right.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.right.bytes.length === 32)) { + __compactRuntime.typeError('convertToUnshielded', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 405 char 1', + 'struct Either>, right: struct UserAddress>>', + recipient_0) + } + const context = __compactRuntime.copyCircuitContext(contextOrig_0); + const partialProofData = { + input: { + value: _descriptor_4.toValue(coin_0).concat(_descriptor_8.toValue(recipient_0)), + alignment: _descriptor_4.alignment().concat(_descriptor_8.alignment()) + }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + const result_0 = await this._convertToUnshielded_0(context, + partialProofData, + coin_0, + recipient_0); + partialProofData.output = { value: [], alignment: [] }; + __compactRuntime.finalizeCallProofData(context, partialProofData); + return { result: result_0, context: context, gasCost: context.callContext.currentGasCost }; + } + }; + this.impureCircuits = { + name: this.circuits.name, + symbol: this.circuits.symbol, + decimals: this.circuits.decimals, + tokenColor: this.circuits.tokenColor, + depositUnshielded: this.circuits.depositUnshielded, + depositShielded: this.circuits.depositShielded, + withdrawUnshielded: this.circuits.withdrawUnshielded, + withdrawShielded: this.circuits.withdrawShielded, + getBalance: this.circuits.getBalance, + convertToShielded: this.circuits.convertToShielded, + convertToUnshielded: this.circuits.convertToUnshielded + }; + this.provableCircuits = { + name: this.circuits.name, + symbol: this.circuits.symbol, + decimals: this.circuits.decimals, + tokenColor: this.circuits.tokenColor, + depositUnshielded: this.circuits.depositUnshielded, + depositShielded: this.circuits.depositShielded, + withdrawUnshielded: this.circuits.withdrawUnshielded, + withdrawShielded: this.circuits.withdrawShielded, + getBalance: this.circuits.getBalance, + convertToShielded: this.circuits.convertToShielded, + convertToUnshielded: this.circuits.convertToUnshielded + }; + } + async initialState(...args_0) { + if (args_0.length !== 4) { + throw new __compactRuntime.CompactError(`Contract state constructor: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`); + } + const constructorContext_0 = args_0[0]; + const name__0 = args_0[1]; + const symbol__0 = args_0[2]; + const decimals__0 = args_0[3]; + if (typeof(constructorContext_0) !== 'object') { + throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`); + } + if (!('initialZswapLocalState' in constructorContext_0)) { + throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript)`); + } + if (typeof(constructorContext_0.initialZswapLocalState) !== 'object') { + throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript) to be an object`); + } + if (!(typeof (name__0) === 'string')) { + __compactRuntime.typeError('Contract state constructor', + 'argument 1 (argument 2 as invoked from Typescript)', + 'shielded-night.compact line 111 char 1', + 'Opaque<"string">', + name__0) + } + if (!(typeof (symbol__0) === 'string')) { + __compactRuntime.typeError('Contract state constructor', + 'argument 2 (argument 3 as invoked from Typescript)', + 'shielded-night.compact line 111 char 1', + 'Opaque<"string">', + symbol__0) + } + if (!(typeof(decimals__0) === 'bigint' && decimals__0 >= 0n && decimals__0 <= 255n)) { + __compactRuntime.typeError('Contract state constructor', + 'argument 3 (argument 4 as invoked from Typescript)', + 'shielded-night.compact line 111 char 1', + 'Uint<0..256>', + decimals__0) + } + const state_0 = new __compactRuntime.ContractState(); + let stateValue_0 = __compactRuntime.StateValue.newArray(); + stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull()); + stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull()); + stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull()); + stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull()); + state_0.data = new __compactRuntime.ChargedState(stateValue_0); + state_0.setOperation('name', new __compactRuntime.ContractOperation()); + state_0.setOperation('symbol', new __compactRuntime.ContractOperation()); + state_0.setOperation('decimals', new __compactRuntime.ContractOperation()); + state_0.setOperation('tokenColor', new __compactRuntime.ContractOperation()); + state_0.setOperation('depositUnshielded', new __compactRuntime.ContractOperation()); + state_0.setOperation('depositShielded', new __compactRuntime.ContractOperation()); + state_0.setOperation('withdrawUnshielded', new __compactRuntime.ContractOperation()); + state_0.setOperation('withdrawShielded', new __compactRuntime.ContractOperation()); + state_0.setOperation('getBalance', new __compactRuntime.ContractOperation()); + state_0.setOperation('convertToShielded', new __compactRuntime.ContractOperation()); + state_0.setOperation('convertToUnshielded', new __compactRuntime.ContractOperation()); + const context = __compactRuntime.createCircuitContext('constructor', __compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState); + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newMap( + new __compactRuntime.StateMap() + ).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_10.toValue(''), + alignment: _descriptor_10.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_10.toValue(''), + alignment: _descriptor_10.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(3n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_10.toValue(name__0), + alignment: _descriptor_10.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_10.toValue(symbol__0), + alignment: _descriptor_10.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(3n), + alignment: _descriptor_9.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(decimals__0), + alignment: _descriptor_9.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }]); + state_0.data = new __compactRuntime.ChargedState(context.callContext.currentQueryContext.state.state); + return { + currentContractState: state_0, + currentPrivateState: context.callContext.currentPrivateState, + currentZswapLocalState: context.callContext.currentZswapLocalState + } + } + _some_0(value_0) { return { is_some: true, value: value_0 }; } + _none_0() { + return { is_some: false, + value: + { nonce: new Uint8Array(32), color: new Uint8Array(32), value: 0n } }; + } + _left_0(value_0) { + return { is_left: true, left: value_0, right: { bytes: new Uint8Array(32) } }; + } + _left_1(value_0) { + return { is_left: true, left: value_0, right: new Uint8Array(32) }; + } + _right_0(value_0) { + return { is_left: false, left: { bytes: new Uint8Array(32) }, right: value_0 }; + } + _nativeToken_0() { + return new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + } + _tokenType_0(domain_sep_0, contractAddress_0) { + return this._persistentCommit_0([domain_sep_0, contractAddress_0.bytes], + new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 100, 101, 114, 105, 118, 101, 95, 116, 111, 107, 101, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); + } + async _mintShieldedToken_0(context, + partialProofData, + domain_sep_0, + value_0, + nonce_0, + recipient_0) + { + const coin_0 = { nonce: nonce_0, + color: + this._tokenType_0(domain_sep_0, + _descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value)), + value: value_0 }; + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(4n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(domain_sep_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { dup: { n: 1 } }, + { dup: { n: 1 } }, + 'member', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(value_0), + alignment: _descriptor_0.alignment() }).encode() } }, + { swap: { n: 0 } }, + 'neg', + { branch: { skip: 4 } }, + { dup: { n: 2 } }, + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ { tag: 'stack' }] } }, + 'add', + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + this._createZswapOutput_0(context, partialProofData, coin_0, recipient_0); + const cm_0 = this._coinCommitment_0(coin_0, recipient_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(cm_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + if (!recipient_0.is_left + && + this._equal_0(recipient_0.right.bytes, + _descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value).bytes)) + { + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(cm_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + } + return coin_0; + } + _shieldedBurnAddress_0() { + return this._left_0({ bytes: new Uint8Array(32) }); + } + async _receiveShielded_0(context, partialProofData, coin_0) { + const recipient_0 = this._right_0(_descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value)); + this._createZswapOutput_0(context, partialProofData, coin_0, recipient_0); + const tmp_0 = this._coinCommitment_0(coin_0, recipient_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(tmp_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + return []; + } + async _sendShielded_0(context, partialProofData, input_0, recipient_0, value_0) + { + const selfAddr_0 = _descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value); + this._createZswapInput_0(context, partialProofData, input_0); + const tmp_0 = this._coinNullifier_0(this._downcastQualifiedCoin_0(input_0), + selfAddr_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(tmp_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + let t_0; + const change_0 = (t_0 = input_0.value, + (__compactRuntime.assert(t_0 >= value_0, + 'result of subtraction would be negative'), + t_0 - value_0)); + const output_0 = { nonce: + this._upgradeFromTransient_0(this._transientHash_0([__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n, + 28, + new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101]), + 'Field', + ''), + this._degradeToTransient_0(input_0.nonce)])), + color: input_0.color, + value: value_0 }; + this._createZswapOutput_0(context, partialProofData, output_0, recipient_0); + const tmp_1 = this._coinCommitment_0(output_0, recipient_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(tmp_1), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + if (!recipient_0.is_left + && + this._equal_1(recipient_0.right.bytes, selfAddr_0.bytes)) + { + const tmp_2 = this._coinCommitment_0(output_0, recipient_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(tmp_2), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + } + if (change_0 === 0n) { + return { change: this._none_0(), sent: output_0 }; + } else { + const changeCoin_0 = { nonce: + this._upgradeFromTransient_0(this._transientHash_0([__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n, + 30, + new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101, 47, 50]), + 'Field', + ''), + this._degradeToTransient_0(input_0.nonce)])), + color: input_0.color, + value: change_0 }; + this._createZswapOutput_0(context, + partialProofData, + changeCoin_0, + this._right_0(selfAddr_0)); + const cm_0 = this._coinCommitment_0(changeCoin_0, + this._right_0(selfAddr_0)); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(cm_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(cm_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newNull().encode() } }, + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + return { change: this._some_0(changeCoin_0), sent: output_0 }; + } + } + async _sendImmediateShielded_0(context, + partialProofData, + input_0, + target_0, + value_0) + { + return await this._sendShielded_0(context, + partialProofData, + this._upcastQualifiedCoin_0(input_0), + target_0, + value_0); + } + _downcastQualifiedCoin_0(coin_0) { + return { nonce: coin_0.nonce, color: coin_0.color, value: coin_0.value }; + } + _upcastQualifiedCoin_0(coin_0) { + return { nonce: coin_0.nonce, + color: coin_0.color, + value: coin_0.value, + mt_index: 0n }; + } + _coinCommitment_0(coin_0, recipient_0) { + return this._persistentHash_1({ domain_sep: + new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 122, 115, 119, 97, 112, 45, 99, 99, 91, 118, 49, 93]), + info: coin_0, + dataType: recipient_0.is_left, + data: + recipient_0.is_left ? + recipient_0.left.bytes : + recipient_0.right.bytes }); + } + _coinNullifier_0(coin_0, addr_0) { + return this._persistentHash_1({ domain_sep: + new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 122, 115, 119, 97, 112, 45, 99, 110, 91, 118, 49, 93]), + info: coin_0, + dataType: false, + data: addr_0.bytes }); + } + async _sendUnshielded_0(context, + partialProofData, + color_0, + amount_0, + recipient_0) + { + const tmp_0 = this._left_1(color_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(7n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_18.toValue(tmp_0), + alignment: _descriptor_18.alignment() }).encode() } }, + { dup: { n: 1 } }, + { dup: { n: 1 } }, + 'member', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(amount_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { swap: { n: 0 } }, + 'neg', + { branch: { skip: 4 } }, + { dup: { n: 2 } }, + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ { tag: 'stack' }] } }, + 'add', + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + const tmp_1 = this._left_1(color_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(8n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell(__compactRuntime.alignedConcat( + { value: _descriptor_18.toValue(tmp_1), + alignment: _descriptor_18.alignment() }, + { value: _descriptor_8.toValue(recipient_0), + alignment: _descriptor_8.alignment() } + )).encode() } }, + { dup: { n: 1 } }, + { dup: { n: 1 } }, + 'member', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(amount_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { swap: { n: 0 } }, + 'neg', + { branch: { skip: 4 } }, + { dup: { n: 2 } }, + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ { tag: 'stack' }] } }, + 'add', + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + if (recipient_0.is_left + && + this._equal_2(recipient_0.left.bytes, + _descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value).bytes)) + { + const tmp_2 = this._left_1(color_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(6n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_18.toValue(tmp_2), + alignment: _descriptor_18.alignment() }).encode() } }, + { dup: { n: 1 } }, + { dup: { n: 1 } }, + 'member', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(amount_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { swap: { n: 0 } }, + 'neg', + { branch: { skip: 4 } }, + { dup: { n: 2 } }, + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ { tag: 'stack' }] } }, + 'add', + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + } + return []; + } + async _receiveUnshielded_0(context, partialProofData, color_0, amount_0) { + const tmp_0 = this._left_1(color_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { swap: { n: 0 } }, + { idx: { cached: true, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(6n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_18.toValue(tmp_0), + alignment: _descriptor_18.alignment() }).encode() } }, + { dup: { n: 1 } }, + { dup: { n: 1 } }, + 'member', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(amount_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { swap: { n: 0 } }, + 'neg', + { branch: { skip: 4 } }, + { dup: { n: 2 } }, + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ { tag: 'stack' }] } }, + 'add', + { ins: { cached: true, n: 2 } }, + { swap: { n: 0 } }]); + return []; + } + _transientHash_0(value_0) { + const result_0 = __compactRuntime.transientHash(_descriptor_17, value_0); + return result_0; + } + _persistentHash_0(value_0) { + const result_0 = __compactRuntime.persistentHash(_descriptor_16, value_0); + return result_0; + } + _persistentHash_1(value_0) { + const result_0 = __compactRuntime.persistentHash(_descriptor_15, value_0); + return result_0; + } + _persistentCommit_0(value_0, rand_0) { + const result_0 = __compactRuntime.persistentCommit(_descriptor_16, + value_0, + rand_0); + return result_0; + } + _degradeToTransient_0(x_0) { + const result_0 = __compactRuntime.degradeToTransient(x_0); + return result_0; + } + _upgradeFromTransient_0(x_0) { + const result_0 = __compactRuntime.upgradeFromTransient(x_0); + return result_0; + } + _createZswapInput_0(context, partialProofData, coin_0) { + const result_0 = __compactRuntime.createZswapInput(context, coin_0); + partialProofData.privateTranscriptOutputs.push({ + value: [], + alignment: [] + }); + return result_0; + } + _createZswapOutput_0(context, partialProofData, coin_0, recipient_0) { + const result_0 = __compactRuntime.createZswapOutput(context, + coin_0, + recipient_0); + partialProofData.privateTranscriptOutputs.push({ + value: [], + alignment: [] + }); + return result_0; + } + _wrapDomain_0() { + return new Uint8Array([115, 104, 105, 101, 108, 100, 101, 100, 45, 110, 105, 103, 104, 116, 58, 119, 114, 97, 112, 112, 101, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); + } + async _wrapColor_0(context, partialProofData) { + return this._tokenType_0(this._wrapDomain_0(), + _descriptor_6.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 2 } }, + { idx: { cached: true, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: true, + result: undefined } }]).value)); + } + async _name_0(context, partialProofData) { + return _descriptor_10.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + } + async _symbol_0(context, partialProofData) { + return _descriptor_10.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + } + async _decimals_0(context, partialProofData) { + return _descriptor_9.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(3n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + } + async _tokenColor_0(context, partialProofData) { + return await this._wrapColor_0(context, partialProofData); + } + _getBalanceKey_0(secret_0) { + return this._persistentHash_0([new Uint8Array([115, 104, 105, 101, 108, 100, 101, 100, 45, 110, 105, 103, 104, 116, 58, 98, 97, 108, 97, 110, 99, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), + secret_0]); + } + async _creditKey_0(context, partialProofData, balanceKey_0, amount_0) { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + if (!_descriptor_5.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() }).encode() } }, + 'member', + { popeq: { cached: true, + result: undefined } }]).value)) + { + const tmp_0 = 0n; + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { idx: { cached: false, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(tmp_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }, + { ins: { cached: true, n: 1 } }]); + } + const tmp_1 = ((t1) => { + if (t1 > 340282366920938463463374607431768211455n) { + throw new __compactRuntime.CompactError('shielded-night.compact line 170 char 31: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455'); + } + return t1; + })(_descriptor_3.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value) + + + amount_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { idx: { cached: false, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(tmp_1), + alignment: _descriptor_3.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }, + { ins: { cached: true, n: 1 } }]); + return []; + } + async _debitKey_0(context, partialProofData, balanceKey_0, amount_0) { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + __compactRuntime.assert(_descriptor_5.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() }).encode() } }, + 'member', + { popeq: { cached: true, + result: undefined } }]).value), + 'no balance for this secret'); + const cur_0 = _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + __compactRuntime.assert(cur_0 >= amount_0, 'insufficient pool balance'); + const tmp_0 = (__compactRuntime.assert(cur_0 >= amount_0, + 'result of subtraction would be negative'), + cur_0 - amount_0); + __compactRuntime.queryLedgerState(context, + partialProofData, + [ + { idx: { cached: false, + pushPath: true, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(balanceKey_0), + alignment: _descriptor_1.alignment() }).encode() } }, + { push: { storage: true, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_3.toValue(tmp_0), + alignment: _descriptor_3.alignment() }).encode() } }, + { ins: { cached: false, n: 1 } }, + { ins: { cached: true, n: 1 } }]); + return []; + } + async _depositUnshielded_0(context, partialProofData, secret_0, amount_0) { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + const amt_0 = amount_0; + await this._receiveUnshielded_0(context, + partialProofData, + this._nativeToken_0(), + amt_0); + await this._creditKey_0(context, + partialProofData, + this._getBalanceKey_0(secret_0), + amt_0); + return []; + } + async _depositShielded_0(context, partialProofData, secret_0, coin_0) { + const c_0 = coin_0; + let t_0; + __compactRuntime.assert((t_0 = c_0.value, t_0 > 0n), + 'coin value must be positive'); + __compactRuntime.assert(this._equal_3(c_0.color, + await this._wrapColor_0(context, + partialProofData)), + "not this contract's shielded wrapper"); + await this._receiveShielded_0(context, partialProofData, c_0); + await this._sendImmediateShielded_0(context, + partialProofData, + c_0, + this._shieldedBurnAddress_0(), + c_0.value); + await this._creditKey_0(context, + partialProofData, + this._getBalanceKey_0(secret_0), + c_0.value); + return []; + } + async _withdrawUnshielded_0(context, + partialProofData, + secret_0, + amount_0, + recipient_0) + { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + __compactRuntime.assert(recipient_0.is_left ? + !this._equal_4({ bytes: new Uint8Array(32) }, + recipient_0.left) + : + !this._equal_5({ bytes: new Uint8Array(32) }, + recipient_0.right), + 'invalid recipient'); + const _amount_0 = amount_0; + await this._debitKey_0(context, + partialProofData, + this._getBalanceKey_0(secret_0), + _amount_0); + await this._sendUnshielded_0(context, + partialProofData, + this._nativeToken_0(), + _amount_0, + recipient_0); + return []; + } + async _withdrawShielded_0(context, + partialProofData, + secret_0, + amount_0, + recipient_0, + nonce_0) + { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + __compactRuntime.assert(!this._equal_6({ bytes: new Uint8Array(32) }, + recipient_0), + 'invalid recipient'); + const _amount_0 = amount_0; + await this._debitKey_0(context, + partialProofData, + this._getBalanceKey_0(secret_0), + _amount_0); + return await this._mintShieldedToken_0(context, + partialProofData, + this._wrapDomain_0(), + _amount_0, + nonce_0, + this._left_0(recipient_0)); + } + async _getBalance_0(context, partialProofData, secret_0) { + const tmp_0 = this._getBalanceKey_0(secret_0); + return _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_1.toValue(tmp_0), + alignment: _descriptor_1.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + } + async _convertToShielded_0(context, + partialProofData, + amount_0, + recipient_0, + nonce_0) + { + __compactRuntime.assert(amount_0 > 0n, 'amount must be positive'); + __compactRuntime.assert(!this._equal_7({ bytes: new Uint8Array(32) }, + recipient_0), + 'invalid recipient'); + const amt_0 = amount_0; + await this._receiveUnshielded_0(context, + partialProofData, + this._nativeToken_0(), + amt_0); + return await this._mintShieldedToken_0(context, + partialProofData, + this._wrapDomain_0(), + amt_0, + nonce_0, + this._left_0(recipient_0)); + } + async _convertToUnshielded_0(context, partialProofData, coin_0, recipient_0) { + const c_0 = coin_0; + let t_0; + __compactRuntime.assert((t_0 = c_0.value, t_0 > 0n), + 'coin value must be positive'); + __compactRuntime.assert(this._equal_8(c_0.color, + await this._wrapColor_0(context, + partialProofData)), + "not this contract's shielded wrapper"); + __compactRuntime.assert(recipient_0.is_left ? + !this._equal_9({ bytes: new Uint8Array(32) }, + recipient_0.left) + : + !this._equal_10({ bytes: new Uint8Array(32) }, + recipient_0.right), + 'invalid recipient'); + await this._receiveShielded_0(context, partialProofData, c_0); + await this._sendUnshielded_0(context, + partialProofData, + this._nativeToken_0(), + c_0.value, + recipient_0); + return []; + } + _equal_0(x0, y0) { + if (!x0.every((x, i) => y0[i] === x)) { return false; } + return true; + } + _equal_1(x0, y0) { + if (!x0.every((x, i) => y0[i] === x)) { return false; } + return true; + } + _equal_2(x0, y0) { + if (!x0.every((x, i) => y0[i] === x)) { return false; } + return true; + } + _equal_3(x0, y0) { + if (!x0.every((x, i) => y0[i] === x)) { return false; } + return true; + } + _equal_4(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } + _equal_5(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } + _equal_6(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } + _equal_7(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } + _equal_8(x0, y0) { + if (!x0.every((x, i) => y0[i] === x)) { return false; } + return true; + } + _equal_9(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } + _equal_10(x0, y0) { + { + let x1 = x0.bytes; + let y1 = y0.bytes; + if (!x1.every((x, i) => y1[i] === x)) { return false; } + } + return true; + } +} +export function ledger(stateOrChargedState) { + const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state; + const chargedState = stateOrChargedState instanceof __compactRuntime.StateValue ? new __compactRuntime.ChargedState(stateOrChargedState) : stateOrChargedState; + const context = { + callContext: { currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() }, + costModel: __compactRuntime.CostModel.initialCostModel() + }; + const partialProofData = { + input: { value: [], alignment: [] }, + output: undefined, + publicTranscript: [], + privateTranscriptOutputs: [] + }; + return { + balances: { + isEmpty(...args_0) { + if (args_0.length !== 0) { + throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`); + } + return _descriptor_5.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + 'size', + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(0n), + alignment: _descriptor_0.alignment() }).encode() } }, + 'eq', + { popeq: { cached: true, + result: undefined } }]).value); + }, + size(...args_0) { + if (args_0.length !== 0) { + throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`); + } + return _descriptor_0.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + 'size', + { popeq: { cached: true, + result: undefined } }]).value); + }, + member(...args_0) { + if (args_0.length !== 1) { + throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`); + } + const key_0 = args_0[0]; + if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) { + __compactRuntime.typeError('member', + 'argument 1', + 'shielded-night.compact line 53 char 1', + 'Bytes<32>', + key_0) + } + return _descriptor_5.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { push: { storage: false, + value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(key_0), + alignment: _descriptor_1.alignment() }).encode() } }, + 'member', + { popeq: { cached: true, + result: undefined } }]).value); + }, + lookup(...args_0) { + if (args_0.length !== 1) { + throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`); + } + const key_0 = args_0[0]; + if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) { + __compactRuntime.typeError('lookup', + 'argument 1', + 'shielded-night.compact line 53 char 1', + 'Bytes<32>', + key_0) + } + return _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(0n), + alignment: _descriptor_9.alignment() } }] } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_1.toValue(key_0), + alignment: _descriptor_1.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + }, + [Symbol.iterator](...args_0) { + if (args_0.length !== 0) { + throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`); + } + const self_0 = state.asArray()[0]; + return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_1.fromValue(key.value), _descriptor_3.fromValue(value.value) ]; })[Symbol.iterator](); + } + }, + get _name() { + return _descriptor_10.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(1n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + }, + get _symbol() { + return _descriptor_10.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(2n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + }, + get _decimals() { + return _descriptor_9.fromValue(__compactRuntime.queryLedgerState(context, + partialProofData, + [ + { dup: { n: 0 } }, + { idx: { cached: false, + pushPath: false, + path: [ + { tag: 'value', + value: { value: _descriptor_9.toValue(3n), + alignment: _descriptor_9.alignment() } }] } }, + { popeq: { cached: false, + result: undefined } }]).value); + } + }; +} +const _emptyContext = { + callContext: { currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() } +}; +const _dummyContract = new Contract({ }); +export const pureCircuits = {}; +export const contractReferenceLocations = + { tag: 'publicLedgerArray', indices: { } }; +export const expectedVk = { + 'convertToShielded': 'ceb794f4a07d5d0f4a200a364cc6334f6b3a8f08fa5a37ba3c99edac4da968eb', + 'convertToUnshielded': '527e93c8b02cc14d86c625834d874556183d5e45ea615338bbe4966fb503eb4d', + 'decimals': '95a209a810ddd347aa984bb6c6a5c57ba66ef29b4221f1fafd3f04e1fa4fdec9', + 'depositShielded': '50ec1aa10bc46a20ecfdaae1fb3354cff6c33dc61fa5c97b3e49e87878cba46c', + 'depositUnshielded': '72e482e604354b866f7cab1852144c091d06bd913e9a5bd8979046275d88fdc2', + 'getBalance': '7981e85490a0d425652636da8c3b5aa9a3d998ce72ef04c16d3524dba08416bf', + 'name': 'b36a8137f9cb7bce5546e12d5194c5e72a8caa1b11441c35a0f2379246e04387', + 'symbol': '21005ce77566c9a7f5fed12b07c79796abd19b6d6afbc6553ae6aeb9e908b6d9', + 'tokenColor': '904cecd3fab66d4f598eee1d90709771e735695cff5344c71cf8afc31a319b5d', + 'withdrawShielded': '71019ebd128964628325541c6a14db941c2dbf024689525132a1e13dff457b42', + 'withdrawUnshielded': 'b04e3748e1b1146648f490531eabf874f6fa8bb1331680c458b234125a590a37', +}; + +//# sourceMappingURL=index.js.map diff --git a/contracts/v2/managed/contract/index.js.map b/contracts/v2/managed/contract/index.js.map new file mode 100644 index 0000000..fcda020 --- /dev/null +++ b/contracts/v2/managed/contract/index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "file": "index.js", + "sourceRoot": "../../../../", + "sources": ["contracts/v2/shielded-night.compact", "compiler/standard-library.compact", "compiler/zkir-v3-library.compact"], + "names": [], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8GA;;;;;;;;;;MAUA,AAAA,IAAyD;;;;;;;;;;;;;;;;;;;;;;;OAAA;MAMzD,AAAA,MAA6D;;;;;;;;;;;;;;;;;;;;;;;OAAA;MAM7D,AAAA,QAAwD;;;;;;;;;;;;;;;;;;;;;;;OAAA;MAMxD,AAAA,UAA8D;;;;;;;;;;;;;;;;;;;;;;;OAAA;MAoE9D,AAAA,iBAKC;;;;;cALgC,QAAiB;cAAE,QAAgB;;;;;;;;;;;;;;;;;;;;;;;;;yCAAnC,QAAiB,+BAAE,QAAgB;;;;;;;;;yDAAnC,QAAiB;yDAAE,QAAgB;;;;OAKnE;MAyBD,AAAA,eAUC;;;;;cATC,QAAiB;cACjB,MAAsB;;;;;;;;;;;;;;;;;;;;;;;;;yCADtB,QAAiB,+BACjB,MAAsB;;;;;;;;;uDADtB,QAAiB;uDACjB,MAAsB;;;;OAQvB;MAsBD,AAAA,kBAiBC;;;;;cAhBC,QAAiB;cACjB,QAAgB;cAChB,WAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAF/C,QAAiB,+BACjB,QAAgB,+BAChB,WAA+C;;;;;;;;;0DAF/C,QAAiB;0DACjB,QAAgB;0DAChB,WAA+C;;;;OAchD;MA+BD,AAAA,gBAmBC;;;;;cAlBC,QAAiB;cACjB,QAAgB;cAChB,WAA6B;cAC7B,OAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAHhB,QAAiB,+BACjB,QAAgB,+BAChB,WAA6B,+BAC7B,OAAgB;;;;;;;;;wDAHhB,QAAiB;wDACjB,QAAgB;wDAChB,WAA6B;wDAC7B,OAAgB;;;;OAejB;MAQD,AAAA,UAEC;;;;;cAFyB,QAAiB;;;;;;;;;;;;;;;;;;yCAAjB,QAAiB;;;;;;;;;kDAAjB,QAAiB;;;;OAE1C;MAwBD,AAAA,iBAeC;;;;;cAdC,QAAgB;cAChB,WAA6B;cAC7B,OAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAFhB,QAAgB,+BAChB,WAA6B,+BAC7B,OAAgB;;;;;;;;;yDAFhB,QAAgB;yDAChB,WAA6B;yDAC7B,OAAgB;;;;OAYjB;MAoBD,AAAA,mBAeC;;;;;cAdC,MAAsB;cACtB,WAA+C;;;;;;;;;;;;;;;;;;;;;;;;;yCAD/C,MAAsB,+BACtB,WAA+C;;;;;;;;;2DAD/C,MAAsB;2DACtB,WAA+C;;;;OAahD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAjTA;EAJD;;;;;UAAY,OAAuB;UAAE,SAAyB;UAAE,WAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA1DlF;;;;;;;;;;yEAAkD;IAWlD;;;;;;;;;yEAA6C;IAM7C;;;;;;;;;yEAA+C;IAM/C;;;;;;;;;yEAAwC;IAoCtC;;;;;;;4HAAiB,OAAK;;yEAAjB;IACL;;;;;;;4HAAmB,SAAO;;yEAAnB;IACP;;;;;;;2HAAqB,WAAS;;yEAArB;;;;;;;GACV;EC3FD,AAAA,QAAuB,0CACkB;EAGzC,AAAA;;;;;EAUA,AAAA,QAA0B;kCACkB;;EAD5C,AAAA,QAA0B;kCACkB;;EAG5C,AAAA,SAA2B;yEACqC;;EAsEhE,AAAA;;;EAKA,AAAA,aAAyB,cAAuB;qCACC,cAAY;;;EAG7D,AAAA;;6BACE;6BACA;6BACA;6BACA;;UAEM,kBAAiC;;yCAAwB;iEAAY;;;;;;;;;;;;4BAAuB;IAClG;;;;;;;;;;;2HAAoB;;;;;;2HAAY;;;;;;;;;;;;;yDACd,QAAM;UAClB,8BAAoB,QAAM;IAChC;;;;;;;;;;;2HAA2B;;;;;;SAEtB;;sBAAqB;8CAAyB;;;;;;;;;;;;;MACjD;;;;;;;;;;;6HAA6B;;;;;;;WAExB;;EAWT,AAAA;;;EAIA,AAAA,oDAA+B;UACvB,oDAAuD;;;;;;;;;;;;yDAC3C,QAAM;UACxB,+BAA4C,QAAM;IAAlD;;;;;;;;;;;2HAAA;;;;;;;;EAGF,AAAA,iDACE,SACA,aACA;;UAEM,qCAAW;;;;;;;;;;;;wDACA;UACjB,4DAA+D;wCAAQ;IAAvE;;;;;;;;;;;2HAAA;;;;;;QACe;UAAT,kBAAS;+CAAA,OAAc;;uBAAd,MAAc;UACvB;;;;;;wGACoI;8BAClH;8BACA;yDAEN,UAAQ;UAC1B,+BAA0C,UAAQ;IAAlD;;;;;;;;;;;2HAAA;;;;;;SAGK;;sBAAqB,yBAAyB;;YACjD,+BAA4C,UAAQ;MAApD;;;;;;;;;;;6HAAA;;;;;;;QAGE;6CACiE;;YAE7D;;;;;;8GAC0I;oCACpH;oCACA;;;gCAEV;8CAAuD;YACnE,8BAAoB;wDAAuD;MACjF;;;;;;;;;;;6HAA2B;;;;;;MAC3B;;;;;;;;;;;6HAA6B;;;;;;oCAC6B,qBAAmB;;;EAIjF,AAAA;;iCACE;iCACA;iCACA;;;;kEAEwC;sCAAQ;sCAAQ;;EAgC1D,AAAA,yBAA8B;oBACI,qBAAmB,qBAAmB;;EAGxE,AAAA,uBAA4B;oBACe;oBAAmB;oBAAmB;;;EAWjF,AAAA,kBACE,QACA;;;0CAKU;8CACI;;sCACJ;sCAAoB;sCAAuB;;EAIvD,AAAA,iBACE,QACA;;;0CAKU;;0CAEA;;EAwCZ,AAAA;;0BAA8B;0BAAkB;0BAAmB;;UACjE,qBAAuD;IAAvD;;;;;;;;;;;4HAAA;;;;;;2HAA+D;;;;;;;;;;;;;UAC/D,qBAA2D;IAA3D;;;;;;;;;;;;8HAAA;;6HAAmE;;;;;;;2HAAW;;;;;;;;;;;;;QAE1E;;sBAAqB;8CAAwB;;;;;;;;;;;;;YAC/C,qBAAsD;MAAtD;;;;;;;;;;;8HAAA;;;;;;6HAA8D;;;;;;;;;;;;;;;;EAIlE,AAAA,sDAAiC,SAAkB;UACjD,qBAAsD;IAAtD;;;;;;;;;;;4HAAA;;;;;;2HAA8D;;;;;;;;;;;;;;;EChUhE,AAAA,iBAAA;oEAAA;;;EAAA,AAAA,kBAAA;qEAAA;;;EAAA,AAAA,kBAAA;qEAAA;;;EAAA,AAAA,oBAAA,SAAA;;uDAAA;uDAAA;;;EAAA,AAAA,sBAAA;yDAAA;;;EAAA,AAAA,wBAAA;2DAAA;;;EAAA,AAAA,+CAAA;gEAAA;;;;;;;EAAA,AAAA,gDAAA,QAAA;;wDAAA;wDAAA;;;;;;;EFiFA,AAAA,aAEC;;GAAA;EAaD,AAAA,kBAEC;;qDADgC;;;;;;;;;;;0HAAM;GACtC;EAsBD,AAAA,aAAyD;oCAAR;;;;;;;;;;;yGAAK;GAAG;EAMzD,AAAA,eAA6D;oCAAV;;;;;;;;;;;yGAAO;GAAG;EAM7D,AAAA,iBAAwD;mCAAZ;;;;;;;;;;;wGAAS;GAAG;EAMxD,AAAA,mBAA8D;;GAAA;EAY9D,AAAA,gBAEC,CAFqB,QAAiB;;mCACoD,QAAM;GAChG;EAYD,AAAA,kBAMC,4BANiB,YAAqB,EAAE,QAAiB;4BACjD,QAAM;iCACR;;;;;;;;;;;wJAAgB,YAAU;;;;sGAAlB;;YACX,KAAQ;MAAR;;;;;;;;;;6HAAgB,YAAU;;;6HAA1B,KAAQ;;;0EAAA;;UAEV,KAAQ;;;;;6CAAqB;;;;;;;;;;;;;;wIAAgB,YAAU;;;kHAAlB;;qBAAsB,QAAM;IAAjE;;;;;;;;;;2HAAgB,YAAU;;;2HAA1B,KAAQ;;;wEAAA;;GACT;EAcD,AAAA,iBAMC,4BANgB,YAAqB,EAAE,QAAiB;4BAChD,QAAM;oDACN;;;;;;;;;;;2KAAgB,YAAU;;;;yHAAlB;;UACT,KAAiC,2BAA3B;;;;;;;;;;;;;;qIAAgB,YAAU;;;+GAAlB;4BACb,KAAG,IAAI,QAAM;UACpB,KAAQ,4BAAqB,KAAG,IAAG,QAAM;;mBAAZ,KAAG,GAAG,QAAM;IAAzC;;;;;;;;;;2HAAgB,YAAU;;;2HAA1B,KAAQ;;;wEAAA;;GACT;EAgBD,AAAA,0BAKC,4BALgC,QAAiB,EAAE,QAAgB;4BAC3D,QAAM;UACP,KAAmC,GAApB,QAAM;;;;oCACM,KAAG;;;kDACZ,QAAM;4BAAG,KAAG;;GACrC;EAyBD,AAAA,wBAUC,4BATC,QAAiB,EACjB,MAAsB;UAEhB,GAAkB,GAAL,MAAI;QAChB,GAAW;mCAAX,GAAC,QAAD,GAAW;;0CACX,GAAC;;;;6DACQ,GAAC;;;wCACK,GAAC;;wCAAyB,GAAC;;;kDACzB,QAAM;4BAAG,GAAC;;GACnC;EAsBD,AAAA,2BAiBC;;8BAhBC,QAAiB;8BACjB,QAAgB;8BAChB,WAA+C;;4BAExC,QAAM;4BAIX,WAAS;;2CACyB,WAAS;;;2CACb,WAAS;;UAGnC,SAAuC,GAApB,QAAM;;;iDACR,QAAM;2BAAG,SAAO;;;;iCACT,SAAO;iCAAW,WAAS;;GAC1D;EA+BD,AAAA,yBAmBC;;4BAlBC,QAAiB;4BACjB,QAAgB;4BAChB,WAA6B;4BAC7B,OAAgB;;4BAET,QAAM;;2CAI2B,WAAS;;UAC3C,SAA0B,GAAP,QAAM;;;iDACR,QAAM;2BAAG,SAAO;;;;2CAGrC,SAAO;2CACE,OAAK;wDACqC,WAAS;GAE/D;EAQD,AAAA,mBAEC,4BAFyB,QAAiB;UAClC,KAAQ,yBAAsB,QAAM;mCAApC;;;;;;;;;;;;;;8HAAA,KAAQ;;;wGAAA;GAChB;EAwBD,AAAA,0BAeC;;6BAdC,QAAgB;6BAChB,WAA6B;6BAC7B,OAAgB;;4BAET,QAAM;;2CAC2B,WAAS;;UAC3C,KAAsB,GAAP,QAAM;;;;oCACM,KAAG;;;;2CAGlC,KAAG;2CACM,OAAK;wDACqC,WAAS;GAE/D;EAoBD,AAAA,4BAeC,4BAdC,MAAsB,EACtB,WAA+C;UAEzC,GAAkB,GAAL,MAAI;QAChB,GAAW;mCAAX,GAAC,QAAD,GAAW;;0CACX,GAAC;;;;4BAEN,WAAS;;2CACyB,WAAS;;;4CACb,WAAS;;6DAGzB,GAAC;;;;iCACa,GAAC;iCAAiB,WAAS;;GAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA/WD;;;;;uCAAA;;;;;;;;;;;;;;;;4GAAkD;;;;;;uCAAlD;;;;;;;;;;;;4GAAkD;;;;;;;;;;;;;;uCAAlD;;;;;;;;;;;;;;;4GAAkD;;;;;;;;;;;;;;uCAAlD;;;;;;;;;;;;;;;;;4GAAkD;;;;;;;;;KAAA;IAWlD;sCAAA;;;;;;;;;;;2GAA6C;KAAA;IAM7C;sCAAA;;;;;;;;;;;2GAA+C;KAAA;IAM/C;qCAAA;;;;;;;;;;;0GAAwC;KAAA;;;;;;;;;;;;;;;;;;;;;;;;" +} diff --git a/contracts/v2/managed/keys/convertToShielded.prover b/contracts/v2/managed/keys/convertToShielded.prover new file mode 100644 index 0000000..fe548b1 Binary files /dev/null and b/contracts/v2/managed/keys/convertToShielded.prover differ diff --git a/contracts/v2/managed/keys/convertToShielded.verifier b/contracts/v2/managed/keys/convertToShielded.verifier new file mode 100644 index 0000000..ae12fbf Binary files /dev/null and b/contracts/v2/managed/keys/convertToShielded.verifier differ diff --git a/contracts/v2/managed/keys/convertToUnshielded.prover b/contracts/v2/managed/keys/convertToUnshielded.prover new file mode 100644 index 0000000..84ea438 Binary files /dev/null and b/contracts/v2/managed/keys/convertToUnshielded.prover differ diff --git a/contracts/v2/managed/keys/convertToUnshielded.verifier b/contracts/v2/managed/keys/convertToUnshielded.verifier new file mode 100644 index 0000000..0f5d42f Binary files /dev/null and b/contracts/v2/managed/keys/convertToUnshielded.verifier differ diff --git a/contracts/v2/managed/keys/decimals.prover b/contracts/v2/managed/keys/decimals.prover new file mode 100644 index 0000000..da0446e Binary files /dev/null and b/contracts/v2/managed/keys/decimals.prover differ diff --git a/contracts/v2/managed/keys/decimals.verifier b/contracts/v2/managed/keys/decimals.verifier new file mode 100644 index 0000000..948cc20 Binary files /dev/null and b/contracts/v2/managed/keys/decimals.verifier differ diff --git a/contracts/v2/managed/keys/depositShielded.prover b/contracts/v2/managed/keys/depositShielded.prover new file mode 100644 index 0000000..f953c49 Binary files /dev/null and b/contracts/v2/managed/keys/depositShielded.prover differ diff --git a/contracts/v2/managed/keys/depositShielded.verifier b/contracts/v2/managed/keys/depositShielded.verifier new file mode 100644 index 0000000..a8aca99 Binary files /dev/null and b/contracts/v2/managed/keys/depositShielded.verifier differ diff --git a/contracts/v2/managed/keys/depositUnshielded.prover b/contracts/v2/managed/keys/depositUnshielded.prover new file mode 100644 index 0000000..4068bd5 Binary files /dev/null and b/contracts/v2/managed/keys/depositUnshielded.prover differ diff --git a/contracts/v2/managed/keys/depositUnshielded.verifier b/contracts/v2/managed/keys/depositUnshielded.verifier new file mode 100644 index 0000000..398e817 Binary files /dev/null and b/contracts/v2/managed/keys/depositUnshielded.verifier differ diff --git a/contracts/v2/managed/keys/getBalance.prover b/contracts/v2/managed/keys/getBalance.prover new file mode 100644 index 0000000..5815b49 Binary files /dev/null and b/contracts/v2/managed/keys/getBalance.prover differ diff --git a/contracts/v2/managed/keys/getBalance.verifier b/contracts/v2/managed/keys/getBalance.verifier new file mode 100644 index 0000000..f05fba7 Binary files /dev/null and b/contracts/v2/managed/keys/getBalance.verifier differ diff --git a/contracts/v2/managed/keys/name.prover b/contracts/v2/managed/keys/name.prover new file mode 100644 index 0000000..92e42ce Binary files /dev/null and b/contracts/v2/managed/keys/name.prover differ diff --git a/contracts/v2/managed/keys/name.verifier b/contracts/v2/managed/keys/name.verifier new file mode 100644 index 0000000..a3f5cc6 Binary files /dev/null and b/contracts/v2/managed/keys/name.verifier differ diff --git a/contracts/v2/managed/keys/symbol.prover b/contracts/v2/managed/keys/symbol.prover new file mode 100644 index 0000000..b28d8a8 Binary files /dev/null and b/contracts/v2/managed/keys/symbol.prover differ diff --git a/contracts/v2/managed/keys/symbol.verifier b/contracts/v2/managed/keys/symbol.verifier new file mode 100644 index 0000000..574f902 Binary files /dev/null and b/contracts/v2/managed/keys/symbol.verifier differ diff --git a/contracts/v2/managed/keys/tokenColor.prover b/contracts/v2/managed/keys/tokenColor.prover new file mode 100644 index 0000000..42ce15d Binary files /dev/null and b/contracts/v2/managed/keys/tokenColor.prover differ diff --git a/contracts/v2/managed/keys/tokenColor.verifier b/contracts/v2/managed/keys/tokenColor.verifier new file mode 100644 index 0000000..eb63997 Binary files /dev/null and b/contracts/v2/managed/keys/tokenColor.verifier differ diff --git a/contracts/v2/managed/keys/withdrawShielded.prover b/contracts/v2/managed/keys/withdrawShielded.prover new file mode 100644 index 0000000..0f99ecd Binary files /dev/null and b/contracts/v2/managed/keys/withdrawShielded.prover differ diff --git a/contracts/v2/managed/keys/withdrawShielded.verifier b/contracts/v2/managed/keys/withdrawShielded.verifier new file mode 100644 index 0000000..8a42abc Binary files /dev/null and b/contracts/v2/managed/keys/withdrawShielded.verifier differ diff --git a/contracts/v2/managed/keys/withdrawUnshielded.prover b/contracts/v2/managed/keys/withdrawUnshielded.prover new file mode 100644 index 0000000..04b2e9c Binary files /dev/null and b/contracts/v2/managed/keys/withdrawUnshielded.prover differ diff --git a/contracts/v2/managed/keys/withdrawUnshielded.verifier b/contracts/v2/managed/keys/withdrawUnshielded.verifier new file mode 100644 index 0000000..5beb34a Binary files /dev/null and b/contracts/v2/managed/keys/withdrawUnshielded.verifier differ diff --git a/contracts/v2/managed/zkir/convertToShielded.bzkir b/contracts/v2/managed/zkir/convertToShielded.bzkir new file mode 100644 index 0000000..4759e0e Binary files /dev/null and b/contracts/v2/managed/zkir/convertToShielded.bzkir differ diff --git a/contracts/v2/managed/zkir/convertToShielded.zkir b/contracts/v2/managed/zkir/convertToShielded.zkir new file mode 100644 index 0000000..1002b38 --- /dev/null +++ b/contracts/v2/managed/zkir/convertToShielded.zkir @@ -0,0 +1,182 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 5, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 64 }, + { "op": "constrain_bits", "var": 1, "bits": 8 }, + { "op": "constrain_bits", "var": 2, "bits": 248 }, + { "op": "constrain_bits", "var": 3, "bits": 8 }, + { "op": "constrain_bits", "var": 4, "bits": 248 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 6, "b": 0, "bits": 64 }, + { "op": "assert", "cond": 7 }, + { "op": "test_eq", "a": 6, "b": 1 }, + { "op": "test_eq", "a": 6, "b": 2 }, + { "op": "cond_select", "bit": 8, "a": 9, "b": 6 }, + { "op": "cond_select", "bit": 10, "a": 6, "b": 5 }, + { "op": "assert", "cond": 11 }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "load_imm", "imm": "06" }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "pi_skip", "guard": 5, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "load_imm", "imm": "03" }, + { "op": "load_imm", "imm": "20" }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 5, "count": 11 }, + { "op": "load_imm", "imm": "31" }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "pi_skip", "guard": 5, "count": 5 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "08" }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "12" }, + { "op": "load_imm", "imm": "04" }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 5, "count": 2 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "load_imm", "imm": "-01" }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "pi_skip", "guard": 5, "count": 2 }, + { "op": "load_imm", "imm": "14" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 5, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "pi_skip", "guard": 5, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A6465726976655F746F6B656E" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A77726170706572" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [6, 31, 6, 32, 28, 29] }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 5, "count": 4 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 32 }, + { "op": "pi_skip", "guard": 5, "count": 6 }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "pi_skip", "guard": 5, "count": 5 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 5, "count": 2 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "pi_skip", "guard": 5, "count": 2 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D63635B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [35, 3, 4, 33, 34, 0, 5, 1, 2] }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "load_imm", "imm": "02" }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 38 }, + { "op": "pi_skip", "guard": 5, "count": 4 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "declare_pub_input", "var": 37 }, + { "op": "pi_skip", "guard": 5, "count": 6 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 5, "count": 2 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "output", "var": 3 }, + { "op": "output", "var": 4 }, + { "op": "output", "var": 33 }, + { "op": "output", "var": 34 }, + { "op": "output", "var": 0 } + ] +} diff --git a/contracts/v2/managed/zkir/convertToUnshielded.bzkir b/contracts/v2/managed/zkir/convertToUnshielded.bzkir new file mode 100644 index 0000000..ce4918b Binary files /dev/null and b/contracts/v2/managed/zkir/convertToUnshielded.bzkir differ diff --git a/contracts/v2/managed/zkir/convertToUnshielded.zkir b/contracts/v2/managed/zkir/convertToUnshielded.zkir new file mode 100644 index 0000000..554827f --- /dev/null +++ b/contracts/v2/managed/zkir/convertToUnshielded.zkir @@ -0,0 +1,324 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 10, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "constrain_bits", "var": 2, "bits": 8 }, + { "op": "constrain_bits", "var": 3, "bits": 248 }, + { "op": "constrain_bits", "var": 4, "bits": 128 }, + { "op": "constrain_to_boolean", "var": 5 }, + { "op": "constrain_bits", "var": 6, "bits": 8 }, + { "op": "constrain_bits", "var": 7, "bits": 248 }, + { "op": "constrain_bits", "var": 8, "bits": 8 }, + { "op": "constrain_bits", "var": 9, "bits": 248 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 11, "b": 4, "bits": 128 }, + { "op": "assert", "cond": 12 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "pi_skip", "guard": 10, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "20" }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "pi_skip", "guard": 10, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A6465726976655F746F6B656E" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A77726170706572" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [11, 19, 11, 20, 15, 16] }, + { "op": "test_eq", "a": 2, "b": 21 }, + { "op": "test_eq", "a": 3, "b": 22 }, + { "op": "cond_select", "bit": 23, "a": 24, "b": 11 }, + { "op": "assert", "cond": 25 }, + { "op": "test_eq", "a": 11, "b": 6 }, + { "op": "test_eq", "a": 11, "b": 7 }, + { "op": "cond_select", "bit": 26, "a": 27, "b": 11 }, + { "op": "cond_select", "bit": 28, "a": 11, "b": 10 }, + { "op": "test_eq", "a": 11, "b": 8 }, + { "op": "test_eq", "a": 11, "b": 9 }, + { "op": "cond_select", "bit": 30, "a": 31, "b": 11 }, + { "op": "cond_select", "bit": 32, "a": 11, "b": 10 }, + { "op": "cond_select", "bit": 5, "a": 29, "b": 33 }, + { "op": "assert", "cond": 34 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "pi_skip", "guard": 10, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "pi_skip", "guard": 10, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D63635B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [37, 0, 1, 2, 3, 4, 11, 35, 36] }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "pi_skip", "guard": 10, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 38 }, + { "op": "declare_pub_input", "var": 39 }, + { "op": "pi_skip", "guard": 10, "count": 6 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "pi_skip", "guard": 10, "count": 2 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "07" }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "pi_skip", "guard": 10, "count": 4 }, + { "op": "load_imm", "imm": "03" }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "pi_skip", "guard": 10, "count": 11 }, + { "op": "load_imm", "imm": "31" }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 10, "count": 5 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "08" }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "12" }, + { "op": "load_imm", "imm": "04" }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "pi_skip", "guard": 10, "count": 2 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "load_imm", "imm": "-01" }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 10, "count": 2 }, + { "op": "load_imm", "imm": "14" }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 10, "count": 4 }, + { "op": "load_imm", "imm": "06" }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 53 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "pi_skip", "guard": 10, "count": 19 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 10, "count": 5 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "pi_skip", "guard": 10, "count": 2 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 10, "count": 2 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 10, "count": 1 }, + { "op": "cond_select", "bit": 5, "a": 13, "b": 11 }, + { "op": "declare_pub_input", "var": 54 }, + { "op": "pi_skip", "guard": 5, "count": 1 }, + { "op": "cond_select", "bit": 5, "a": 14, "b": 11 }, + { "op": "declare_pub_input", "var": 55 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "cond_select", "bit": 5, "a": 11, "b": 11 }, + { "op": "declare_pub_input", "var": 56 }, + { "op": "pi_skip", "guard": 5, "count": 4 }, + { "op": "public_input", "guard": 5 }, + { "op": "public_input", "guard": 5 }, + { "op": "cond_select", "bit": 5, "a": 18, "b": 11 }, + { "op": "declare_pub_input", "var": 59 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "cond_select", "bit": 5, "a": 17, "b": 11 }, + { "op": "declare_pub_input", "var": 60 }, + { "op": "cond_select", "bit": 5, "a": 57, "b": 11 }, + { "op": "declare_pub_input", "var": 61 }, + { "op": "cond_select", "bit": 5, "a": 58, "b": 11 }, + { "op": "declare_pub_input", "var": 62 }, + { "op": "pi_skip", "guard": 5, "count": 5 }, + { "op": "test_eq", "a": 6, "b": 57 }, + { "op": "test_eq", "a": 7, "b": 58 }, + { "op": "cond_select", "bit": 63, "a": 64, "b": 11 }, + { "op": "cond_select", "bit": 5, "a": 65, "b": 11 }, + { "op": "cond_select", "bit": 66, "a": 40, "b": 11 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 41, "b": 11 }, + { "op": "declare_pub_input", "var": 68 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "cond_select", "bit": 66, "a": 53, "b": 11 }, + { "op": "declare_pub_input", "var": 69 }, + { "op": "pi_skip", "guard": 66, "count": 4 }, + { "op": "cond_select", "bit": 66, "a": 42, "b": 11 }, + { "op": "declare_pub_input", "var": 70 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "cond_select", "bit": 66, "a": 45, "b": 11 }, + { "op": "declare_pub_input", "var": 71 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "cond_select", "bit": 66, "a": 17, "b": 11 }, + { "op": "declare_pub_input", "var": 72 }, + { "op": "cond_select", "bit": 66, "a": 17, "b": 11 }, + { "op": "declare_pub_input", "var": 73 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "cond_select", "bit": 66, "a": 11, "b": 11 }, + { "op": "declare_pub_input", "var": 74 }, + { "op": "cond_select", "bit": 66, "a": 11, "b": 11 }, + { "op": "declare_pub_input", "var": 75 }, + { "op": "cond_select", "bit": 66, "a": 11, "b": 11 }, + { "op": "declare_pub_input", "var": 76 }, + { "op": "cond_select", "bit": 66, "a": 11, "b": 11 }, + { "op": "declare_pub_input", "var": 77 }, + { "op": "pi_skip", "guard": 66, "count": 11 }, + { "op": "cond_select", "bit": 66, "a": 46, "b": 11 }, + { "op": "declare_pub_input", "var": 78 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 46, "b": 11 }, + { "op": "declare_pub_input", "var": 79 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 47, "b": 11 }, + { "op": "declare_pub_input", "var": 80 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 42, "b": 11 }, + { "op": "declare_pub_input", "var": 81 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "cond_select", "bit": 66, "a": 42, "b": 11 }, + { "op": "declare_pub_input", "var": 82 }, + { "op": "cond_select", "bit": 66, "a": 4, "b": 11 }, + { "op": "declare_pub_input", "var": 83 }, + { "op": "pi_skip", "guard": 66, "count": 5 }, + { "op": "cond_select", "bit": 66, "a": 40, "b": 11 }, + { "op": "declare_pub_input", "var": 84 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 48, "b": 11 }, + { "op": "declare_pub_input", "var": 85 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 49, "b": 11 }, + { "op": "declare_pub_input", "var": 86 }, + { "op": "cond_select", "bit": 66, "a": 50, "b": 11 }, + { "op": "declare_pub_input", "var": 87 }, + { "op": "pi_skip", "guard": 66, "count": 2 }, + { "op": "cond_select", "bit": 66, "a": 13, "b": 11 }, + { "op": "declare_pub_input", "var": 88 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 13, "b": 11 }, + { "op": "declare_pub_input", "var": 89 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 14, "b": 11 }, + { "op": "declare_pub_input", "var": 90 }, + { "op": "cond_select", "bit": 66, "a": 51, "b": 11 }, + { "op": "declare_pub_input", "var": 91 }, + { "op": "pi_skip", "guard": 66, "count": 2 }, + { "op": "cond_select", "bit": 66, "a": 52, "b": 11 }, + { "op": "declare_pub_input", "var": 92 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 43, "b": 11 }, + { "op": "declare_pub_input", "var": 93 }, + { "op": "pi_skip", "guard": 66, "count": 1 }, + { "op": "cond_select", "bit": 66, "a": 40, "b": 11 }, + { "op": "declare_pub_input", "var": 94 }, + { "op": "pi_skip", "guard": 66, "count": 1 } + ] +} diff --git a/contracts/v2/managed/zkir/decimals.bzkir b/contracts/v2/managed/zkir/decimals.bzkir new file mode 100644 index 0000000..d2ab6a5 Binary files /dev/null and b/contracts/v2/managed/zkir/decimals.bzkir differ diff --git a/contracts/v2/managed/zkir/decimals.zkir b/contracts/v2/managed/zkir/decimals.zkir new file mode 100644 index 0000000..ef4c958 --- /dev/null +++ b/contracts/v2/managed/zkir/decimals.zkir @@ -0,0 +1,26 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 0, + "instructions": [ + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 1 }, + { "op": "pi_skip", "guard": 0, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "load_imm", "imm": "03" }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "output", "var": 4 } + ] +} diff --git a/contracts/v2/managed/zkir/depositShielded.bzkir b/contracts/v2/managed/zkir/depositShielded.bzkir new file mode 100644 index 0000000..7ab23ab Binary files /dev/null and b/contracts/v2/managed/zkir/depositShielded.bzkir differ diff --git a/contracts/v2/managed/zkir/depositShielded.zkir b/contracts/v2/managed/zkir/depositShielded.zkir new file mode 100644 index 0000000..f495220 --- /dev/null +++ b/contracts/v2/managed/zkir/depositShielded.zkir @@ -0,0 +1,261 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 7, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "constrain_bits", "var": 2, "bits": 8 }, + { "op": "constrain_bits", "var": 3, "bits": 248 }, + { "op": "constrain_bits", "var": 4, "bits": 8 }, + { "op": "constrain_bits", "var": 5, "bits": 248 }, + { "op": "constrain_bits", "var": 6, "bits": 128 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 8, "b": 6, "bits": 128 }, + { "op": "assert", "cond": 9 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "20" }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A6465726976655F746F6B656E" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A77726170706572" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [8, 16, 8, 17, 12, 13] }, + { "op": "test_eq", "a": 4, "b": 18 }, + { "op": "test_eq", "a": 5, "b": 19 }, + { "op": "cond_select", "bit": 20, "a": 21, "b": 8 }, + { "op": "assert", "cond": 22 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D63635B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [25, 2, 3, 4, 5, 6, 8, 23, 24] }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 32 }, + { "op": "declare_pub_input", "var": 33 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D636E5B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [34, 2, 3, 4, 5, 6, 8, 32, 33] }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "6D69646E696768743A6B65726E656C3A6E6F6E63655F65766F6C7665" }, + { "op": "transient_hash", "inputs": [37, 3] }, + { "op": "div_mod_power_of_two", "var": 38, "bits": 248 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D63635B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [41, 8, 40, 4, 5, 6, 7, 8, 8] }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "02" }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A62616C616E6365" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [8, 45, 0, 1] }, + { "op": "assert", "cond": 9 }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "public_input", "guard": null }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "cond_select", "bit": 51, "a": 8, "b": 7 }, + { "op": "load_imm", "imm": "70" }, + { "op": "cond_select", "bit": 52, "a": 53, "b": 8 }, + { "op": "declare_pub_input", "var": 54 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "cond_select", "bit": 52, "a": 8, "b": 8 }, + { "op": "declare_pub_input", "var": 55 }, + { "op": "pi_skip", "guard": 52, "count": 4 }, + { "op": "cond_select", "bit": 52, "a": 30, "b": 8 }, + { "op": "declare_pub_input", "var": 56 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "cond_select", "bit": 52, "a": 14, "b": 8 }, + { "op": "declare_pub_input", "var": 57 }, + { "op": "cond_select", "bit": 52, "a": 46, "b": 8 }, + { "op": "declare_pub_input", "var": 58 }, + { "op": "cond_select", "bit": 52, "a": 47, "b": 8 }, + { "op": "declare_pub_input", "var": 59 }, + { "op": "pi_skip", "guard": 52, "count": 6 }, + { "op": "load_imm", "imm": "11" }, + { "op": "cond_select", "bit": 52, "a": 60, "b": 8 }, + { "op": "declare_pub_input", "var": 61 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "cond_select", "bit": 52, "a": 30, "b": 8 }, + { "op": "declare_pub_input", "var": 62 }, + { "op": "cond_select", "bit": 52, "a": 8, "b": 8 }, + { "op": "declare_pub_input", "var": 63 }, + { "op": "pi_skip", "guard": 52, "count": 5 }, + { "op": "load_imm", "imm": "91" }, + { "op": "cond_select", "bit": 52, "a": 64, "b": 8 }, + { "op": "declare_pub_input", "var": 65 }, + { "op": "pi_skip", "guard": 52, "count": 1 }, + { "op": "load_imm", "imm": "A1" }, + { "op": "cond_select", "bit": 52, "a": 66, "b": 8 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "pi_skip", "guard": 52, "count": 1 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 69 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 68 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "add", "a": 68, "b": 6 }, + { "op": "constrain_bits", "var": 70, "bits": 128 }, + { "op": "declare_pub_input", "var": 53 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "declare_pub_input", "var": 60 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 70 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "declare_pub_input", "var": 64 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 66 }, + { "op": "pi_skip", "guard": 7, "count": 1 } + ] +} diff --git a/contracts/v2/managed/zkir/depositUnshielded.bzkir b/contracts/v2/managed/zkir/depositUnshielded.bzkir new file mode 100644 index 0000000..209b988 Binary files /dev/null and b/contracts/v2/managed/zkir/depositUnshielded.bzkir differ diff --git a/contracts/v2/managed/zkir/depositUnshielded.zkir b/contracts/v2/managed/zkir/depositUnshielded.zkir new file mode 100644 index 0000000..cb50860 --- /dev/null +++ b/contracts/v2/managed/zkir/depositUnshielded.zkir @@ -0,0 +1,192 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 3, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "constrain_bits", "var": 2, "bits": 64 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 4, "b": 2, "bits": 64 }, + { "op": "assert", "cond": 5 }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "load_imm", "imm": "06" }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "load_imm", "imm": "03" }, + { "op": "load_imm", "imm": "20" }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 3, "count": 11 }, + { "op": "load_imm", "imm": "31" }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "pi_skip", "guard": 3, "count": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "08" }, + { "op": "declare_pub_input", "var": 14 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "12" }, + { "op": "load_imm", "imm": "04" }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "pi_skip", "guard": 3, "count": 2 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 17 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "load_imm", "imm": "-01" }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "pi_skip", "guard": 3, "count": 2 }, + { "op": "load_imm", "imm": "14" }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A62616C616E6365" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [4, 22, 0, 1] }, + { "op": "less_than", "a": 4, "b": 2, "bits": 128 }, + { "op": "assert", "cond": 25 }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 3, "count": 6 }, + { "op": "declare_pub_input", "var": 13 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "cond_select", "bit": 28, "a": 4, "b": 3 }, + { "op": "load_imm", "imm": "70" }, + { "op": "cond_select", "bit": 30, "a": 31, "b": 4 }, + { "op": "declare_pub_input", "var": 32 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "cond_select", "bit": 30, "a": 4, "b": 4 }, + { "op": "declare_pub_input", "var": 33 }, + { "op": "pi_skip", "guard": 30, "count": 4 }, + { "op": "cond_select", "bit": 30, "a": 9, "b": 4 }, + { "op": "declare_pub_input", "var": 34 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "cond_select", "bit": 30, "a": 11, "b": 4 }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "cond_select", "bit": 30, "a": 23, "b": 4 }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "cond_select", "bit": 30, "a": 24, "b": 4 }, + { "op": "declare_pub_input", "var": 37 }, + { "op": "pi_skip", "guard": 30, "count": 6 }, + { "op": "load_imm", "imm": "11" }, + { "op": "cond_select", "bit": 30, "a": 38, "b": 4 }, + { "op": "declare_pub_input", "var": 39 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "cond_select", "bit": 30, "a": 9, "b": 4 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "cond_select", "bit": 30, "a": 4, "b": 4 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 30, "count": 5 }, + { "op": "load_imm", "imm": "91" }, + { "op": "cond_select", "bit": 30, "a": 42, "b": 4 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 30, "count": 1 }, + { "op": "load_imm", "imm": "A1" }, + { "op": "cond_select", "bit": 30, "a": 44, "b": 4 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 30, "count": 1 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 3, "count": 5 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "add", "a": 46, "b": 2 }, + { "op": "constrain_bits", "var": 48, "bits": 128 }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 3, "count": 6 }, + { "op": "declare_pub_input", "var": 38 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 3, "count": 5 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "pi_skip", "guard": 3, "count": 1 } + ] +} diff --git a/contracts/v2/managed/zkir/getBalance.bzkir b/contracts/v2/managed/zkir/getBalance.bzkir new file mode 100644 index 0000000..f9a3f18 Binary files /dev/null and b/contracts/v2/managed/zkir/getBalance.bzkir differ diff --git a/contracts/v2/managed/zkir/getBalance.zkir b/contracts/v2/managed/zkir/getBalance.zkir new file mode 100644 index 0000000..ad80c0b --- /dev/null +++ b/contracts/v2/managed/zkir/getBalance.zkir @@ -0,0 +1,38 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 2, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A62616C616E6365" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [3, 4, 0, 1] }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "pi_skip", "guard": 2, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "pi_skip", "guard": 2, "count": 4 }, + { "op": "load_imm", "imm": "20" }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "pi_skip", "guard": 2, "count": 5 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "10" }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 12 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 11 }, + { "op": "declare_pub_input", "var": 10 }, + { "op": "pi_skip", "guard": 2, "count": 4 }, + { "op": "output", "var": 10 } + ] +} diff --git a/contracts/v2/managed/zkir/name.bzkir b/contracts/v2/managed/zkir/name.bzkir new file mode 100644 index 0000000..a8124c6 Binary files /dev/null and b/contracts/v2/managed/zkir/name.bzkir differ diff --git a/contracts/v2/managed/zkir/name.zkir b/contracts/v2/managed/zkir/name.zkir new file mode 100644 index 0000000..a22cb2b --- /dev/null +++ b/contracts/v2/managed/zkir/name.zkir @@ -0,0 +1,26 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 0, + "instructions": [ + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 1 }, + { "op": "pi_skip", "guard": 0, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "-01" }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "output", "var": 3 } + ] +} diff --git a/contracts/v2/managed/zkir/symbol.bzkir b/contracts/v2/managed/zkir/symbol.bzkir new file mode 100644 index 0000000..80c4dd0 Binary files /dev/null and b/contracts/v2/managed/zkir/symbol.bzkir differ diff --git a/contracts/v2/managed/zkir/symbol.zkir b/contracts/v2/managed/zkir/symbol.zkir new file mode 100644 index 0000000..8999247 --- /dev/null +++ b/contracts/v2/managed/zkir/symbol.zkir @@ -0,0 +1,27 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 0, + "instructions": [ + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 1 }, + { "op": "pi_skip", "guard": 0, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "load_imm", "imm": "02" }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "-01" }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "output", "var": 4 } + ] +} diff --git a/contracts/v2/managed/zkir/tokenColor.bzkir b/contracts/v2/managed/zkir/tokenColor.bzkir new file mode 100644 index 0000000..2671cfd Binary files /dev/null and b/contracts/v2/managed/zkir/tokenColor.bzkir differ diff --git a/contracts/v2/managed/zkir/tokenColor.zkir b/contracts/v2/managed/zkir/tokenColor.zkir new file mode 100644 index 0000000..8b714af --- /dev/null +++ b/contracts/v2/managed/zkir/tokenColor.zkir @@ -0,0 +1,33 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 0, + "instructions": [ + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 1 }, + { "op": "pi_skip", "guard": 0, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "load_imm", "imm": "00" }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "pi_skip", "guard": 0, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "20" }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 0 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "pi_skip", "guard": 0, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A6465726976655F746F6B656E" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A77726170706572" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [3, 8, 3, 9, 4, 5] }, + { "op": "output", "var": 10 }, + { "op": "output", "var": 11 } + ] +} diff --git a/contracts/v2/managed/zkir/withdrawShielded.bzkir b/contracts/v2/managed/zkir/withdrawShielded.bzkir new file mode 100644 index 0000000..532a433 Binary files /dev/null and b/contracts/v2/managed/zkir/withdrawShielded.bzkir differ diff --git a/contracts/v2/managed/zkir/withdrawShielded.zkir b/contracts/v2/managed/zkir/withdrawShielded.zkir new file mode 100644 index 0000000..73a2957 --- /dev/null +++ b/contracts/v2/managed/zkir/withdrawShielded.zkir @@ -0,0 +1,212 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 7, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "constrain_bits", "var": 2, "bits": 64 }, + { "op": "constrain_bits", "var": 3, "bits": 8 }, + { "op": "constrain_bits", "var": 4, "bits": 248 }, + { "op": "constrain_bits", "var": 5, "bits": 8 }, + { "op": "constrain_bits", "var": 6, "bits": 248 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 8, "b": 2, "bits": 64 }, + { "op": "assert", "cond": 9 }, + { "op": "test_eq", "a": 8, "b": 3 }, + { "op": "test_eq", "a": 8, "b": 4 }, + { "op": "cond_select", "bit": 10, "a": 11, "b": 8 }, + { "op": "cond_select", "bit": 12, "a": 8, "b": 7 }, + { "op": "assert", "cond": 13 }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A62616C616E6365" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [8, 14, 0, 1] }, + { "op": "less_than", "a": 8, "b": 2, "bits": 128 }, + { "op": "assert", "cond": 17 }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "load_imm", "imm": "20" }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 23 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "assert", "cond": 23 }, + { "op": "declare_pub_input", "var": 18 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 19 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "less_than", "a": 25, "b": 2, "bits": 128 }, + { "op": "cond_select", "bit": 27, "a": 8, "b": 7 }, + { "op": "assert", "cond": 28 }, + { "op": "assert", "cond": 28 }, + { "op": "neg", "a": 2 }, + { "op": "add", "a": 25, "b": 29 }, + { "op": "load_imm", "imm": "70" }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 15 }, + { "op": "declare_pub_input", "var": 16 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "load_imm", "imm": "11" }, + { "op": "declare_pub_input", "var": 32 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "load_imm", "imm": "91" }, + { "op": "declare_pub_input", "var": 33 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "A1" }, + { "op": "declare_pub_input", "var": 34 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "public_input", "guard": null }, + { "op": "public_input", "guard": null }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 37 }, + { "op": "declare_pub_input", "var": 38 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "load_imm", "imm": "6D69646E696768743A6465726976655F746F6B656E" }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A77726170706572" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [8, 39, 8, 40, 37, 38] }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "load_imm", "imm": "04" }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "load_imm", "imm": "31" }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "08" }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "pi_skip", "guard": 7, "count": 5 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "12" }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 35 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "-01" }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "load_imm", "imm": "14" }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "6D69646E696768743A7A737761702D63635B76315D" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 21, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 16, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 1, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [52, 5, 6, 41, 42, 2, 7, 3, 4] }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "load_imm", "imm": "02" }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 55 }, + { "op": "pi_skip", "guard": 7, "count": 4 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 53 }, + { "op": "declare_pub_input", "var": 54 }, + { "op": "pi_skip", "guard": 7, "count": 6 }, + { "op": "declare_pub_input", "var": 20 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "pi_skip", "guard": 7, "count": 2 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 7, "count": 1 }, + { "op": "output", "var": 5 }, + { "op": "output", "var": 6 }, + { "op": "output", "var": 41 }, + { "op": "output", "var": 42 }, + { "op": "output", "var": 2 } + ] +} diff --git a/contracts/v2/managed/zkir/withdrawUnshielded.bzkir b/contracts/v2/managed/zkir/withdrawUnshielded.bzkir new file mode 100644 index 0000000..f01ff09 Binary files /dev/null and b/contracts/v2/managed/zkir/withdrawUnshielded.bzkir differ diff --git a/contracts/v2/managed/zkir/withdrawUnshielded.zkir b/contracts/v2/managed/zkir/withdrawUnshielded.zkir new file mode 100644 index 0000000..599a8e9 --- /dev/null +++ b/contracts/v2/managed/zkir/withdrawUnshielded.zkir @@ -0,0 +1,343 @@ +{ + "version": { "major": 2, "minor": 0 }, + "do_communications_commitment": true, + "num_inputs": 8, + "instructions": [ + { "op": "constrain_bits", "var": 0, "bits": 8 }, + { "op": "constrain_bits", "var": 1, "bits": 248 }, + { "op": "constrain_bits", "var": 2, "bits": 64 }, + { "op": "constrain_to_boolean", "var": 3 }, + { "op": "constrain_bits", "var": 4, "bits": 8 }, + { "op": "constrain_bits", "var": 5, "bits": 248 }, + { "op": "constrain_bits", "var": 6, "bits": 8 }, + { "op": "constrain_bits", "var": 7, "bits": 248 }, + { "op": "load_imm", "imm": "01" }, + { "op": "load_imm", "imm": "00" }, + { "op": "less_than", "a": 9, "b": 2, "bits": 64 }, + { "op": "assert", "cond": 10 }, + { "op": "test_eq", "a": 9, "b": 4 }, + { "op": "test_eq", "a": 9, "b": 5 }, + { "op": "cond_select", "bit": 11, "a": 12, "b": 9 }, + { "op": "cond_select", "bit": 13, "a": 9, "b": 8 }, + { "op": "test_eq", "a": 9, "b": 6 }, + { "op": "test_eq", "a": 9, "b": 7 }, + { "op": "cond_select", "bit": 15, "a": 16, "b": 9 }, + { "op": "cond_select", "bit": 17, "a": 9, "b": 8 }, + { "op": "cond_select", "bit": 3, "a": 14, "b": 18 }, + { "op": "assert", "cond": 19 }, + { "op": "load_imm", "imm": "736869656C6465642D6E696768743A62616C616E6365" }, + { "op": "persistent_hash", "alignment": [{ "tag": "atom", "value": { "length": 32, "tag": "bytes" } }, { "tag": "atom", "value": { "length": 32, "tag": "bytes" } }], "inputs": [9, 20, 0, 1] }, + { "op": "less_than", "a": 9, "b": 2, "bits": 128 }, + { "op": "assert", "cond": 23 }, + { "op": "load_imm", "imm": "30" }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "50" }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "load_imm", "imm": "10" }, + { "op": "load_imm", "imm": "20" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 8, "count": 6 }, + { "op": "load_imm", "imm": "18" }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0D" }, + { "op": "declare_pub_input", "var": 30 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 29 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "assert", "cond": 29 }, + { "op": "declare_pub_input", "var": 24 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "declare_pub_input", "var": 25 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 8, "count": 5 }, + { "op": "public_input", "guard": null }, + { "op": "load_imm", "imm": "0C" }, + { "op": "declare_pub_input", "var": 32 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 31 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "less_than", "a": 31, "b": 2, "bits": 128 }, + { "op": "cond_select", "bit": 33, "a": 9, "b": 8 }, + { "op": "assert", "cond": 34 }, + { "op": "assert", "cond": 34 }, + { "op": "neg", "a": 2 }, + { "op": "add", "a": 31, "b": 35 }, + { "op": "load_imm", "imm": "70" }, + { "op": "declare_pub_input", "var": 37 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 21 }, + { "op": "declare_pub_input", "var": 22 }, + { "op": "pi_skip", "guard": 8, "count": 6 }, + { "op": "load_imm", "imm": "11" }, + { "op": "declare_pub_input", "var": 38 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 36 }, + { "op": "pi_skip", "guard": 8, "count": 5 }, + { "op": "load_imm", "imm": "91" }, + { "op": "declare_pub_input", "var": 39 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "A1" }, + { "op": "declare_pub_input", "var": 40 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "40" }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "80" }, + { "op": "load_imm", "imm": "07" }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 43 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "load_imm", "imm": "03" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 44 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "pi_skip", "guard": 8, "count": 11 }, + { "op": "load_imm", "imm": "31" }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "pi_skip", "guard": 8, "count": 5 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "08" }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "12" }, + { "op": "load_imm", "imm": "04" }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 8, "count": 2 }, + { "op": "load_imm", "imm": "32" }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "60" }, + { "op": "load_imm", "imm": "-01" }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 8, "count": 2 }, + { "op": "load_imm", "imm": "14" }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "load_imm", "imm": "A2" }, + { "op": "declare_pub_input", "var": 53 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 42 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 8, "count": 4 }, + { "op": "load_imm", "imm": "06" }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 54 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 27 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 9 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 4 }, + { "op": "declare_pub_input", "var": 5 }, + { "op": "declare_pub_input", "var": 6 }, + { "op": "declare_pub_input", "var": 7 }, + { "op": "pi_skip", "guard": 8, "count": 19 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 45 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 28 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 8 }, + { "op": "declare_pub_input", "var": 26 }, + { "op": "declare_pub_input", "var": 2 }, + { "op": "pi_skip", "guard": 8, "count": 5 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 46 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 47 }, + { "op": "declare_pub_input", "var": 48 }, + { "op": "pi_skip", "guard": 8, "count": 2 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 49 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 50 }, + { "op": "declare_pub_input", "var": 51 }, + { "op": "pi_skip", "guard": 8, "count": 2 }, + { "op": "declare_pub_input", "var": 52 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 53 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "declare_pub_input", "var": 41 }, + { "op": "pi_skip", "guard": 8, "count": 1 }, + { "op": "cond_select", "bit": 3, "a": 49, "b": 9 }, + { "op": "declare_pub_input", "var": 55 }, + { "op": "pi_skip", "guard": 3, "count": 1 }, + { "op": "cond_select", "bit": 3, "a": 50, "b": 9 }, + { "op": "declare_pub_input", "var": 56 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "cond_select", "bit": 3, "a": 9, "b": 9 }, + { "op": "declare_pub_input", "var": 57 }, + { "op": "pi_skip", "guard": 3, "count": 4 }, + { "op": "public_input", "guard": 3 }, + { "op": "public_input", "guard": 3 }, + { "op": "cond_select", "bit": 3, "a": 30, "b": 9 }, + { "op": "declare_pub_input", "var": 60 }, + { "op": "declare_pub_input", "var": 3 }, + { "op": "cond_select", "bit": 3, "a": 27, "b": 9 }, + { "op": "declare_pub_input", "var": 61 }, + { "op": "cond_select", "bit": 3, "a": 58, "b": 9 }, + { "op": "declare_pub_input", "var": 62 }, + { "op": "cond_select", "bit": 3, "a": 59, "b": 9 }, + { "op": "declare_pub_input", "var": 63 }, + { "op": "pi_skip", "guard": 3, "count": 5 }, + { "op": "test_eq", "a": 4, "b": 58 }, + { "op": "test_eq", "a": 5, "b": 59 }, + { "op": "cond_select", "bit": 64, "a": 65, "b": 9 }, + { "op": "cond_select", "bit": 3, "a": 66, "b": 9 }, + { "op": "cond_select", "bit": 67, "a": 41, "b": 9 }, + { "op": "declare_pub_input", "var": 68 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 42, "b": 9 }, + { "op": "declare_pub_input", "var": 69 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "cond_select", "bit": 67, "a": 54, "b": 9 }, + { "op": "declare_pub_input", "var": 70 }, + { "op": "pi_skip", "guard": 67, "count": 4 }, + { "op": "cond_select", "bit": 67, "a": 26, "b": 9 }, + { "op": "declare_pub_input", "var": 71 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "cond_select", "bit": 67, "a": 44, "b": 9 }, + { "op": "declare_pub_input", "var": 72 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "cond_select", "bit": 67, "a": 27, "b": 9 }, + { "op": "declare_pub_input", "var": 73 }, + { "op": "cond_select", "bit": 67, "a": 27, "b": 9 }, + { "op": "declare_pub_input", "var": 74 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "cond_select", "bit": 67, "a": 9, "b": 9 }, + { "op": "declare_pub_input", "var": 75 }, + { "op": "cond_select", "bit": 67, "a": 9, "b": 9 }, + { "op": "declare_pub_input", "var": 76 }, + { "op": "cond_select", "bit": 67, "a": 9, "b": 9 }, + { "op": "declare_pub_input", "var": 77 }, + { "op": "cond_select", "bit": 67, "a": 9, "b": 9 }, + { "op": "declare_pub_input", "var": 78 }, + { "op": "pi_skip", "guard": 67, "count": 11 }, + { "op": "cond_select", "bit": 67, "a": 45, "b": 9 }, + { "op": "declare_pub_input", "var": 79 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 45, "b": 9 }, + { "op": "declare_pub_input", "var": 80 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 28, "b": 9 }, + { "op": "declare_pub_input", "var": 81 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 26, "b": 9 }, + { "op": "declare_pub_input", "var": 82 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "declare_pub_input", "var": 67 }, + { "op": "cond_select", "bit": 67, "a": 26, "b": 9 }, + { "op": "declare_pub_input", "var": 83 }, + { "op": "cond_select", "bit": 67, "a": 2, "b": 9 }, + { "op": "declare_pub_input", "var": 84 }, + { "op": "pi_skip", "guard": 67, "count": 5 }, + { "op": "cond_select", "bit": 67, "a": 41, "b": 9 }, + { "op": "declare_pub_input", "var": 85 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 46, "b": 9 }, + { "op": "declare_pub_input", "var": 86 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 47, "b": 9 }, + { "op": "declare_pub_input", "var": 87 }, + { "op": "cond_select", "bit": 67, "a": 48, "b": 9 }, + { "op": "declare_pub_input", "var": 88 }, + { "op": "pi_skip", "guard": 67, "count": 2 }, + { "op": "cond_select", "bit": 67, "a": 49, "b": 9 }, + { "op": "declare_pub_input", "var": 89 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 49, "b": 9 }, + { "op": "declare_pub_input", "var": 90 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 50, "b": 9 }, + { "op": "declare_pub_input", "var": 91 }, + { "op": "cond_select", "bit": 67, "a": 51, "b": 9 }, + { "op": "declare_pub_input", "var": 92 }, + { "op": "pi_skip", "guard": 67, "count": 2 }, + { "op": "cond_select", "bit": 67, "a": 52, "b": 9 }, + { "op": "declare_pub_input", "var": 93 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 53, "b": 9 }, + { "op": "declare_pub_input", "var": 94 }, + { "op": "pi_skip", "guard": 67, "count": 1 }, + { "op": "cond_select", "bit": 67, "a": 41, "b": 9 }, + { "op": "declare_pub_input", "var": 95 }, + { "op": "pi_skip", "guard": 67, "count": 1 } + ] +} diff --git a/contracts/v2/package-lock.json b/contracts/v2/package-lock.json new file mode 100644 index 0000000..6cab262 --- /dev/null +++ b/contracts/v2/package-lock.json @@ -0,0 +1,6282 @@ +{ + "name": "@zswap-da/shielded-night-v2", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@zswap-da/shielded-night-v2", + "version": "0.1.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/testkit-js": "5.0.0-beta.7", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3", + "@midnightntwrk/wallet-sdk": "2.0.0-beta.2", + "@scure/bip39": "2.0.1", + "pino": "10.3.1", + "rxjs": "7.8.2" + }, + "devDependencies": { + "@types/node": "24.10.0", + "tsx": "4.20.6", + "typescript": "5.9.3", + "vite": "6.4.1", + "vitest": "4.1.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@apollo/client": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-4.2.12.tgz", + "integrity": "sha512-+KS+LM/gZ58z92p9owZZpI54yCc27KfUi1HOtLrxmxz9kDIqUcp/zh+mNjCWCbNZkWGzWslvbbmXGGtTWT8nkw==", + "license": "MIT", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "@wry/caches": "^1.0.0", + "@wry/equality": "^0.5.6", + "@wry/trie": "^0.5.0", + "graphql-tag": "^2.12.6", + "optimism": "^0.18.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "graphql": "^16.0.0 || ^17.0.0", + "graphql-ws": "^5.5.5 || ^6.0.3", + "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "react-dom": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "rxjs": "^7.3.0", + "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" + }, + "peerDependenciesMeta": { + "graphql-ws": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "subscriptions-transport-ws": { + "optional": true + } + } + }, + "node_modules/@balena/dockerignore": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz", + "integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==", + "license": "Apache-2.0" + }, + "node_modules/@effect/platform": { + "version": "0.97.1", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.97.1.tgz", + "integrity": "sha512-IevWxwmrxCdeXxbXDx/hiOstHtERRigd1nhZSuHgiFEl7NkBmS/5GVWsRacq4NfJN2uCXqggETKNwij15VEpew==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.10", + "multipasta": "^0.2.8" + }, + "peerDependencies": { + "effect": "^3.22.1" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz", + "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.8.0", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz", + "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.5.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@kwsites/file-exists": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "license": "MIT", + "dependencies": { + "debug": "^4.1.1" + } + }, + "node_modules/@midnight-ntwrk/compact-js": { + "version": "2.5.5-rc.8", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-js/-/compact-js-2.5.5-rc.8.tgz", + "integrity": "sha512-7CGWGCTL+8IvqFUI/srHRwAWxGVLD2ytHLjSyvOcNi6UX1QLeG5vUtGlXQAKSJXvjPwndosqIFdW39OgkNH/Mg==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.97.0", + "@midnight-ntwrk/compact-runtime": "0.19.0-rc.0", + "@midnight-ntwrk/platform-js": "^3.0.0", + "@midnightntwrk/ledger-v9": "^1.0.0-rc.3", + "@noble/hashes": "^2.3.0", + "effect": "^3.22.1", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/compact-runtime": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-runtime/-/compact-runtime-0.19.0.tgz", + "integrity": "sha512-0q1ZOlyPdCCEasAxlHxagO6Sb+Db5GM6qYPQ+c+cp71NRxQgiY0Wd0/LIoshQTs+OBISb4XTjiNQ1lxcKR79qQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/onchain-runtime-v4": "^4.0.0-rc.3", + "@noble/curves": "^2.2.0", + "@noble/hashes": "^2.0.1", + "@types/object-inspect": "^1.8.1", + "object-inspect": "^1.12.3" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-compact": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-compact/-/midnight-js-compact-5.0.0-beta.7.tgz", + "integrity": "sha512-qx9Qw0B7jgIFIUha/kRkS0oF2lORFhVHIb2Q2444jE42WA3YtQ0crrFRuzHk/1vxEZ+HOc9pQlIpiQJ/NlmPjg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7" + }, + "bin": { + "fetch-compactc": "dist/fetch-compact.mjs", + "run-compactc": "dist/run-compactc.cjs" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-contracts": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-contracts/-/midnight-js-contracts-5.0.0-beta.7.tgz", + "integrity": "sha512-dWM+u2SEShctUb6BvR38wiXWPr4JkYAughEM33RpthP+mnqGP+C5oOq9FOPLzdKvlYg6Ne5Fk+OMiJjaG0AZQg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "effect": "^3.22.1" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-http-client-proof-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-http-client-proof-provider/-/midnight-js-http-client-proof-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-mFbSjPJrJ1Ju60lI/Gth497kQy+c+Qa5SxM4jvMLW8pbKg1IHN8KIsQJQfGnw7NyAgqtsY6CfT+UMOmuzr9QMg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "cross-fetch": "^4.1.0", + "fetch-retry": "^6.0.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-indexer-public-data-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-indexer-public-data-provider/-/midnight-js-indexer-public-data-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-rjKG5U1bbjOD4acVia81hrobBVj8xovp1IA++RL4SVE75lveFekqNaZO+Y0Z6RbZwEjVBbmPOAD4jChdFuSFkQ==", + "license": "Apache-2.0", + "dependencies": { + "@apollo/client": "^4.2.5", + "@graphql-typed-document-node/core": "^3.2.0", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "buffer": "^6.0.3", + "cross-fetch": "^4.1.0", + "graphql": "^17.0.1", + "graphql-ws": "^6.0.8", + "isomorphic-ws": "^5.0.0", + "rxjs": "^7.8.2", + "ws": "^8.20.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-level-private-state-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-level-private-state-provider/-/midnight-js-level-private-state-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-O3eLwjltjAkXVeXiKyot2aiM43POGtiem2DhtAD4gfsGbWVPGQ//yFyMDsS92h2eb4eJma9wpUqdmAXzs5ilxQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "@noble/ciphers": "^2.2.0", + "@noble/hashes": "^2.2.0", + "abstract-level": "^3.1.1", + "buffer": "^6.0.3", + "level": "^10.0.0", + "superjson": "^2.2.6" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-network-id": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-network-id/-/midnight-js-network-id-5.0.0-beta.7.tgz", + "integrity": "sha512-S51x/aRibCViA+4NdjYImdCHSCltJCCnI0K3K0ZqoAQc6d4b+KfIK1aSvo0cU1k1bdJwQhcgohhWH6Z5GxEHBQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-node-zk-config-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-node-zk-config-provider/-/midnight-js-node-zk-config-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-PkOKC0awUkLzHE9rALoLmEBTdQQflpeCGL2Vu1JpB627sK9vRw8MY7qiZbH8MCp1PQUVMK5VpVGc/awaqQkAnA==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-protocol": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-protocol/-/midnight-js-protocol-5.0.0-beta.7.tgz", + "integrity": "sha512-XwcAiVjEvXqpbp58oZnYq3/TCs1lduN8YHxbRKB4EvltxkpptaHr2fE78MMndpvSDGEgernJreAKO0VYDOACCA==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0-rc.0", + "@midnight-ntwrk/platform-js": "3.0.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-types": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-types/-/midnight-js-types-5.0.0-beta.7.tgz", + "integrity": "sha512-dZMW1DWgvyOPuuSCaEAx6pOYQomT+YYHFrDk9pjPSSRG/3qhe8PKtc2DYFRu9t8E4xy7FkZM8A2EW/S8auf5JQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "effect": "^3.22.1", + "pino": "^10.3.1", + "rxjs": "^7.8.2" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-utils": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-utils/-/midnight-js-utils-5.0.0-beta.7.tgz", + "integrity": "sha512-mZwdEL/o38yeFp+ba3Uil6xuxFPAC9bplMVoP6Cs6C5gycVaeWkW1h+7wDEKGDcJ2qImfi7egNDHs+u+PbHWTg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@noble/hashes": "^2.2.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/platform-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/platform-js/-/platform-js-3.0.0.tgz", + "integrity": "sha512-cAOpmWURUELDKmcNf8/mZjDtxkqg6ShjV6v0KY7mmwMWkieDEERq/TRmK5cMJgUqMi6nCWjwLZqOmPB07B8Y4A==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.96.1", + "effect": "^3.21.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/platform-js/node_modules/@effect/platform": { + "version": "0.96.3", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.96.3.tgz", + "integrity": "sha512-LzvIj4HYE++TcTv/cVTCI/GRvQTV0ymwRmgjZMzNB5dU4OS05pTN36RKN0npiOm5orLJgw4yjIv1dNZoYGh/vg==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.10", + "multipasta": "^0.2.7" + }, + "peerDependencies": { + "effect": "^3.21.5" + } + }, + "node_modules/@midnight-ntwrk/testkit-js": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/testkit-js/-/testkit-js-5.0.0-beta.7.tgz", + "integrity": "sha512-H26RSaNZYjMlNGp08WXwwLuVXoXh/nDWMAPEgizset2qRX1m1bffQTdKpE8dz9A6mE4GR1uoagMnvrJCRaJMTw==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-compact": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-http-client-proof-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-level-private-state-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-node-zk-config-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "@midnight-ntwrk/zkir-v2": "2.1.0", + "@midnightntwrk/dapp-connector-api": "4.1.0-beta.1", + "@midnightntwrk/wallet-sdk": "2.0.0-beta.2", + "@midnightntwrk/wallet-sdk-prover-client": "2.0.0-beta.2", + "@scure/bip39": "^2.2.0", + "axios": "^1.16.1", + "buffer": "^6.0.3", + "cross-fetch": "^4.1.0", + "pino": "^10.3.1", + "pino-pretty": "^13.1.3", + "rxjs": "^7.8.2", + "testcontainers": "^12.0.0", + "ws": "^8.20.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/testkit-js/node_modules/@scure/bip39": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-2.4.0.tgz", + "integrity": "sha512-82dxFbZUYboyOf0AXiydsQrFQ5Q4h9mX+O2UkE91ROYmsc0BKMGZLwDmy96Jpa2+vrtoxomjUhy1RPIgH/r2nA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@midnight-ntwrk/zkir-v2": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/zkir-v2/-/zkir-v2-2.1.0.tgz", + "integrity": "sha512-UDMujjzCt0SA89uqOFWUL4LZTkxVAS8JjvOaYMAgxlSrWfN7m5th1R1qGlpDJuSH39rbWt6WwtuK3k08Mta6LA==" + }, + "node_modules/@midnightntwrk/dapp-connector-api": { + "version": "4.1.0-beta.1", + "resolved": "https://registry.npmjs.org/@midnightntwrk/dapp-connector-api/-/dapp-connector-api-4.1.0-beta.1.tgz", + "integrity": "sha512-gpFAoELf++5/6GuLZWYSLOD1uBbIoUs3iW056OCwlENadwGSVvuEvWXcmdfZJzKXhT3znZw2uKeZNCqIhDc8Jg==", + "license": "Apache-2.0" + }, + "node_modules/@midnightntwrk/ledger-v9": { + "version": "1.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@midnightntwrk/ledger-v9/-/ledger-v9-1.0.0-rc.3.tgz", + "integrity": "sha512-i/Cl/d2XQ19gIm5SCruMHr+XiruxIn9Ec3i15DrZ/44Yggzu1u5+dG7QUx7Rw1htkgALXivEt7Kw4NzxPr4pBw==" + }, + "node_modules/@midnightntwrk/onchain-runtime-v4": { + "version": "4.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@midnightntwrk/onchain-runtime-v4/-/onchain-runtime-v4-4.0.0-rc.3.tgz", + "integrity": "sha512-LAf4g3vgwtPqActbi5RAoZcfYduqnFqtsHN+i1s/Mcb5vi2yMbPmpSOJ0YCCIGb2S/qY7G5tQARHVD0PJyHSNA==" + }, + "node_modules/@midnightntwrk/wallet-sdk": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk/-/wallet-sdk-2.0.0-beta.2.tgz", + "integrity": "sha512-XL0ZG7NuswssFnsJYlJzf7AcBizBF14Da67KhRegLFLuDb0OYj3ZQNNR/c3q+2KXoJ7TJ5s75hhPMsWfBZWakg==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-capabilities": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-dust-wallet": "5.0.0-beta.2", + "@midnightntwrk/wallet-sdk-facade": "5.0.0-beta.2", + "@midnightntwrk/wallet-sdk-hd": "3.1.0-beta.1", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-node-client": "2.0.0-beta.2", + "@midnightntwrk/wallet-sdk-prover-client": "2.0.0-beta.2", + "@midnightntwrk/wallet-sdk-runtime": "1.0.6-beta.0", + "@midnightntwrk/wallet-sdk-shielded": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-unshielded-wallet": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-abstractions": { + "version": "3.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-abstractions/-/wallet-sdk-abstractions-3.0.0-beta.0.tgz", + "integrity": "sha512-9gzVaSd9dk1rymqd6CrqSSNGPoMtIbr24wVSwCfuB3L1y9wcNgzCw9l/RH744XJE+4RyDZODEIWo7WU5LCYvNw==", + "license": "Apache-2.0", + "dependencies": { + "effect": "^3.19.19" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-address-format": { + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-address-format/-/wallet-sdk-address-format-4.0.0-beta.2.tgz", + "integrity": "sha512-yK4jlntQ0Pgks8dKrPx6J7IMdzIznEYZ4yO9/msIJrn2IM4o1d8+MEh07OMFvZ9ui1YNQB272aUv5muopBCrdA==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@scure/base": "^2.0.0", + "@subsquid/scale-codec": "^4.0.1" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-capabilities": { + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-capabilities/-/wallet-sdk-capabilities-4.0.0-beta.2.tgz", + "integrity": "sha512-QoeautcgfOgUMzbU5JAqhVP7n8K8fNdpQgoOwDwIdjJGpP+mH0f2/QtGia373OVTt1olf3cQN+7bLL9B0ihvlg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/zkir-v2": "^2.1.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-node-client": "2.0.0-beta.2", + "@midnightntwrk/wallet-sdk-prover-client": "2.0.0-beta.2", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-dust-wallet": { + "version": "5.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-dust-wallet/-/wallet-sdk-dust-wallet-5.0.0-beta.2.tgz", + "integrity": "sha512-ILtpnmrx5mkMbDDAt1Az0qAdev3CtbTSsjk0PHh6sIowiaooQBSJ1GH043unYkpUj++OLlTcS2Dwf1VT2ya0oA==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-capabilities": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-runtime": "1.0.6-beta.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-facade": { + "version": "5.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-facade/-/wallet-sdk-facade-5.0.0-beta.2.tgz", + "integrity": "sha512-iDtxlilzBz2oPRJkGaktLS5hUkNXLwAZovYv99XLpoSg/+QYGpX3zWhFW5+OUV3kt9QYFLDSilRKdmtXa+WHJQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-capabilities": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-dust-wallet": "5.0.0-beta.2", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-shielded": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-unshielded-wallet": "4.0.0-beta.2", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-hd": { + "version": "3.1.0-beta.1", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-hd/-/wallet-sdk-hd-3.1.0-beta.1.tgz", + "integrity": "sha512-zQCucKVf7BXmTA6Clf5yHUsNspAiV0q+noEZVvHxd2yQTS6pXBmibUZ0wBWs1KG3V2tCfBllzoil7rS+L82IRQ==", + "license": "Apache-2.0", + "dependencies": { + "@scure/bip32": "^2.0.1", + "@scure/bip39": "^2.0.1" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-indexer-client": { + "version": "1.3.0-beta.1", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-indexer-client/-/wallet-sdk-indexer-client-1.3.0-beta.1.tgz", + "integrity": "sha512-Kn3RT3kpRlyTAmN9xhV98q8k8ZiLE40zOGte/++tHHE2k69jtCFNWHlKlJXTDpmFVBqGmJFb8Ih658n4xGgdJg==", + "license": "Apache-2.0", + "dependencies": { + "@graphql-typed-document-node/core": "^3.2.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "graphql": "^17.0.0", + "graphql-http": "^1.22.4", + "graphql-ws": "^6.0.7" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-node-client": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-node-client/-/wallet-sdk-node-client-2.0.0-beta.2.tgz", + "integrity": "sha512-jW9Mu37a1B9kpUSVAg0PTu7agPza4ffUCLS8rCAWDbAfa65xoECFXUH2FzWR95uxVPes8XY7+onNeBQN7ffJ3w==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "@polkadot/api": "^16.5.4", + "@polkadot/types": "^16.5.4", + "@polkadot/util": "^14.0.1", + "@types/bn.js": "^5.2.0", + "bn.js": "^5.2.3", + "effect": "^3.19.19" + }, + "peerDependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-prover-client": "2.0.0-beta.2" + }, + "peerDependenciesMeta": { + "@midnightntwrk/ledger-v9": { + "optional": true + }, + "@midnightntwrk/wallet-sdk-prover-client": { + "optional": true + } + } + }, + "node_modules/@midnightntwrk/wallet-sdk-prover-client": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-prover-client/-/wallet-sdk-prover-client-2.0.0-beta.2.tgz", + "integrity": "sha512-hNHwsxRbg6HkkgTG4tE13ycKI1IwzMUVFLBgfLtt2/7TkbymyI9XkgollShNrcIQ5RzAg3WYX7d1sx9XIUxblA==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.96.0", + "@midnight-ntwrk/zkir-v2": "^2.1.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "web-worker": "^1.5.0" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-prover-client/node_modules/@effect/platform": { + "version": "0.96.3", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.96.3.tgz", + "integrity": "sha512-LzvIj4HYE++TcTv/cVTCI/GRvQTV0ymwRmgjZMzNB5dU4OS05pTN36RKN0npiOm5orLJgw4yjIv1dNZoYGh/vg==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.10", + "multipasta": "^0.2.7" + }, + "peerDependencies": { + "effect": "^3.21.5" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-runtime": { + "version": "1.0.6-beta.0", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-runtime/-/wallet-sdk-runtime-1.0.6-beta.0.tgz", + "integrity": "sha512-4Q/hTopMvLaiyncaIFiWQVPvXBHOg8tgPq4Aqx9ta+smuiPFbCAZRq7ezA7PMmKYAEqWeqaY93oK98NmeKUakg==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-shielded": { + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-shielded/-/wallet-sdk-shielded-4.0.0-beta.2.tgz", + "integrity": "sha512-ecxajW6CS4+tNg0nMrofdwXzdhPCbpXADI1saMqP7bP9FJ3+BBIFfZtKIsHL+dN2RySa7+YOlFgeG4kzh/sIYA==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-capabilities": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-runtime": "1.0.6-beta.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-unshielded-wallet": { + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-unshielded-wallet/-/wallet-sdk-unshielded-wallet-4.0.0-beta.2.tgz", + "integrity": "sha512-SBhXPqzEWUybgYO5iLdcPwy1jy2gP4viqTiaWHWGwdkr6kTO1nsXLgq2ZCteWuypbRyMnKhP28z+uGzsrtaZcg==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/wallet-sdk-abstractions": "3.0.0-beta.0", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-capabilities": "4.0.0-beta.2", + "@midnightntwrk/wallet-sdk-indexer-client": "1.3.0-beta.1", + "@midnightntwrk/wallet-sdk-runtime": "1.0.6-beta.0", + "@midnightntwrk/wallet-sdk-utilities": "1.2.0", + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnightntwrk/wallet-sdk-utilities": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-utilities/-/wallet-sdk-utilities-1.2.0.tgz", + "integrity": "sha512-Xh5uuCwg4FtAOQCYQ2wkBZtIEt0oCCt1mO3jHLnP+7cyMUQfMNbKwOVi85W3zq+84YFy5DVsN9xifFm75c1MQg==", + "license": "Apache-2.0", + "dependencies": { + "effect": "^3.19.19", + "rxjs": "^7.8.2" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz", + "integrity": "sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.4.tgz", + "integrity": "sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.4.tgz", + "integrity": "sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.4.tgz", + "integrity": "sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.4.tgz", + "integrity": "sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.4.tgz", + "integrity": "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@noble/ciphers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.4.0.tgz", + "integrity": "sha512-AnjFn0Jv92laAkvMrghlFZq4qQCIN/4DxFV/eooqtC2YTjB7kBeLMS2T9KJX4Dn+ZVXLOwK0lSgqDtx9gvxtiw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.4.0.tgz", + "integrity": "sha512-P4/62zrgfH33CneE3Dn4WhJVA22YUU0eR51wKIan4NVRvwsA0YnPTwWGpNbpuacSujmSFLvyzpyuR30+fbq2Ew==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.4.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.4.0.tgz", + "integrity": "sha512-X5XaVWZIBCT7HHZGm5I7ZQXDwLG+bGXuSrMQAW+7Zvl87h1kmc1ZB1VSRJcpUfoUrGQp4Fkoxm5kZ+Ms+aW+eA==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "license": "MIT" + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polkadot-api/json-rpc-provider": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz", + "integrity": "sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==", + "license": "MIT", + "optional": true + }, + "node_modules/@polkadot-api/json-rpc-provider-proxy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz", + "integrity": "sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==", + "license": "MIT", + "optional": true + }, + "node_modules/@polkadot-api/metadata-builders": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.3.2.tgz", + "integrity": "sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==", + "license": "MIT", + "optional": true, + "dependencies": { + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" + } + }, + "node_modules/@polkadot-api/observable-client": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.3.2.tgz", + "integrity": "sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==", + "license": "MIT", + "optional": true, + "dependencies": { + "@polkadot-api/metadata-builders": "0.3.2", + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" + }, + "peerDependencies": { + "@polkadot-api/substrate-client": "0.1.4", + "rxjs": ">=7.8.0" + } + }, + "node_modules/@polkadot-api/substrate-bindings": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.6.0.tgz", + "integrity": "sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==", + "license": "MIT", + "optional": true, + "dependencies": { + "@noble/hashes": "^1.3.1", + "@polkadot-api/utils": "0.1.0", + "@scure/base": "^1.1.1", + "scale-ts": "^1.6.0" + } + }, + "node_modules/@polkadot-api/substrate-bindings/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@polkadot-api/substrate-bindings/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "optional": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@polkadot-api/substrate-client": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.1.4.tgz", + "integrity": "sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==", + "license": "MIT", + "optional": true, + "dependencies": { + "@polkadot-api/json-rpc-provider": "0.0.1", + "@polkadot-api/utils": "0.1.0" + } + }, + "node_modules/@polkadot-api/utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.1.0.tgz", + "integrity": "sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==", + "license": "MIT", + "optional": true + }, + "node_modules/@polkadot/api": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-16.5.6.tgz", + "integrity": "sha512-5h/X3pY8WpqGk4XTaiIUjKD6Pnk8k4bJ6EIwPKLP8/kfFWKSOenpN6ggZxANr+Qj+RgXrp4TxJVcuhXSiBh9Sg==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api-augment": "16.5.6", + "@polkadot/api-base": "16.5.6", + "@polkadot/api-derive": "16.5.6", + "@polkadot/keyring": "^14.0.3", + "@polkadot/rpc-augment": "16.5.6", + "@polkadot/rpc-core": "16.5.6", + "@polkadot/rpc-provider": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/types-augment": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/types-create": "16.5.6", + "@polkadot/types-known": "16.5.6", + "@polkadot/util": "^14.0.3", + "@polkadot/util-crypto": "^14.0.3", + "eventemitter3": "^5.0.1", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-augment": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-16.5.6.tgz", + "integrity": "sha512-bunJF1c3nIuDtU6iwa+reTt9U47Y8iOC8Gw7PfANlZmLJmO/XVXnWc3JJLM+g9ESDn2raHJELeWBFVOXQrbtUw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api-base": "16.5.6", + "@polkadot/rpc-augment": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/types-augment": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-base": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-16.5.6.tgz", + "integrity": "sha512-eBLIv86ZZY4t5OrobVoGC+QXbErOGlBpI2rJI5OMvTNPoVvtEoI++u+wwRScjkOZaUhXyQikd+0Uv71qr3xnsA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-core": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/util": "^14.0.3", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-derive": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-16.5.6.tgz", + "integrity": "sha512-cHdvPvhYFch18uPTcuOZJ8VceOfercod2fi4xCnHJAmattzlgj9qCgnOoxdmBS9GZ403ZyRHOjBuUwZy/IsUWQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/api": "16.5.6", + "@polkadot/api-augment": "16.5.6", + "@polkadot/api-base": "16.5.6", + "@polkadot/rpc-core": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/util": "^14.0.3", + "@polkadot/util-crypto": "^14.0.3", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/keyring": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-14.0.3.tgz", + "integrity": "sha512-ozp1dQwaHCjgX/fpTTORmHjxdUNQnyiTVJszpzUaUpvtH/IGZhSU/mSHXMqNETS/g57vQa7NatIDcWfyR9abyA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "14.0.3", + "@polkadot/util-crypto": "14.0.3", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "14.0.3", + "@polkadot/util-crypto": "14.0.3" + } + }, + "node_modules/@polkadot/networks": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-14.0.3.tgz", + "integrity": "sha512-/VqTLUDn+Wm8S2L/yaGFddo3oW4vRYav0Rg4pLg/semMZLaN8PJ6h927ucn9JyWdH82QfZfyiIPORt0ZF3isyw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "14.0.3", + "@substrate/ss58-registry": "^1.51.0", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-augment": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-16.5.6.tgz", + "integrity": "sha512-vlrNvl2VtU09jZV/AvH7jBb/cNUO+dWu8Xj9pId5ctSUnZHm8o8wRk9ekyieKP57OUoKMd8+VScwMKd624SxTw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-core": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-core": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-16.5.6.tgz", + "integrity": "sha512-l6od++WlvKH4mw5mtsIh2AhiBs3H+TtdOoUHVLCx/R9il7+gl+arltzZ8vBuffyh/O+uQ36lI8yUoD1g4gi1tA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/rpc-augment": "16.5.6", + "@polkadot/rpc-provider": "16.5.6", + "@polkadot/types": "16.5.6", + "@polkadot/util": "^14.0.3", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-provider": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-16.5.6.tgz", + "integrity": "sha512-46sHIjKYr4aSzBCfbyqtCwuP8MMJ3jOp0xx9eggOGbKyP8Z0j0Cp+1nNkZUYzehcdGjjrmCxCbQp17wc6cj4zA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/keyring": "^14.0.3", + "@polkadot/types": "16.5.6", + "@polkadot/types-support": "16.5.6", + "@polkadot/util": "^14.0.3", + "@polkadot/util-crypto": "^14.0.3", + "@polkadot/x-fetch": "^14.0.3", + "@polkadot/x-global": "^14.0.3", + "@polkadot/x-ws": "^14.0.3", + "eventemitter3": "^5.0.1", + "mock-socket": "^9.3.1", + "nock": "^13.5.5", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@substrate/connect": "0.8.11" + } + }, + "node_modules/@polkadot/types": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-16.5.6.tgz", + "integrity": "sha512-X/sfMHJS4RkRhnsc4CQqzUy7BM/s2y71TrBFHPYAjs2q/rbZ/BwvBk70SrUiSa0+iRRn3RewbBZm+AB8CbkdKw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/keyring": "^14.0.3", + "@polkadot/types-augment": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/types-create": "16.5.6", + "@polkadot/util": "^14.0.3", + "@polkadot/util-crypto": "^14.0.3", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-augment": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-16.5.6.tgz", + "integrity": "sha512-QN5UrluUZCVgknUDW0gps/FRQ13Qgm24w53pCd2HgD0nmTtXDt9D4psjWwx5JkGTkUAvpzFWwN41bkxAeCiV6g==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/types": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-codec": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-16.5.6.tgz", + "integrity": "sha512-3tzUv1LZOL97IlQmko4dqbfRC0cg9IQ2QAHRVoDIWsXrVovp1V3kPdP0o6e3I8T2XB9IlbabK91v+ZiIxhGMZw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "^14.0.3", + "@polkadot/x-bigint": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-create": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-16.5.6.tgz", + "integrity": "sha512-g7g3hrjpz4KgqQqei9PU0JY9fsFHBmThWALZk5pWB32vyDyDcXZiyhH3agDhqfmzQiolTW2FuvcNJxgS634J1w==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/types-codec": "16.5.6", + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-known": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-16.5.6.tgz", + "integrity": "sha512-c78NcVO3LIvi4xzxB39WewE+80I4jOYUtPBaB4AzSMespEwIr92VTeX3KzFWuutxDXLSPqeVfXhaAhBB0NssiQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/networks": "^14.0.3", + "@polkadot/types": "16.5.6", + "@polkadot/types-codec": "16.5.6", + "@polkadot/types-create": "16.5.6", + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-support": { + "version": "16.5.6", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-16.5.6.tgz", + "integrity": "sha512-Hqpa/hCvXZXUTUiJMAE55UXpzAeCVLaFlzzXQXLkne0vhmv3/JkWcBnX755a/b9+C4b3MKEz2i0tSKLsa3DldA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/util": "^14.0.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/util": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-14.0.3.tgz", + "integrity": "sha512-mg1NR7ixHlNiz2zbvdcdy1OXZmca2tVA4DpewGpY/qFkW/gq9HdDrHLu7g0k90QnunDcFW4emb7NB60sGJQ0bw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-bigint": "14.0.3", + "@polkadot/x-global": "14.0.3", + "@polkadot/x-textdecoder": "14.0.3", + "@polkadot/x-textencoder": "14.0.3", + "@types/bn.js": "^5.1.6", + "bn.js": "^5.2.1", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/util-crypto": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-14.0.3.tgz", + "integrity": "sha512-V00BI6XnZLCkrAmV8uN0eSB6fy48CkxdDZT29cgSMSwHPtY6oKUNgd1ST07PGCL5x8XflwjoA7CTlhdbp1Y9gw==", + "license": "Apache-2.0", + "dependencies": { + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@polkadot/networks": "14.0.3", + "@polkadot/util": "14.0.3", + "@polkadot/wasm-crypto": "^7.5.3", + "@polkadot/wasm-util": "^7.5.3", + "@polkadot/x-bigint": "14.0.3", + "@polkadot/x-randomvalues": "14.0.3", + "@scure/base": "^1.1.7", + "@scure/sr25519": "^0.2.0", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "14.0.3" + } + }, + "node_modules/@polkadot/util-crypto/node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@polkadot/util-crypto/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@polkadot/util-crypto/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@polkadot/wasm-bridge": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.5.4.tgz", + "integrity": "sha512-6xaJVvoZbnbgpQYXNw9OHVNWjXmtcoPcWh7hlwx3NpfiLkkjljj99YS+XGZQlq7ks2fVCg7FbfknkNb8PldDaA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/wasm-util": "7.5.4", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.5.4.tgz", + "integrity": "sha512-1seyClxa7Jd7kQjfnCzTTTfYhTa/KUTDUaD3DMHBk5Q4ZUN1D1unJgX+v1aUeXSPxmzocdZETPJJRZjhVOqg9g==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/wasm-bridge": "7.5.4", + "@polkadot/wasm-crypto-asmjs": "7.5.4", + "@polkadot/wasm-crypto-init": "7.5.4", + "@polkadot/wasm-crypto-wasm": "7.5.4", + "@polkadot/wasm-util": "7.5.4", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-asmjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.5.4.tgz", + "integrity": "sha512-ZYwxQHAJ8pPt6kYk9XFmyuFuSS+yirJLonvP+DYbxOrARRUHfN4nzp4zcZNXUuaFhpbDobDSFn6gYzye6BUotA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-init": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.5.4.tgz", + "integrity": "sha512-U6s4Eo2rHs2n1iR01vTz/sOQ7eOnRPjaCsGWhPV+ZC/20hkVzwPAhiizu/IqMEol4tO2yiSheD4D6bn0KxUJhg==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/wasm-bridge": "7.5.4", + "@polkadot/wasm-crypto-asmjs": "7.5.4", + "@polkadot/wasm-crypto-wasm": "7.5.4", + "@polkadot/wasm-util": "7.5.4", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-wasm": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.5.4.tgz", + "integrity": "sha512-PsHgLsVTu43eprwSvUGnxybtOEuHPES6AbApcs7y5ZbM2PiDMzYbAjNul098xJK/CPtrxZ0ePDFnaQBmIJyTFw==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/wasm-util": "7.5.4", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/wasm-util": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.5.4.tgz", + "integrity": "sha512-hqPpfhCpRAqCIn/CYbBluhh0TXmwkJnDRjxrU9Bnqtw9nMNa97D8JuOjdd2pi0rxm+eeLQ/f1rQMp71RMM9t4w==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/x-bigint": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-14.0.3.tgz", + "integrity": "sha512-U0al6BKgldFrEbmSObRAlzv9VDs5SMa/rbvZKvvkVec0sWTzYPWQZU1ZC/biXLYdjdKML89BeuCKmXZtCcGhUQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-fetch": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-14.0.3.tgz", + "integrity": "sha512-695c5aPBPtYcnn2zM+u0mXgyNHINlO0qGlGcJq3/0t5NVRZv5KZhk7NNm6antOay9uUjGG40F/r+LPzDT3QamA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "node-fetch": "^3.3.2", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-global": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-14.0.3.tgz", + "integrity": "sha512-MzMEynJ7HMTy/plLmdyP8rv14RS/6s29HZodUG9aCOscBnEiEDxVEax/ztRJqxhhQuHeYdx0LYDwVbdQDTkqNw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-randomvalues": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-14.0.3.tgz", + "integrity": "sha512-qTPcrk0nIHL2tIu5e0cLj3puQvjCK7onehnqO2fvlmWeIlvDel66fwWs06Ipsib+CwLJdmE6WgNy+8Jv74r6YA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "14.0.3", + "@polkadot/wasm-util": "*" + } + }, + "node_modules/@polkadot/x-textdecoder": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-14.0.3.tgz", + "integrity": "sha512-4RJYDG00iUzQ7YAuS/yvkWRZlkjYU8PUNdJHRfqtJ+SjrSPB7LYYxFhLgw43TZUtHmIueNTsml2Ukv3xXTr2kA==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-textencoder": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-14.0.3.tgz", + "integrity": "sha512-9HH6o2L+r99wEfXhPb5g+Xwn7qouqD32PsMux7B0dFGR2KNqP4KwO19Hu+gdij6wsEhy7delhZwzHenrWwDfhQ==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-ws": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-14.0.3.tgz", + "integrity": "sha512-tOPdkMye3iuXnuFtdNg5+iSu7Cz9LRL8z5psMuZpUpThMYChGsS2pDFtNvXOKU8ohhO+frY9VdJ9VBg1WL9Iug==", + "license": "Apache-2.0", + "dependencies": { + "@polkadot/x-global": "14.0.3", + "tslib": "^2.8.0", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", + "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", + "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", + "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz", + "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==", + "license": "BSD-3-Clause" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz", + "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz", + "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz", + "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz", + "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz", + "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz", + "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz", + "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz", + "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz", + "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz", + "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz", + "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz", + "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz", + "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz", + "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz", + "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz", + "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz", + "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz", + "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz", + "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz", + "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz", + "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz", + "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz", + "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz", + "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz", + "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@scure/base": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.4.0.tgz", + "integrity": "sha512-thZ1TuJwFwBblOhgsjDKvvGirBxNp+wSvY/DR6tJBJOTDhdAAcHJ8Vbr2eFnqaxeca4+t0i9KBf+uHYGWwZORg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-2.4.0.tgz", + "integrity": "sha512-i3DS0CptAocyvqE4n3SUkpzeQK4vJMFwWLofTwRiiKo2aWojBOfyMCgfKw9HVpO6fSY5AK86sHS/Uzn8kK9Few==", + "license": "MIT", + "dependencies": { + "@noble/curves": "2.4.0", + "@noble/hashes": "2.4.0", + "@scure/base": "2.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-2.0.1.tgz", + "integrity": "sha512-PsxdFj/d2AcJcZDX1FXN3dDgitDDTmwf78rKZq1a6c1P1Nan1X/Sxc7667zU3U+AN60g7SxxP0YCVw2H/hBycg==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.0.1", + "@scure/base": "2.0.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", + "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.0.0.tgz", + "integrity": "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/sr25519": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@scure/sr25519/-/sr25519-0.2.0.tgz", + "integrity": "sha512-uUuLP7Z126XdSizKtrCGqYyR3b3hYtJ6Fg/XFUXmc2//k2aXHDLqZwFeXxL97gg4XydPROPVnuaHGF2+xriSKg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.2", + "@noble/hashes": "~1.8.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/sr25519/node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/sr25519/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@subsquid/scale-codec": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@subsquid/scale-codec/-/scale-codec-4.0.1.tgz", + "integrity": "sha512-H3mi5GIvlrvOSJVSYQRNnaiulSDktPF4TwUvquAgN86tN4kokyX8XcEM2Htrm1sVWRtMi7SgYpyVR5Yg5iPKUQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.2", + "@subsquid/util-internal-json": "^1.2.2" + } + }, + "node_modules/@subsquid/util-internal-hex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-hex/-/util-internal-hex-1.2.3.tgz", + "integrity": "sha512-rGIQKHP+RpriJR56oL/AD43H/KX1EQwsvUy8nP6IHnk/vmaLyC2ECTp5n0jB7kq4NYK4C2VotP3lXHR0vWpa0A==", + "license": "GPL-3.0-or-later" + }, + "node_modules/@subsquid/util-internal-json": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-json/-/util-internal-json-1.2.4.tgz", + "integrity": "sha512-YrEzKjTRPRI4FtJVQqn3mPlIYSWbKGazpOpccRYITmxH0jzKtUfwpIkeCRurVsB/293+oFO8YqyQ6LO14FbLwQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.3" + } + }, + "node_modules/@substrate/connect": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.11.tgz", + "integrity": "sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==", + "deprecated": "versions below 1.x are no longer maintained", + "license": "GPL-3.0-only", + "optional": true, + "dependencies": { + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.5", + "@substrate/light-client-extension-helpers": "^1.0.0", + "smoldot": "2.0.26" + } + }, + "node_modules/@substrate/connect-extension-protocol": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.2.2.tgz", + "integrity": "sha512-t66jwrXA0s5Goq82ZtjagLNd7DPGCNjHeehRlE/gcJmJ+G56C0W+2plqOMRicJ8XGR1/YFnUSEqUFiSNbjGrAA==", + "license": "GPL-3.0-only", + "optional": true + }, + "node_modules/@substrate/connect-known-chains": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.10.3.tgz", + "integrity": "sha512-OJEZO1Pagtb6bNE3wCikc2wrmvEU5x7GxFFLqqbz1AJYYxSlrPCGu4N2og5YTExo4IcloNMQYFRkBGue0BKZ4w==", + "license": "GPL-3.0-only", + "optional": true + }, + "node_modules/@substrate/light-client-extension-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-1.0.0.tgz", + "integrity": "sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==", + "license": "MIT", + "optional": true, + "dependencies": { + "@polkadot-api/json-rpc-provider": "^0.0.1", + "@polkadot-api/json-rpc-provider-proxy": "^0.1.0", + "@polkadot-api/observable-client": "^0.3.0", + "@polkadot-api/substrate-client": "^0.1.2", + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.5", + "rxjs": "^7.8.1" + }, + "peerDependencies": { + "smoldot": "2.x" + } + }, + "node_modules/@substrate/ss58-registry": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.51.0.tgz", + "integrity": "sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==", + "license": "Apache-2.0" + }, + "node_modules/@types/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/docker-modem": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", + "integrity": "sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/ssh2": "*" + } + }, + "node_modules/@types/dockerode": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-4.0.1.tgz", + "integrity": "sha512-cmUpB+dPN955PxBEuXE3f6lKO1hHiIGYJA46IVF3BJpNsZGvtBDcRnlrHYHtOH/B6vtDOyl2kZ2ShAu3mgc27Q==", + "license": "MIT", + "dependencies": { + "@types/docker-modem": "*", + "@types/node": "*", + "@types/ssh2": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@types/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@types/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-lwGTVESDDV+XsQ1pH4UifpJ1f7OtXzQ6QBOX2Afq2bM/T3oOt8hF6exJMjjIjtEWeAN2YAo25J7HxWh97CCz9w==", + "license": "MIT" + }, + "node_modules/@types/ssh2": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.15.6.tgz", + "integrity": "sha512-oGdxhBqcRTwSTKFm+9EiKzkNVYRLEFkcW44lhguvBalGJbWfGnDt/ezwSUZc+SF9m9bMc3VyklNAtp7zICjS5w==", + "license": "MIT", + "dependencies": { + "@types/node": "^18.11.18" + } + }, + "node_modules/@types/ssh2-streams": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.13.tgz", + "integrity": "sha512-faHyY3brO9oLEA0QlcO8N2wT7R0+1sHWZvQ+y3rMLwdY1ZyS1z0W3t65j9PqT4HmQ6ALzNe7RZlNuCNE0wBSWA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ssh2/node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/ssh2/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, + "node_modules/@vitest/expect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.0.tgz", + "integrity": "sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.0", + "@vitest/utils": "4.1.0", + "chai": "^6.2.2", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.0.tgz", + "integrity": "sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.0", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.0.tgz", + "integrity": "sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.0.tgz", + "integrity": "sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.0", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.0.tgz", + "integrity": "sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.0", + "@vitest/utils": "4.1.0", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.0.tgz", + "integrity": "sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.0.tgz", + "integrity": "sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.0", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@wry/caches": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.1.tgz", + "integrity": "sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/context": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", + "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/equality": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", + "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/trie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", + "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/abstract-level": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-3.1.1.tgz", + "integrity": "sha512-CW2gKbJFTuX1feMvOrvsVMmijAOgI9kg2Ie9Dq3gOcMt/dVVoVmqNlLcEUCT13NxHFMEajcUcVBIplbyDroDiw==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "is-buffer": "^2.0.5", + "level-supports": "^6.2.0", + "level-transcoder": "^1.0.1", + "maybe-combine-errors": "^1.0.0", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", + "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/archiver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz", + "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==", + "license": "MIT", + "dependencies": { + "archiver-utils": "^5.0.2", + "async": "^3.2.4", + "buffer-crc32": "^1.0.0", + "readable-stream": "^4.0.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^3.0.0", + "zip-stream": "^6.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/archiver-utils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz", + "integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==", + "license": "MIT", + "dependencies": { + "glob": "^10.0.0", + "graceful-fs": "^4.2.0", + "is-stream": "^2.0.1", + "lazystream": "^1.0.0", + "lodash": "^4.17.15", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/axios": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/b4a": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz", + "integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==", + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/bare-events": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.9.2.tgz", + "integrity": "sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==", + "license": "Apache-2.0", + "peerDependencies": { + "bare-abort-controller": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } + } + }, + "node_modules/bare-fs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.8.1.tgz", + "integrity": "sha512-N1nnXdHZAOSstz0XiHikGS4HGMH4CnSwhqWdGQQMqqdvp4Jybm9sE3R1WVnpWVd4SFkc8ryPDBLViNLwiEqECg==", + "license": "Apache-2.0", + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4", + "bare-url": "^2.2.2", + "fast-fifo": "^1.3.2" + }, + "engines": { + "bare": ">=1.28.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-path": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.1.2.tgz", + "integrity": "sha512-ZyKbsuuqK6Ag0K8pX6V5Txq6XeJRvY+wXucnFGRjiyVYP9YWDpIQugk/b+enRYrEYBJaqLzghRQpXPMR7341Nw==", + "license": "Apache-2.0" + }, + "node_modules/bare-stream": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.4.tgz", + "integrity": "sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==", + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.8.1", + "streamx": "^2.25.0", + "teex": "^1.0.1" + }, + "peerDependencies": { + "bare-abort-controller": "*", + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + }, + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, + "node_modules/bare-url": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.5.4.tgz", + "integrity": "sha512-Gxa7UVWBr0/edU1b+TJhn/AZvMQUj9OGspvYsaTYQrAbZA4BOTZGL3LiZxvD+CeMlDH4juwD84+eTAp/bLYW5g==", + "license": "Apache-2.0", + "dependencies": { + "bare-path": "^3.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bn.js": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.5.tgz", + "integrity": "sha512-Vq886eXykuP5E6HcKSSStP3bJgrE6In5WKxVUvJ8XGpWWYs2xZHWqUwzCtGgEtBcxyd57KBFDPFoUfNzdaHCNg==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/browser-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-3.0.0.tgz", + "integrity": "sha512-kGXtLh29jMwqKaskz5xeDLtCtN1KBz/DbQSqmvH7QdJiyGRC7RAM8PPg6gvUiNMa+wVnaxS9eSmEtP/f5ajOVw==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", + "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/buildcheck": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.7.tgz", + "integrity": "sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA==", + "optional": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/classic-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-3.0.0.tgz", + "integrity": "sha512-yGy8j8LjPbN0Bh3+ygmyYvrmskVita92pD/zCoalfcC9XxZj6iDtZTAnz+ot7GG8p9KLTG+MZ84tSA4AhkgVZQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compress-commons": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz", + "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==", + "license": "MIT", + "dependencies": { + "crc-32": "^1.2.0", + "crc32-stream": "^6.0.0", + "is-stream": "^2.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/copy-anything": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.1.0.tgz", + "integrity": "sha512-ufbM3smX/Jbnpk5wcQjzd1MgBpzmqfNETUAyZNrGwU9foRlyHoGzMMBBCRzEhQLBjZfFDE1W2ufPXX2vdWkV8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cpu-features": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz", + "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "buildcheck": "~0.0.6", + "nan": "^2.19.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz", + "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==", + "license": "MIT", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/cross-fetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", + "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/docker-compose": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-1.4.2.tgz", + "integrity": "sha512-rPHigTKGaEHpkUmfd69QgaOp+Os5vGJwG/Ry8lcr8W/382AmI+z/D7qoa9BybKIkqNppaIbs8RYeHSevdQjWww==", + "license": "MIT", + "dependencies": { + "yaml": "^2.2.2" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/docker-modem": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.7.tgz", + "integrity": "sha512-XJgGhoR/CLpqshm4d3L7rzH6t8NgDFUIIpztYlLHIApeJjMZKYJMz2zxPsYxnejq5h3ELYSw/RBsi3t5h7gNTA==", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.1.1", + "readable-stream": "^3.5.0", + "split-ca": "^1.0.1", + "ssh2": "^1.15.0" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/docker-modem/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/dockerode": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-5.0.1.tgz", + "integrity": "sha512-avsq/xk4YPIrn0CgleX5bjT9Y8IT1p9PxrNQ++RBQ2WEyFfHCTDsT9kmyxz+H/axnjAwg8wJWEIuPGOUuNupiA==", + "license": "Apache-2.0", + "dependencies": { + "@balena/dockerignore": "^1.0.2", + "@grpc/grpc-js": "^1.11.1", + "@grpc/proto-loader": "^0.7.13", + "docker-modem": "^5.0.7", + "protobufjs": "^7.3.2", + "tar-fs": "^2.1.4" + }, + "engines": { + "node": ">= 14.17" + } + }, + "node_modules/dockerode/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/dockerode/node_modules/tar-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz", + "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/dockerode/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/effect": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.22.1.tgz", + "integrity": "sha512-TNoXushmPOBAjJlthF5d2QwnX2xBPEtcNJr5XKNKbRLbDvBcOYkXlYDfvGfSA0zriwLFuCll5MDtNMAdZL17PQ==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/events-universal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz", + "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==", + "license": "Apache-2.0", + "dependencies": { + "bare-events": "^2.7.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fast-copy": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-4.1.1.tgz", + "integrity": "sha512-A4QTJmuiztpGtr6AMeJts9R4hbj2ZBUwtOaKrG6rw2y7t6+IaJKjz5M3XDs8BUznxDH43FVc6A0y/gWlMl4UtA==", + "license": "MIT" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "license": "MIT" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fetch-retry": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-6.0.0.tgz", + "integrity": "sha512-BUFj1aMubgib37I3v4q78fYo63Po7t4HUPTpQ6/QE6yK6cIQrP+W43FYToeTEyg5m2Y7eFUtijUuAv/PDlWuag==", + "license": "MIT" + }, + "node_modules/find-my-way-ts": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", + "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-tsconfig": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.3.tgz", + "integrity": "sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/graphql": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-17.0.2.tgz", + "integrity": "sha512-FRWbddMxfkjiB7z+aQDWIR+E34xo9I8c9mtK2RPv8PmMzKRvrdsreHL/Ui/TmwHJfhHChEtsFPyMHKI+xuarQQ==", + "license": "MIT", + "engines": { + "node": "^22.0.0 || ^24.0.0 || ^25.0.0 || >=26.0.0" + } + }, + "node_modules/graphql-http": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.23.0.tgz", + "integrity": "sha512-nQbRzoaqyNBVFG6X6r0mXC6S4X9eZOmmGz6t3l9H3MVKc2em3KeQAx+KhZKKFzj56ePDEncMOXeLu/hjO/4LQg==", + "license": "MIT", + "workspaces": [ + "implementations/**/*" + ], + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "graphql": ">=0.11 <=17" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", + "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/graphql-ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.2.1.tgz", + "integrity": "sha512-NMbPNeTwXpUOxmczdMtzEnynLNbbR267E9hRcJ81SSbQeIvZup3cMjbD1ZT3jpS2xkpxooisitvO7LZNOyz17Q==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@fastify/websocket": "^10 || ^11", + "crossws": "~0.3", + "graphql": "^15.10.1 || ^16 || ^17", + "ws": "^8" + }, + "peerDependenciesMeta": { + "@fastify/websocket": { + "optional": true + }, + "crossws": { + "optional": true + }, + "ws": { + "optional": true + } + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", + "license": "MIT" + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "license": "MIT", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/level": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-10.0.0.tgz", + "integrity": "sha512-aZJvdfRr/f0VBbSRF5C81FHON47ZsC2TkGxbBezXpGGXAUEL/s6+GP73nnhAYRSCIqUNsmJjfeOF4lzRDKbUig==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "browser-level": "^3.0.0", + "classic-level": "^3.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/level" + } + }, + "node_modules/level-supports": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-6.2.0.tgz", + "integrity": "sha512-QNxVXP0IRnBmMsJIh+sb2kwNCYcKciQZJEt+L1hPCHrKNELllXhvrlClVHXBYZVT+a7aTSM6StgNXdAldoab3w==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/maybe-combine-errors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/maybe-combine-errors/-/maybe-combine-errors-1.0.0.tgz", + "integrity": "sha512-eefp6IduNPT6fVdwPp+1NgD0PML1NU5P6j1Mj5nz1nidX8/sWY7119WL8vTAHgqfsY74TzW0w1XPgdYEKkGZ5A==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, + "node_modules/mock-socket": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz", + "integrity": "sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/msgpackr": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.12.1.tgz", + "integrity": "sha512-4EUH9tQHnMmEgzW/MdAP0KIfa1T9AF+htl0ffe2n5vb2EKn9y2co8ccpgWko6S52Jy1PQZKwRnx5/KkYjtd9MQ==", + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.4.tgz", + "integrity": "sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4" + } + }, + "node_modules/multipasta": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.8.tgz", + "integrity": "sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==", + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.28.0.tgz", + "integrity": "sha512-fTsDz99OTq2sVePhGdp4qQhggZFtKr64ZNVyVajRKtMOkJxYekplBh577PiJB12v/D3s2E5cGtOI45LWp6rnLQ==", + "license": "MIT", + "optional": true + }, + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "license": "MIT" + }, + "node_modules/nock": { + "version": "13.5.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", + "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "propagate": "^2.0.0" + }, + "engines": { + "node": ">= 10.13" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optimism": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.1.tgz", + "integrity": "sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==", + "license": "MIT", + "dependencies": { + "@wry/caches": "^1.0.0", + "@wry/context": "^0.7.0", + "@wry/trie": "^0.5.0", + "tslib": "^2.3.0" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pino": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.3.1.tgz", + "integrity": "sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==", + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^4.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz", + "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==", + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-pretty": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-13.1.3.tgz", + "integrity": "sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==", + "license": "MIT", + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^4.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pump": "^3.0.0", + "secure-json-parse": "^4.0.0", + "sonic-boom": "^4.0.1", + "strip-json-comments": "^5.0.2" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "license": "MIT" + }, + "node_modules/postcss": { + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.18", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/process-warning": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.1.0.tgz", + "integrity": "sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/propagate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proper-lockfile/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/properties-reader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/properties-reader/-/properties-reader-3.0.1.tgz", + "integrity": "sha512-WPn+h9RGEExOKdu4bsF4HksG/uzd3cFq3MFtq8PsFeExPse5Ha/VOjQNyHhjboBFwGXGev6muJYTSPAOkROq2g==", + "license": "MIT", + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "mkdirp": "^3.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/properties?sponsor=1" + } + }, + "node_modules/protobufjs": { + "version": "7.6.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz", + "integrity": "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.5", + "@protobufjs/eventemitter": "^1.1.1", + "@protobufjs/fetch": "^1.1.1", + "@protobufjs/float": "^1.0.2", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.1", + "@types/node": ">=13.7.0", + "long": "^5.3.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/rollup": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.1.tgz", + "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.1", + "@rollup/rollup-android-arm64": "4.63.1", + "@rollup/rollup-darwin-arm64": "4.63.1", + "@rollup/rollup-darwin-x64": "4.63.1", + "@rollup/rollup-freebsd-arm64": "4.63.1", + "@rollup/rollup-freebsd-x64": "4.63.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.1", + "@rollup/rollup-linux-arm-musleabihf": "4.63.1", + "@rollup/rollup-linux-arm64-gnu": "4.63.1", + "@rollup/rollup-linux-arm64-musl": "4.63.1", + "@rollup/rollup-linux-loong64-gnu": "4.63.1", + "@rollup/rollup-linux-loong64-musl": "4.63.1", + "@rollup/rollup-linux-ppc64-gnu": "4.63.1", + "@rollup/rollup-linux-ppc64-musl": "4.63.1", + "@rollup/rollup-linux-riscv64-gnu": "4.63.1", + "@rollup/rollup-linux-riscv64-musl": "4.63.1", + "@rollup/rollup-linux-s390x-gnu": "4.63.1", + "@rollup/rollup-linux-x64-gnu": "4.63.1", + "@rollup/rollup-linux-x64-musl": "4.63.1", + "@rollup/rollup-openbsd-x64": "4.63.1", + "@rollup/rollup-openharmony-arm64": "4.63.1", + "@rollup/rollup-win32-arm64-msvc": "4.63.1", + "@rollup/rollup-win32-ia32-msvc": "4.63.1", + "@rollup/rollup-win32-x64-gnu": "4.63.1", + "@rollup/rollup-win32-x64-msvc": "4.63.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/scale-ts": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.1.tgz", + "integrity": "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==", + "license": "MIT", + "optional": true + }, + "node_modules/secure-json-parse": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.1.0.tgz", + "integrity": "sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smoldot": { + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.26.tgz", + "integrity": "sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==", + "license": "GPL-3.0-or-later WITH Classpath-exception-2.0", + "optional": true, + "dependencies": { + "ws": "^8.8.1" + } + }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-ca": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", + "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", + "license": "ISC" + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/ssh-remote-port-forward": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ssh-remote-port-forward/-/ssh-remote-port-forward-1.0.4.tgz", + "integrity": "sha512-x0LV1eVDwjf1gmG7TTnfqIzf+3VPRz7vrNIjX6oYLbeCrf/PeVY6hkT68Mg+q02qXxQhrLjB0jfgvhevoCRmLQ==", + "license": "MIT", + "dependencies": { + "@types/ssh2": "^0.5.48", + "ssh2": "^1.4.0" + } + }, + "node_modules/ssh-remote-port-forward/node_modules/@types/ssh2": { + "version": "0.5.52", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-0.5.52.tgz", + "integrity": "sha512-lbLLlXxdCZOSJMCInKH2+9V/77ET2J6NPQHpFI0kda61Dd1KglJs+fPQBchizmzYSOJBgdTajhPqBO1xxLywvg==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/ssh2-streams": "*" + } + }, + "node_modules/ssh2": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.17.0.tgz", + "integrity": "sha512-wPldCk3asibAjQ/kziWQQt1Wh3PgDFpC0XpwclzKcdT1vql6KeYxf5LIt4nlFkUeR8WuphYMKqUA56X4rjbfgQ==", + "hasInstallScript": true, + "dependencies": { + "asn1": "^0.2.6", + "bcrypt-pbkdf": "^1.0.2" + }, + "engines": { + "node": ">=10.16.0" + }, + "optionalDependencies": { + "cpu-features": "~0.0.10", + "nan": "^2.23.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/streamx": { + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.28.1.tgz", + "integrity": "sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==", + "license": "MIT", + "dependencies": { + "events-universal": "^1.0.0", + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz", + "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superjson": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz", + "integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==", + "license": "MIT", + "dependencies": { + "copy-anything": "^4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tar-fs": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.3.tgz", + "integrity": "sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.1.tgz", + "integrity": "sha512-nqsEO8zLZJvrOMdEwkA0QdCLFbetHMn95Zqu4fKwX+hkaTWJPZZOrxx/PwtxoK0MMGQmBQNRW3CPs8IFYQz4cQ==", + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "bare-fs": "^4.5.5", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/teex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", + "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", + "license": "MIT", + "dependencies": { + "streamx": "^2.12.5" + } + }, + "node_modules/testcontainers": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-12.1.0.tgz", + "integrity": "sha512-YjDLqIITuhGLMnM10yhg3oV6lIG5IMpz1R1DPBZoOOks83q7i7IVpeSWRTiyl7roozjiyLmwIoLK/KY8OnZmIA==", + "license": "MIT", + "dependencies": { + "@balena/dockerignore": "^1.0.2", + "@types/dockerode": "^4.0.1", + "archiver": "^7.0.1", + "async-lock": "^1.4.1", + "byline": "^5.0.0", + "debug": "^4.4.3", + "docker-compose": "^1.4.2", + "dockerode": "^5.0.1", + "get-port": "^5.1.1", + "proper-lockfile": "^4.1.2", + "properties-reader": "^3.0.1", + "ssh-remote-port-forward": "^1.0.4", + "tar-fs": "^3.1.3", + "tmp": "^0.2.7", + "undici": "^8.9.0" + }, + "engines": { + "node": ">= 22.22" + } + }, + "node_modules/text-decoder": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz", + "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==", + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, + "node_modules/thread-stream": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz", + "integrity": "sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==", + "license": "MIT", + "dependencies": { + "real-require": "^1.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/thread-stream/node_modules/real-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz", + "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tmp": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", + "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tsx": { + "version": "4.20.6", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz", + "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.10.2.tgz", + "integrity": "sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==", + "license": "MIT", + "engines": { + "node": ">=22.19.0" + } + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/vite": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.0.tgz", + "integrity": "sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.0", + "@vitest/mocker": "4.1.0", + "@vitest/pretty-format": "4.1.0", + "@vitest/runner": "4.1.0", + "@vitest/snapshot": "4.1.0", + "@vitest/spy": "4.1.0", + "@vitest/utils": "4.1.0", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.0.3", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.0", + "@vitest/browser-preview": "4.1.0", + "@vitest/browser-webdriverio": "4.1.0", + "@vitest/ui": "4.1.0", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/web-worker": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.5.0.tgz", + "integrity": "sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==", + "license": "Apache-2.0" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/zip-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz", + "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", + "license": "MIT", + "dependencies": { + "archiver-utils": "^5.0.0", + "compress-commons": "^6.0.2", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/contracts/v2/package.json b/contracts/v2/package.json new file mode 100644 index 0000000..b21f343 --- /dev/null +++ b/contracts/v2/package.json @@ -0,0 +1,45 @@ +{ + "name": "@zswap-da/shielded-night-v2", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "typecheck": "tsc --noEmit", + "test:unit": "vitest run", + "deploy": "node --import tsx scripts/deploy.ts", + "verify:deployment": "node --import tsx scripts/verify-deployment.ts" + }, + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/testkit-js": "5.0.0-beta.7", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3", + "@midnightntwrk/wallet-sdk": "2.0.0-beta.2", + "@scure/bip39": "2.0.1", + "pino": "10.3.1", + "rxjs": "7.8.2" + }, + "devDependencies": { + "@types/node": "24.10.0", + "tsx": "4.20.6", + "typescript": "5.9.3", + "vite": "6.4.1", + "vitest": "4.1.0" + }, + "overrides": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/platform-js": "3.0.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3", + "@midnightntwrk/wallet-sdk": "2.0.0-beta.2" + }, + "engines": { + "node": ">=22.12" + } +} diff --git a/contracts/v2/scripts/deploy.ts b/contracts/v2/scripts/deploy.ts new file mode 100644 index 0000000..a97d48c --- /dev/null +++ b/contracts/v2/scripts/deploy.ts @@ -0,0 +1,136 @@ +/** Local-host deployment for the compiler 0.34.0 stagenet profile. */ +import '../../../scripts/load-env.js'; +import { CompiledContract } from '@midnight-ntwrk/compact-js'; +import { deployContract } from '@midnight-ntwrk/midnight-js-contracts'; +import { setNetworkId } from '@midnight-ntwrk/midnight-js-network-id'; +import { MidnightWalletProvider, initializeMidnightProviders, syncWallet } from '@midnight-ntwrk/testkit-js'; +import { NetworkId, validateMnemonic } from '@midnightntwrk/wallet-sdk'; +import { mnemonicToSeedSync } from '@scure/bip39'; +import { Contract } from '../managed/contract/index.js'; +import { + artifactSha256, + assertMaintenanceAuthorityKey, + COMPATIBILITY, + createWalletLogger, + MANAGED_DIRECTORY, + mergeVerificationRecord, + preflightRecordOutput, + reportConfirmedDeployment, + sourceCommit, + stagenet, + verifyAddress, + withDurableMaintenanceKey, + withSyncedDeploymentWallet, + writeRecord, +} from './profile.js'; +import { loadWalletEnvFile } from './load-wallet-env.js'; + +loadWalletEnvFile(); + +function deploymentSeed(): string { + const mnemonic = process.env.MN_MNEMONIC?.trim().replace(/\s+/g, ' '); + if (mnemonic) { + if (!validateMnemonic(mnemonic)) throw new Error('MN_MNEMONIC is not a valid BIP-39 phrase.'); + return Buffer.from(mnemonicToSeedSync(mnemonic)).toString('hex'); + } + const seed = process.env.MN_SEED?.trim(); + if (!seed || !/^[0-9a-f]+$/i.test(seed) || seed.length % 2 !== 0) { + throw new Error('Set MN_MNEMONIC or an even-length hexadecimal MN_SEED in the repo-root .env or shell.'); + } + return seed; +} + +async function main() { + const requested = process.env.MN_ENV?.trim() || 'stagenet'; + if (requested !== 'stagenet') throw new Error('The v2 deployment command only supports MN_ENV=stagenet.'); + const profile = stagenet(); + const environment = { ...profile, walletNetworkId: NetworkId.NetworkId.StageNet }; + // All provenance and output checks happen before wallet startup or a funded + // transaction. After deployContract resolves, the address is printed before + // any record or indexer operation that can fail. + const deploymentSourceCommit = sourceCommit(); + const deploymentArtifactSha256 = artifactSha256(); + preflightRecordOutput(); + await withDurableMaintenanceKey({ + sourceCommit: deploymentSourceCommit, + artifactSha256: deploymentArtifactSha256, + }, async (maintenanceKey) => { + setNetworkId(profile.networkId); + + // testkit-js logs the seed at info level; deployment logging must remain + // silent because structured redaction cannot remove an interpolated secret. + const wallet = await MidnightWalletProvider.build(createWalletLogger(), environment, deploymentSeed()); + await withSyncedDeploymentWallet(wallet, syncWallet, async () => { + const providers = initializeMidnightProviders(wallet, environment, { + privateStateStoreName: 'shielded-night-v2-stagenet', + zkConfigPath: MANAGED_DIRECTORY, + }); + const compiled = CompiledContract.make('shielded-night-v2', Contract).pipe( + CompiledContract.withVacantWitnesses, + CompiledContract.withCompiledFileAssets(MANAGED_DIRECTORY), + ); + // The generated contract declaration is deliberately kept inside this + // isolated profile. Cast at the SDK seam so its nominal types cannot pull + // a second Compact runtime identity into another package. + const deployed = await deployContract(providers as never, { + compiledContract: compiled, + args: ['Shielded Night', 'sNight', 6n], + signingKey: maintenanceKey.signingKey, + } as never); + const transaction = deployed.deployTxData.public; + const address = reportConfirmedDeployment(transaction); + const provenance = { + schemaVersion: 2, + recordKind: 'deployment', + network: { + name: 'stagenet', + networkId: profile.networkId, + node: profile.node, + indexer: profile.indexer, + }, + contractAddress: address, + sourceCommit: deploymentSourceCommit, + compatibility: COMPATIBILITY, + artifactSha256: deploymentArtifactSha256, + deploymentTransaction: { + id: transaction.txId, + blockHeight: String(transaction.blockHeight), + blockHash: transaction.blockHash, + blockTimestamp: String(transaction.blockTimestamp), + }, + }; + const pendingRecord = { + ...provenance, + verificationStatus: 'pending', + maintenanceAuthority: { + status: 'key-prepersisted-not-yet-read', + verifyingKey: maintenanceKey.verifyingKey, + }, + recordedAt: new Date().toISOString(), + }; + const pendingPath = writeRecord(pendingRecord, address); + console.log(`[deploy] confirmation record ${pendingPath}`); + + const verified = await verifyAddress(providers.publicDataProvider, address); + assertMaintenanceAuthorityKey(verified, maintenanceKey.verifyingKey); + const verifiedAt = new Date().toISOString(); + const record = mergeVerificationRecord({ + existing: pendingRecord, + network: provenance.network, + verified, + verificationSourceCommit: deploymentSourceCommit, + verificationArtifactSha256: deploymentArtifactSha256, + verifiedAt, + }); + const recordPath = writeRecord(record, verified.address); + console.log(`[deploy] verified stagenet contract ${verified.address}`); + console.log(`[deploy] maintenance authority locked=${verified.authority.locked}`); + console.log(`[deploy] record ${recordPath}`); + }); + }); +} + +main().catch((error) => { + console.error('[deploy:v2] failed:', error instanceof Error ? (error.stack ?? error.message) : error); + process.exitCode = 1; +}); diff --git a/contracts/v2/scripts/load-wallet-env.ts b/contracts/v2/scripts/load-wallet-env.ts new file mode 100644 index 0000000..6e099f6 --- /dev/null +++ b/contracts/v2/scripts/load-wallet-env.ts @@ -0,0 +1,31 @@ +import { readFileSync } from 'node:fs'; +import path from 'node:path'; + +/** + * Load one explicitly selected wallet environment file without printing it. + * Existing shell/repo-root MN_MNEMONIC or MN_SEED values keep precedence. + * Wallet CLI files use WALLET_SEED; deployment scripts use MN_SEED. + */ +export function loadWalletEnvFile(): void { + const configured = process.env.MN_WALLET_ENV_FILE?.trim(); + if (!configured) return; + const entries = new Map(); + for (const rawLine of readFileSync(path.resolve(configured), 'utf8').split('\n')) { + const line = rawLine.trim(); + if (!line || line.startsWith('#')) continue; + const separator = line.indexOf('='); + if (separator < 1) continue; + const key = line.slice(0, separator).trim(); + let value = line.slice(separator + 1).trim(); + if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) { + value = value.slice(1, -1); + } + if (value) entries.set(key, value); + } + if (!process.env.MN_MNEMONIC && entries.has('MN_MNEMONIC')) { + process.env.MN_MNEMONIC = entries.get('MN_MNEMONIC'); + } + if (!process.env.MN_SEED) { + process.env.MN_SEED = entries.get('MN_SEED') ?? entries.get('WALLET_SEED'); + } +} diff --git a/contracts/v2/scripts/profile.ts b/contracts/v2/scripts/profile.ts new file mode 100644 index 0000000..6cbd26b --- /dev/null +++ b/contracts/v2/scripts/profile.ts @@ -0,0 +1,537 @@ +import { createHash } from 'node:crypto'; +import { execFileSync } from 'node:child_process'; +import { + closeSync, + constants, + existsSync, + fchmodSync, + fstatSync, + fsyncSync, + mkdirSync, + openSync, + readFileSync, + readdirSync, + renameSync, + statSync, + unlinkSync, + writeFileSync, +} from 'node:fs'; +import path from 'node:path'; +import { + sampleSigningKey, + signatureVerifyingKey, + type SignatureVerifyingKey, + type SigningKey, +} from '@midnightntwrk/onchain-runtime-v4'; +import { unshieldedToken } from '@midnightntwrk/ledger-v9'; +import pino from 'pino'; +import { ledger } from '../managed/contract/index.js'; + +export const COMPATIBILITY = { + compiler: '0.34.0', + language: '0.26.0', + compactJs: '2.5.5-rc.8', + compactRuntime: '0.19.0', + midnightJs: '5.0.0-beta.7', + ledger: '1.0.0-rc.3', + onchainRuntime: '4.0.0-rc.3', + walletSdk: '2.0.0-beta.2', +} as const; + +export const REPOSITORY_ROOT = path.resolve(new URL(import.meta.url).pathname, '..', '..', '..', '..'); +export const MANAGED_DIRECTORY = path.resolve(REPOSITORY_ROOT, 'contracts', 'v2', 'managed'); +export const DEFAULT_WALLET_SYNC_TIMEOUT_MS = 300_000; +const MIN_WALLET_SYNC_TIMEOUT_MS = 30_000; +const MAX_WALLET_SYNC_TIMEOUT_MS = 900_000; + +export interface DeploymentWalletFundingState { + readonly unshielded: { readonly balances: Readonly> }; + readonly dust: { balance(at: Date): bigint }; +} + +export function deploymentWalletSyncTimeoutMs(): number { + const configured = process.env.MN_WALLET_SYNC_TIMEOUT_MS?.trim(); + if (!configured) return DEFAULT_WALLET_SYNC_TIMEOUT_MS; + if (!/^\d+$/.test(configured)) { + throw new Error('MN_WALLET_SYNC_TIMEOUT_MS must be an integer number of milliseconds.'); + } + const timeout = Number(configured); + if (!Number.isSafeInteger(timeout) || timeout < MIN_WALLET_SYNC_TIMEOUT_MS || timeout > MAX_WALLET_SYNC_TIMEOUT_MS) { + throw new Error( + `MN_WALLET_SYNC_TIMEOUT_MS must be between ${MIN_WALLET_SYNC_TIMEOUT_MS} and ${MAX_WALLET_SYNC_TIMEOUT_MS} milliseconds.`, + ); + } + return timeout; +} + +export function assertDeploymentWalletFunded(state: DeploymentWalletFundingState): void { + const night = state.unshielded.balances[unshieldedToken().raw] ?? 0n; + if (night <= 0n) throw new Error('Deployment wallet has no available NIGHT after synchronization.'); + if (state.dust.balance(new Date()) <= 0n) { + throw new Error('Deployment wallet has no available DUST after synchronization.'); + } +} + +export async function withSyncedDeploymentWallet( + provider: { + readonly wallet: TWallet; + start(waitForFundsInWallet?: boolean): Promise; + stop(): Promise; + }, + sync: (wallet: TWallet, throttleTime?: number, timeout?: number) => Promise, + action: () => Promise, +): Promise { + const timeout = deploymentWalletSyncTimeoutMs(); + try { + await provider.start(false); + const state = await sync(provider.wallet, 2_000, timeout); + assertDeploymentWalletFunded(state); + return await action(); + } finally { + await provider.stop().catch(() => undefined); + } +} + +interface MaintenanceKeyRecord { + readonly schemaVersion: 1; + readonly recordKind: 'shielded-night-maintenance-signing-key'; + readonly network: 'stagenet'; + readonly signingKey: SigningKey; + readonly verifyingKey: SignatureVerifyingKey; + readonly createdAt: string; + readonly createdFor: { + readonly sourceCommit: string; + readonly artifactSha256: string; + }; +} + +export interface PreparedMaintenanceKey { + readonly path: string; + readonly signingKey: SigningKey; + readonly verifyingKey: SignatureVerifyingKey; + readonly created: boolean; +} + +const isSignatureKind = (value: unknown): value is SigningKey['tag'] => + value === 'schnorr' || value === 'ecdsa'; + +function normalizeSigningKey(value: unknown): SigningKey { + if (!value || typeof value !== 'object') throw new Error('Maintenance key file has no signing key.'); + const candidate = value as { tag?: unknown; value?: unknown }; + if (!isSignatureKind(candidate.tag) || typeof candidate.value !== 'string' || !/^[0-9a-f]{64}$/i.test(candidate.value)) { + throw new Error('Maintenance key file contains an invalid signing key.'); + } + return { tag: candidate.tag, value: candidate.value.toLowerCase() }; +} + +function normalizeVerifyingKey(value: unknown): SignatureVerifyingKey { + if (!value || typeof value !== 'object') throw new Error('Maintenance key file has no verifying key.'); + const candidate = value as { tag?: unknown; value?: unknown }; + if (!isSignatureKind(candidate.tag) || typeof candidate.value !== 'string' || !/^[0-9a-f]{64}$/i.test(candidate.value)) { + throw new Error('Maintenance key file contains an invalid verifying key.'); + } + return { tag: candidate.tag, value: candidate.value.toLowerCase() }; +} + +const sameVerifyingKey = (left: SignatureVerifyingKey, right: SignatureVerifyingKey): boolean => + left.tag === right.tag && left.value.toLowerCase() === right.value.toLowerCase(); + +export function maintenanceKeyPath(): string { + const configured = process.env.MN_MAINTENANCE_KEY_FILE?.trim(); + if (!configured) { + throw new Error('Set MN_MAINTENANCE_KEY_FILE to an explicit durable, private maintenance-key file path.'); + } + if (!path.isAbsolute(configured)) { + throw new Error('MN_MAINTENANCE_KEY_FILE must be an absolute path on durable storage.'); + } + return configured; +} + +function readMaintenanceKeyRecord(destination: string): MaintenanceKeyRecord { + let file: number | undefined; + try { + file = openSync(destination, constants.O_RDONLY | constants.O_NOFOLLOW); + const stat = fstatSync(file); + if (!stat.isFile()) throw new Error(`Maintenance key path is not a regular file: ${destination}`); + if ((stat.mode & 0o777) !== 0o600) { + throw new Error(`Maintenance key file must have mode 0600: ${destination}`); + } + const parsed: unknown = JSON.parse(readFileSync(file, 'utf8')); + if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) { + throw new Error('Maintenance key file must contain a JSON object.'); + } + const record = parsed as Partial; + if (record.schemaVersion !== 1 || record.recordKind !== 'shielded-night-maintenance-signing-key' || record.network !== 'stagenet') { + throw new Error('Maintenance key file has an unsupported schema or network.'); + } + if (typeof record.createdAt !== 'string' || !record.createdFor || + !/^[0-9a-f]{40}$/i.test(record.createdFor.sourceCommit ?? '') || + !/^[0-9a-f]{64}$/i.test(record.createdFor.artifactSha256 ?? '')) { + throw new Error('Maintenance key file has invalid creation provenance.'); + } + const signingKey = normalizeSigningKey(record.signingKey); + const verifyingKey = normalizeVerifyingKey(record.verifyingKey); + let derived: SignatureVerifyingKey; + try { + derived = signatureVerifyingKey(signingKey); + } catch { + throw new Error('Maintenance key file contains a signing key rejected by the pinned runtime.'); + } + if (!sameVerifyingKey(derived, verifyingKey)) { + throw new Error('Maintenance key file verifying key does not match its signing key.'); + } + return { + schemaVersion: 1, + recordKind: 'shielded-night-maintenance-signing-key', + network: 'stagenet', + signingKey, + verifyingKey, + createdAt: record.createdAt, + createdFor: { + sourceCommit: record.createdFor.sourceCommit.toLowerCase(), + artifactSha256: record.createdFor.artifactSha256.toLowerCase(), + }, + }; + } catch (error) { + if (error instanceof SyntaxError) throw new Error('Maintenance key file contains malformed JSON.'); + throw error; + } finally { + if (file !== undefined) closeSync(file); + } +} + +export function prepareMaintenanceSigningKey(input: { + sourceCommit: string; + artifactSha256: string; +}): PreparedMaintenanceKey { + const destination = maintenanceKeyPath(); + if (existsSync(destination)) { + const existing = readMaintenanceKeyRecord(destination); + return { path: destination, signingKey: existing.signingKey, verifyingKey: existing.verifyingKey, created: false }; + } + + mkdirSync(path.dirname(destination), { recursive: true, mode: 0o700 }); + const signingKey = sampleSigningKey('schnorr'); + const verifyingKey = signatureVerifyingKey(signingKey); + const record: MaintenanceKeyRecord = { + schemaVersion: 1, + recordKind: 'shielded-night-maintenance-signing-key', + network: 'stagenet', + signingKey, + verifyingKey, + createdAt: new Date().toISOString(), + createdFor: { + sourceCommit: input.sourceCommit, + artifactSha256: input.artifactSha256, + }, + }; + let file: number | undefined; + try { + file = openSync( + destination, + constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, + 0o600, + ); + fchmodSync(file, 0o600); + writeFileSync(file, `${JSON.stringify(record, null, 2)}\n`, 'utf8'); + fsyncSync(file); + } finally { + if (file !== undefined) closeSync(file); + } + + let directory: number | undefined; + try { + directory = openSync(path.dirname(destination), constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW); + fsyncSync(directory); + } finally { + if (directory !== undefined) closeSync(directory); + } + + // The deployer never trusts its own write. Close and reopen the durable file, + // enforce its permissions, and derive the public identity again before any + // wallet is started or transaction can be submitted. + const persisted = readMaintenanceKeyRecord(destination); + if (!sameVerifyingKey(persisted.verifyingKey, verifyingKey) || + persisted.signingKey.tag !== signingKey.tag || persisted.signingKey.value !== signingKey.value) { + throw new Error('Maintenance signing key did not survive durable write/read-back validation.'); + } + return { path: destination, signingKey: persisted.signingKey, verifyingKey: persisted.verifyingKey, created: true }; +} + +/** Run wallet startup/submission only after durable key creation and read-back. */ +export async function withDurableMaintenanceKey( + input: { sourceCommit: string; artifactSha256: string }, + action: (key: PreparedMaintenanceKey) => Promise, +): Promise { + const key = prepareMaintenanceSigningKey(input); + return await action(key); +} + +/** + * testkit-js interpolates the wallet seed into an info message while building + * a wallet. Keep every log level disabled; field redaction cannot protect an + * already-formatted message. + */ +export function createWalletLogger(destination?: pino.DestinationStream): pino.Logger { + return pino({ level: 'silent' }, destination); +} + +const envUrl = (name: string, fallback: string): string => { + const value = process.env[name]?.trim(); + return value || fallback; +}; + +export const stagenet = () => ({ + walletNetworkId: 'stagenet' as const, + networkId: 'stagenet', + indexer: envUrl('MN_INDEXER_URL', 'https://indexer.stagenet.shielded.tools/api/v4/graphql'), + indexerWS: envUrl('MN_INDEXER_WS_URL', 'wss://indexer.stagenet.shielded.tools/api/v4/graphql/ws'), + node: envUrl('MN_NODE_URL', 'https://rpc.stagenet.shielded.tools'), + nodeWS: envUrl('MN_NODE_WS_URL', 'wss://rpc.stagenet.shielded.tools'), + proofServer: envUrl('MN_PROOF_SERVER_URL', 'http://127.0.0.1:6300'), + faucet: undefined, +}); + +const bytesEqual = (left: Uint8Array, right: Uint8Array): boolean => + left.length === right.length && left.every((value, index) => value === right[index]); + +function filesBelow(directory: string): string[] { + return readdirSync(directory).flatMap((name) => { + const file = path.join(directory, name); + return statSync(file).isDirectory() ? filesBelow(file) : [file]; + }); +} + +export function artifactSha256(): string { + const hash = createHash('sha256'); + for (const file of filesBelow(MANAGED_DIRECTORY).sort()) { + hash.update(path.relative(MANAGED_DIRECTORY, file)); + hash.update('\0'); + hash.update(readFileSync(file)); + hash.update('\0'); + } + return hash.digest('hex'); +} + +export function sourceCommit(): string { + const configured = process.env.SHIELDED_NIGHT_COMMIT?.trim(); + const commit = configured || execFileSync('git', ['rev-parse', 'HEAD'], { + cwd: REPOSITORY_ROOT, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'ignore'], + }).trim(); + if (!/^[0-9a-f]{40}$/i.test(commit)) { + throw new Error('SHIELDED_NIGHT_COMMIT/source revision must be a full 40-character hexadecimal Git SHA.'); + } + return commit.toLowerCase(); +} + +export interface Verification { + readonly address: string; + readonly verifierKeys: Record; + readonly metadata: { name: string; symbol: string; decimals: number }; + readonly authority: { + locked: boolean; + committeeSize: number; + committee: SignatureVerifyingKey[]; + threshold: string; + counter: string; + }; +} + +export async function verifyAddress( + publicDataProvider: { queryContractState(address: string): Promise }, + address: string, +): Promise { + const normalizedAddress = address.trim().replace(/^0x/i, '').toLowerCase(); + if (!/^[0-9a-f]{64}$/.test(normalizedAddress)) throw new Error('Contract address must be exactly 32 bytes of hex.'); + const state = await publicDataProvider.queryContractState(normalizedAddress); + if (!state) throw new Error(`No contract state found at ${normalizedAddress}.`); + + const localOperations = readdirSync(path.join(MANAGED_DIRECTORY, 'keys')) + .filter((file) => file.endsWith('.verifier')) + .map((file) => file.slice(0, -'.verifier'.length)) + .sort(); + const chainOperations = state.operations() + .map((operation: string | Uint8Array) => typeof operation === 'string' ? operation : Buffer.from(operation).toString()) + .sort(); + if (localOperations.join('\0') !== chainOperations.join('\0')) { + throw new Error('On-chain circuit set differs from the compiler 0.34.0 artifact set.'); + } + + const verifierKeys: Record = {}; + for (const operation of localOperations) { + const local = new Uint8Array(readFileSync(path.join(MANAGED_DIRECTORY, 'keys', `${operation}.verifier`))); + const chain = state.operation(operation)?.verifierKey as Uint8Array | undefined; + if (!chain || !bytesEqual(local, chain)) throw new Error(`Verifier key mismatch for ${operation}.`); + verifierKeys[operation] = createHash('sha256').update(local).digest('hex'); + } + + const data = ledger(state.data); + if (data._name !== 'Shielded Night' || data._symbol !== 'sNight' || data._decimals !== 6n) { + throw new Error('On-chain Shielded NIGHT metadata does not match the release metadata.'); + } + const authority = state.maintenanceAuthority; + const committeeSize = authority.committee.length; + const committee = authority.committee.map((key: unknown) => normalizeVerifyingKey(key)); + const threshold = BigInt(authority.threshold); + return { + address: normalizedAddress, + verifierKeys, + metadata: { name: data._name, symbol: data._symbol, decimals: Number(data._decimals) }, + authority: { + locked: committeeSize === 0 && threshold > 0n, + committeeSize, + committee, + threshold: threshold.toString(), + counter: BigInt(authority.counter).toString(), + }, + }; +} + +export function assertMaintenanceAuthorityKey( + verification: Verification, + expected: SignatureVerifyingKey, +): void { + const { committee, threshold } = verification.authority; + if (committee.length !== 1 || threshold !== '1' || !sameVerifyingKey(committee[0], expected)) { + throw new Error('On-chain maintenance authority does not match the durably persisted signing key.'); + } +} + +export function recordPath(address: string): string { + const configured = process.env.DEPLOY_OUT?.trim(); + return configured + ? path.resolve(configured) + : path.resolve(REPOSITORY_ROOT, '.local', 'deployments', `v2-stagenet-${address}.json`); +} + +/** Prove the record directory is writable before a deployment can spend funds. */ +export function preflightRecordOutput(): void { + const destination = recordPath('preflight'); + if (existsSync(destination) && statSync(destination).isDirectory()) { + throw new Error(`Deployment record output is a directory: ${destination}`); + } + mkdirSync(path.dirname(destination), { recursive: true }); + const probe = `${destination}.write-test.${process.pid}`; + const renamedProbe = `${probe}.renamed`; + try { + writeFileSync(probe, '', { encoding: 'utf8', mode: 0o600, flag: 'wx' }); + renameSync(probe, renamedProbe); + } finally { + if (existsSync(probe)) unlinkSync(probe); + if (existsSync(renamedProbe)) unlinkSync(renamedProbe); + } +} + +export interface ConfirmedDeploymentTransaction { + readonly contractAddress: string; + readonly txId: string; +} + +/** Emit recovery identity before record/indexer work can fail. */ +export function reportConfirmedDeployment( + transaction: ConfirmedDeploymentTransaction, + log: (message: string) => void = console.log, +): string { + const address = transaction.contractAddress; + log(`[deploy] confirmed stagenet contract ${address}`); + log(`[deploy] confirmed transaction ${transaction.txId}`); + log(`STAGENET_ADDRESS=${address}`); + return address; +} + +function isRecord(value: unknown): value is Record { + return value != null && typeof value === 'object' && !Array.isArray(value); +} + +function priorVerificationHistory(existing: Record): Record[] { + if (Array.isArray(existing.verificationHistory)) { + return existing.verificationHistory.filter(isRecord); + } + if (isRecord(existing.verification)) return [existing.verification]; + if ( + existing.recordKind === 'verification-only' && + typeof existing.sourceCommit === 'string' && + typeof existing.artifactSha256 === 'string' && + typeof existing.verifiedAt === 'string' + ) { + return [{ + sourceCommit: existing.sourceCommit, + artifactSha256: existing.artifactSha256, + compatibility: existing.compatibility, + network: existing.network, + verifiedAt: existing.verifiedAt, + }]; + } + return []; +} + +export function mergeVerificationRecord(input: { + existing?: Record; + network: Record; + verified: Verification; + verificationSourceCommit: string; + verificationArtifactSha256: string; + verifiedAt: string; +}): Record { + const { existing = {}, network, verified, verificationSourceCommit, verificationArtifactSha256, verifiedAt } = input; + const existingAddress = typeof existing.contractAddress === 'string' + ? existing.contractAddress.replace(/^0x/i, '').toLowerCase() + : undefined; + if (existingAddress && existingAddress !== verified.address) { + throw new Error(`Existing deployment record address ${existingAddress} does not match verified address ${verified.address}.`); + } + + const verification = { + sourceCommit: verificationSourceCommit, + artifactSha256: verificationArtifactSha256, + compatibility: COMPATIBILITY, + network, + verifiedAt, + }; + const common = { + schemaVersion: 2, + contractAddress: verified.address, + verificationStatus: 'verified', + metadata: verified.metadata, + verifierKeys: verified.verifierKeys, + maintenanceAuthority: verified.authority, + verifiedAt, + verification, + verificationHistory: [...priorVerificationHistory(existing), verification], + }; + + const hasDeploymentProvenance = existing.recordKind === 'deployment' || + Object.prototype.hasOwnProperty.call(existing, 'deploymentTransaction'); + if (hasDeploymentProvenance) { + return { + ...existing, + ...common, + recordKind: 'deployment', + }; + } + + return { + ...common, + recordKind: 'verification-only', + }; +} + +export function readRecord(address: string): Record | undefined { + const destination = recordPath(address); + if (!existsSync(destination)) return undefined; + const value: unknown = JSON.parse(readFileSync(destination, 'utf8')); + return value != null && typeof value === 'object' && !Array.isArray(value) + ? value as Record + : undefined; +} + +export function writeRecord(record: Record, address: string): string { + const destination = recordPath(address); + mkdirSync(path.dirname(destination), { recursive: true }); + const temporary = `${destination}.tmp.${process.pid}`; + writeFileSync(temporary, `${JSON.stringify(record, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 }); + renameSync(temporary, destination); + return destination; +} diff --git a/contracts/v2/scripts/verify-deployment.ts b/contracts/v2/scripts/verify-deployment.ts new file mode 100644 index 0000000..514f955 --- /dev/null +++ b/contracts/v2/scripts/verify-deployment.ts @@ -0,0 +1,54 @@ +/** Read-only stagenet verifier for a compiler 0.34.0 Shielded NIGHT deployment. */ +import '../../../scripts/load-env.js'; +import { indexerPublicDataProvider } from '@midnight-ntwrk/midnight-js-indexer-public-data-provider'; +import { setNetworkId } from '@midnight-ntwrk/midnight-js-network-id'; +import { + artifactSha256, + mergeVerificationRecord, + readRecord, + sourceCommit, + stagenet, + verifyAddress, + writeRecord, +} from './profile.js'; + +async function main() { + const requested = process.env.MN_ENV?.trim() || 'stagenet'; + if (requested !== 'stagenet') throw new Error('The v2 verifier only supports MN_ENV=stagenet.'); + const address = process.env.CV_ADDRESS?.trim(); + if (!address) throw new Error('Set CV_ADDRESS to the stagenet Shielded NIGHT contract address.'); + const profile = stagenet(); + setNetworkId(profile.networkId); + const publicDataProvider = indexerPublicDataProvider({ + queryURL: profile.indexer, + subscriptionURL: profile.indexerWS, + }); + try { + const verified = await verifyAddress(publicDataProvider, address); + const existing = readRecord(verified.address) ?? {}; + const record = mergeVerificationRecord({ + existing, + network: { + name: 'stagenet', + networkId: profile.networkId, + node: profile.node, + indexer: profile.indexer, + }, + verified, + verificationSourceCommit: sourceCommit(), + verificationArtifactSha256: artifactSha256(), + verifiedAt: new Date().toISOString(), + }); + const recordPath = writeRecord(record, verified.address); + console.log(`[verify:v2] code and metadata match ${verified.address}`); + console.log(`[verify:v2] maintenance authority locked=${verified.authority.locked}`); + console.log(`[verify:v2] record ${recordPath}`); + } finally { + await publicDataProvider.dispose(); + } +} + +main().catch((error) => { + console.error('[verify:v2] failed:', error instanceof Error ? (error.stack ?? error.message) : error); + process.exitCode = 1; +}); diff --git a/contracts/v2/shielded-night.compact b/contracts/v2/shielded-night.compact new file mode 100644 index 0000000..a71831c --- /dev/null +++ b/contracts/v2/shielded-night.compact @@ -0,0 +1,420 @@ +// SPDX-License-Identifier: Apache-2.0 +// Pinned to the exact language version the deployed build was compiled with +// (toolchain 0.34.0, language 0.26.0, runtime 0.19.0). An exact pin is +// what makes the byte-exact reproduction in README "Verifying the deployment" +// meaningful: a different language version would refuse to compile rather than +// silently emit different artifacts. +pragma language_version 0.26; + +import CompactStandardLibrary; + +/** + * @title ShieldedNight + * @description A hash-keyed pool that converts native unshielded NIGHT into a + * shielded wrapper token and back, in two single-domain steps. A depositor holds + * a credit balance keyed by `hash(secret)`; depositing in either value domain adds + * credit, withdrawing in either domain removes it: + * + * balance[hash] = (deposited unshielded + deposited shielded, burnt) + * - (withdrawn unshielded + withdrawn shielded, minted) + * + * - Convert unshielded -> shielded: `depositUnshielded` then `withdrawShielded`. + * - Convert shielded -> unshielded: `depositShielded` then `withdrawUnshielded`. + * + * The underlying is native NIGHT (minted outside this contract). The shielded side + * is a contract-minted wrapper token with color `tokenType(WRAP_DOMAIN, self())`. + * Locked NIGHT backs unshielded withdrawals; the wrapper is elastic (minted on + * withdraw, burnt on deposit). + * + * @notice Every circuit touches a SINGLE value domain. This is deliberate: the + * wallet SDK does not yet support a combined shielded<->unshielded call, so a + * single atomic convert would fail to balance. Splitting into two same-domain calls + * keeps each step compatible with today's tooling. + * + * @dev CONCURRENCY. The only mutable ledger state is the per-key `balances` Map. + * There are intentionally NO shared scalar fields: a `Uint` updated as `x = x + n` + * reads-then-writes, which pins the transaction to the value observed at build time + * and makes any two transactions in the same block conflict. Per-key Map entries are + * independent, so unrelated depositors never contend. Aggregate supply, if ever + * required, MUST use the CRDT-style `Counter` ledger type (which requests an + * increment without reading), never a `Uint`. Coin-nonce uniqueness is likewise + * caller-supplied (see `withdrawShielded`) rather than drawn from a shared counter. + */ + +/** + * @description Credit balances keyed by `hash(secret)`. Only the hash is public; + * the secret is always a private circuit input. This is the sole mutable ledger + * field and it is per-key, so concurrent transactions on different secrets do not + * conflict. + * @type {Bytes<32>} balanceKey - The `hash(secret)` credit key. + * @type {Uint<128>} balance - The credit balance held under that key. + * @type {Map} balances + */ +export ledger balances: Map, Uint<128>>; + +/** + * @description The wrapper token's human-readable name. + * @dev Wrapper metadata follows OpenZeppelin's FungibleToken / NativeShieldedToken + * convention. Midnight coins carry no intrinsic name/symbol/decimals, so they are + * attached here. `sealed` means writable only in the constructor and immutable + * after; because they are never re-written, reading them is concurrency-free and + * off-chain tools can read them directly from ledger state. + * @type {Opaque<"string">} _name + */ +export sealed ledger _name: Opaque<"string">; + +/** + * @description The wrapper token's symbol. + * @type {Opaque<"string">} _symbol + */ +export sealed ledger _symbol: Opaque<"string">; + +/** + * @description The number of decimals used for the wrapper's user representation. + * @type {Uint<8>} _decimals + */ +export sealed ledger _decimals: Uint<8>; + +/** + * @description Returns the fixed domain separator for the shielded wrapper token. + * @return {Bytes<32>} - The wrapper domain separator. + */ +circuit wrapDomain(): Bytes<32> { + return pad(32, "shielded-night:wrapper"); +} + +/** + * @description Returns the wrapper token's on-chain color. + * + * @dev Computed live from `kernel.self()` rather than stored at construction: + * `kernel.self()` in a constructor is a placeholder, not the final contract + * address, so a constructor-time value would not match the color the mint actually + * produces. Off-chain callers can derive the same value from the known contract + * address and `wrapDomain()`. + * + * @return {Bytes<32>} - `tokenType(wrapDomain(), self())`. + */ +circuit wrapColor(): Bytes<32> { + return tokenType(wrapDomain(), kernel.self()); +} + +/** + * @description Initializes the wrapper metadata. Runs once, at deployment. + * + * @dev `decimals_` SHOULD match the underlying so the wrapper displays 1:1 + * (native NIGHT uses 6: 1 NIGHT = 10^6 Stars). + * + * @param {Opaque<"string">} name_ - The wrapper token name. + * @param {Opaque<"string">} symbol_ - The wrapper token symbol. + * @param {Uint<8>} decimals_ - The number of decimals for user representation. + */ +constructor(name_: Opaque<"string">, symbol_: Opaque<"string">, decimals_: Uint<8>) { + _name = disclose(name_); + _symbol = disclose(symbol_); + _decimals = disclose(decimals_); +} + +/** + * @description Returns the wrapper token name. + * @return {Opaque<"string">} - The token name. + */ +export circuit name(): Opaque<"string"> { return _name; } + +/** + * @description Returns the wrapper token symbol. + * @return {Opaque<"string">} - The token symbol. + */ +export circuit symbol(): Opaque<"string"> { return _symbol; } + +/** + * @description Returns the number of decimals used for the wrapper's user representation. + * @return {Uint<8>} - The token decimals. + */ +export circuit decimals(): Uint<8> { return _decimals; } + +/** + * @description Returns the wrapper token's on-chain color. + * @return {Bytes<32>} - The wrapper color, `tokenType(wrapDomain(), self())`. + */ +export circuit tokenColor(): Bytes<32> { return wrapColor(); } + +/** + * @description Derives the public balance key from a secret. + * + * @dev The `persistentHash` output is disclosed and used as the public map key, + * while the secret itself never leaves the proof. This is the intended disclosure: + * the hash is public, the preimage is not. + * + * @param {Bytes<32>} secret - The depositor's private secret. + * @return {Bytes<32>} - The public balance key `hash(secret)`. + */ +circuit getBalanceKey(secret: Bytes<32>): Bytes<32> { + return disclose(persistentHash>>([pad(32, "shielded-night:balance"), secret])); +} + +/** + * @description Increases the credit balance under `balanceKey` by `amount`. + * + * Requirements: + * + * - `amount` is greater than zero. + * + * @param {Bytes<32>} balanceKey - The credit key to increase. + * @param {Uint<128>} amount - The amount to add. + */ +circuit creditKey(balanceKey: Bytes<32>, amount: Uint<128>): [] { + assert(amount > 0, "amount must be positive"); + if (!balances.member(balanceKey)) { + balances.insert(balanceKey, 0 as Uint<128>); + } + balances.insert(balanceKey, (balances.lookup(balanceKey) + amount) as Uint<128>); +} + +/** + * @description Decreases the credit balance under `balanceKey` by `amount`. + * + * Requirements: + * + * - `amount` is greater than zero. + * - A balance exists for `balanceKey`. + * - That balance is at least `amount`. + * + * @param {Bytes<32>} balanceKey - The credit key to decrease. + * @param {Uint<128>} amount - The amount to remove. + */ +circuit debitKey(balanceKey: Bytes<32>, amount: Uint<128>): [] { + assert(amount > 0, "amount must be positive"); + assert(balances.member(balanceKey), "no balance for this secret"); + const cur = balances.lookup(balanceKey); + assert(cur >= amount, "insufficient pool balance"); + balances.insert(balanceKey, (cur - amount) as Uint<128>); +} + +/** + * @description Locks `amount` of native NIGHT (unshielded) and credits the + * caller's balance. First half of an unshielded -> shielded conversion. + * + * @notice Pure unshielded: the caller's wallet MUST supply `amount` of native + * NIGHT as an unshielded input to fund the receive. + * + * Requirements: + * + * - `amount` is greater than zero. + * + * @param {Bytes<32>} secret - The depositor's secret; credits `hash(secret)`. + * @param {Uint<64>} amount - The amount of native NIGHT to lock and credit. + */ +export circuit depositUnshielded(secret: Bytes<32>, amount: Uint<64>): [] { + assert(amount > 0, "amount must be positive"); + const amt = disclose(amount) as Uint<128>; + receiveUnshielded(nativeToken(), amt); + creditKey(getBalanceKey(secret), amt); +} + +/** + * @description Burns a wrapper `coin` (shielded) and credits the caller's balance + * by its full value. First half of a shielded -> unshielded conversion. + * + * @notice Pure shielded, whole-coin: there is no amount parameter. The WALLET is + * in charge of sending the exact UTXO to deposit — it splits a larger coin and + * makes change on its own side first, then spends the exact coin here. The coin + * is received and immediately sent to the shielded burn address in the same + * transaction (a transient), so the wrapper supply is truly elastic: minted on + * withdraw, burnt on deposit. Nothing accumulates in the contract and nothing is + * returned. + * + * @dev The burn transient requires a wallet on toolchain 0.31.101+ / ledger-v8 + * 8.1.0; older wallets failed to mark the spent input UTXO as spent. + * + * Requirements: + * + * - `coin.value` is greater than zero. + * - `coin.color` is this contract's wrapper color. + * + * @param {Bytes<32>} secret - The depositor's secret; credits `hash(secret)`. + * @param {ShieldedCoinInfo} coin - The exact wrapper coin to burn. + */ +export circuit depositShielded( + secret: Bytes<32>, + coin: ShieldedCoinInfo, +): [] { + const c = disclose(coin); + assert(c.value > 0, "coin value must be positive"); + assert(c.color == wrapColor(), "not this contract's shielded wrapper"); + receiveShielded(c); + sendImmediateShielded(c, shieldedBurnAddress(), c.value); + creditKey(getBalanceKey(secret), c.value); +} + + +/** + * @description Debits the caller's balance and releases `amount` of native NIGHT + * from the reserve to `recipient`. Second half of a shielded -> unshielded + * conversion. + * + * @notice Pure unshielded. Because unshielded UTXO outputs are public by + * construction, `recipient` is necessarily revealed on-chain (its disclosure is + * unavoidable for this value domain). + * + * Requirements: + * + * - `amount` is greater than zero. + * - `hash(secret)` holds a balance of at least `amount`. + * - The reserve holds at least `amount` of native NIGHT. + * + * @param {Bytes<32>} secret - The depositor's secret; debits `hash(secret)`. + * @param {Uint<64>} amount - The amount of native NIGHT to release. + * @param {Either} recipient - The unshielded recipient. + */ +export circuit withdrawUnshielded( + secret: Bytes<32>, + amount: Uint<64>, + recipient: Either +): [] { + assert(amount > 0, "amount must be positive"); + // A zero recipient irrecoverably strands the released NIGHT (OpenZeppelin's + // isKeyOrAddressZero convention: zero == burn). Guard both Either branches. + assert( + recipient.is_left + ? !(default == recipient.left) + : !(default == recipient.right), + "invalid recipient" + ); + const _amount = disclose(amount) as Uint<128>; + debitKey(getBalanceKey(secret), _amount); + sendUnshielded(nativeToken(), _amount, disclose(recipient)); +} + +/** + * @description Debits the caller's balance and mints `amount` of the wrapper + * directly to `recipient`. Second half of an unshielded -> shielded conversion. + * + * @notice Pure shielded. A single self-balancing mint (no mint-to-self + send): + * the mint provides the value for its own output. `recipient` is a plain + * `ZswapCoinPublicKey` wrapped in `left()`, which keeps `mintShieldedToken`'s + * auto-receive-to-self branch statically dead, so the user-vs-contract discriminant + * is not leaked; `disclose()` acknowledges that `recipient` and `nonce` feed the + * public coin commitment (a one-way hash), while neither is written to public + * ledger state. + * + * @dev `nonce` is caller-supplied and MUST be unique per mint (the wallet generates + * a fresh random value). Reusing a nonce for the same (value, recipient) produces a + * duplicate commitment, which the ledger rejects. A caller-supplied nonce is used + * instead of a shared on-chain counter because reading such a counter would pin the + * transaction to its build-time value and make concurrent withdrawals conflict. + * + * Requirements: + * + * - `amount` is greater than zero. + * - `hash(secret)` holds a balance of at least `amount`. + * + * @param {Bytes<32>} secret - The depositor's secret; debits `hash(secret)`. + * @param {Uint<64>} amount - The amount of wrapper to mint. + * @param {ZswapCoinPublicKey} recipient - The shielded recipient's coin public key. + * @param {Bytes<32>} nonce - A caller-supplied, per-mint-unique nonce. + * @return {ShieldedCoinInfo} - The minted wrapper coin. + */ +export circuit withdrawShielded( + secret: Bytes<32>, + amount: Uint<64>, + recipient: ZswapCoinPublicKey, + nonce: Bytes<32> +): ShieldedCoinInfo { + assert(amount > 0, "amount must be positive"); + // Minting to the zero key is minting to Midnight's burn address: the wrapper + // would be unspendable while the debited credit and its backing NIGHT stay + // locked in the contract forever. + assert(!(default == recipient), "invalid recipient"); + const _amount = disclose(amount); + debitKey(getBalanceKey(secret), _amount as Uint<128>); + return mintShieldedToken( + wrapDomain(), + _amount, + disclose(nonce), + left(disclose(recipient)) + ); +} + +/** + * @description Returns the credit balance held under `hash(secret)`. + * + * @param {Bytes<32>} secret - The depositor's secret. + * @return {Uint<128>} - The credit balance for that secret. + */ +export circuit getBalance(secret: Bytes<32>): Uint<128> { + return balances.lookup(getBalanceKey(secret)); +} + +/** + * @description ATOMIC unshielded -> shielded convert in ONE circuit: lock + * `amount` of native NIGHT and mint `amount` of the wrapper to `recipient` in + * the same transaction. No secret, no credit — because deposit and mint happen + * together there is nothing to bridge, so the per-key pool bookkeeping is + * unnecessary. Locked NIGHT still backs the minted wrapper 1:1. + * + * @notice One transaction, one wallet approval. Combines a `receiveUnshielded` + * (unshielded input) with a self-balancing `mintShieldedToken` (shielded output) + * in a single contract interaction / single segment — the only way to net both + * domains in one tx (merging two separate calls cannot, as their intents land + * in different segments). + * + * Requirements: + * - `amount` is greater than zero. + * - `recipient` is not the zero coin public key (burn address). + * + * @param {Uint<64>} amount - Native NIGHT to lock and wrapper to mint. + * @param {ZswapCoinPublicKey} recipient - The shielded recipient's coin public key. + * @param {Bytes<32>} nonce - A caller-supplied, per-mint-unique nonce. + * @return {ShieldedCoinInfo} - The minted wrapper coin. + */ +export circuit convertToShielded( + amount: Uint<64>, + recipient: ZswapCoinPublicKey, + nonce: Bytes<32> +): ShieldedCoinInfo { + assert(amount > 0, "amount must be positive"); + assert(!(default == recipient), "invalid recipient"); + const amt = disclose(amount); + receiveUnshielded(nativeToken(), amt as Uint<128>); + return mintShieldedToken( + wrapDomain(), + amt, + disclose(nonce), + left(disclose(recipient)) + ); +} + +/** + * @description ATOMIC shielded -> unshielded convert in ONE circuit: burn a + * wrapper `coin` (contract receives it) and release its value in native NIGHT + * to `recipient`, in the same transaction. No secret, no credit. The released + * NIGHT is drawn from the reserve prior `convertToShielded` calls locked. + * + * @notice One transaction, one wallet approval. Combines a `receiveShielded` + * (shielded input) with a `sendUnshielded` (unshielded output) in a single + * contract interaction / single segment. + * + * Requirements: + * - `coin.value` is greater than zero. + * - `coin.color` is this contract's wrapper color. + * - `recipient` is not the zero address (burn). + * + * @param {ShieldedCoinInfo} coin - The wrapper coin to burn. + * @param {Either} recipient - The unshielded recipient. + */ +export circuit convertToUnshielded( + coin: ShieldedCoinInfo, + recipient: Either +): [] { + const c = disclose(coin); + assert(c.value > 0, "coin value must be positive"); + assert(c.color == wrapColor(), "not this contract's shielded wrapper"); + assert( + recipient.is_left + ? !(default == recipient.left) + : !(default == recipient.right), + "invalid recipient" + ); + receiveShielded(c); + sendUnshielded(nativeToken(), c.value, disclose(recipient)); +} diff --git a/contracts/v2/test/deployment-record.unit.test.ts b/contracts/v2/test/deployment-record.unit.test.ts new file mode 100644 index 0000000..00a0dd9 --- /dev/null +++ b/contracts/v2/test/deployment-record.unit.test.ts @@ -0,0 +1,405 @@ +import { chmodSync, existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from 'node:fs'; +import { execFileSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { Writable } from 'node:stream'; +import { pathToFileURL } from 'node:url'; +import { afterEach, describe, expect, test, vi } from 'vitest'; +import { unshieldedToken } from '@midnightntwrk/ledger-v9'; +import { + assertMaintenanceAuthorityKey, + createWalletLogger, + deploymentWalletSyncTimeoutMs, + mergeVerificationRecord, + preflightRecordOutput, + prepareMaintenanceSigningKey, + reportConfirmedDeployment, + sourceCommit, + type Verification, + withDurableMaintenanceKey, + withSyncedDeploymentWallet, +} from '../scripts/profile.js'; + +const ADDRESS = 'a'.repeat(64); +const verification: Verification = { + address: ADDRESS, + verifierKeys: { circuit: 'b'.repeat(64) }, + metadata: { name: 'Shielded Night', symbol: 'sNight', decimals: 6 }, + authority: { + locked: false, + committeeSize: 1, + committee: [{ tag: 'schnorr', value: 'c'.repeat(64) }], + threshold: '1', + counter: '0', + }, +}; + +const originalDeployOut = process.env.DEPLOY_OUT; +const originalSourceCommit = process.env.SHIELDED_NIGHT_COMMIT; +const originalMaintenanceKeyFile = process.env.MN_MAINTENANCE_KEY_FILE; +const originalWalletSyncTimeout = process.env.MN_WALLET_SYNC_TIMEOUT_MS; + +afterEach(() => { + if (originalDeployOut === undefined) delete process.env.DEPLOY_OUT; + else process.env.DEPLOY_OUT = originalDeployOut; + if (originalSourceCommit === undefined) delete process.env.SHIELDED_NIGHT_COMMIT; + else process.env.SHIELDED_NIGHT_COMMIT = originalSourceCommit; + if (originalMaintenanceKeyFile === undefined) delete process.env.MN_MAINTENANCE_KEY_FILE; + else process.env.MN_MAINTENANCE_KEY_FILE = originalMaintenanceKeyFile; + if (originalWalletSyncTimeout === undefined) delete process.env.MN_WALLET_SYNC_TIMEOUT_MS; + else process.env.MN_WALLET_SYNC_TIMEOUT_MS = originalWalletSyncTimeout; +}); + +describe('deployment safety', () => { + test('silent wallet logger cannot emit an interpolated seed', () => { + const chunks: Buffer[] = []; + const sink = new Writable({ + write(chunk, _encoding, callback) { + chunks.push(Buffer.from(chunk)); + callback(); + }, + }); + const fixtureSeed = 'synthetic-fixture-seed-that-must-never-appear'; + const logger = createWalletLogger(sink); + logger.info(`Your wallet seed is: ${fixtureSeed}`); + logger.error(`A second interpolated seed is: ${fixtureSeed}`); + logger.flush(); + expect(Buffer.concat(chunks).toString('utf8')).not.toContain(fixtureSeed); + expect(Buffer.concat(chunks)).toHaveLength(0); + }); + + test('prints confirmed address and transaction before later record work can fail', () => { + const messages: string[] = []; + const address = reportConfirmedDeployment( + { contractAddress: ADDRESS, txId: 'synthetic-confirmed-tx' }, + (message) => messages.push(message), + ); + + expect(address).toBe(ADDRESS); + expect(messages).toEqual([ + `[deploy] confirmed stagenet contract ${ADDRESS}`, + '[deploy] confirmed transaction synthetic-confirmed-tx', + `STAGENET_ADDRESS=${ADDRESS}`, + ]); + expect(() => { throw new Error('synthetic record failure'); }).toThrow('synthetic record failure'); + expect(messages).toHaveLength(3); + }); + + test('preflights record creation and rejects an unusable output path', () => { + const directory = mkdtempSync(path.join(tmpdir(), 'shielded-night-record-')); + try { + process.env.DEPLOY_OUT = path.join(directory, 'deployment.json'); + preflightRecordOutput(); + expect(existsSync(process.env.DEPLOY_OUT)).toBe(false); + expect(readdirSync(directory)).toEqual([]); + + const parentFile = path.join(directory, 'not-a-directory'); + writeFileSync(parentFile, 'synthetic fixture'); + process.env.DEPLOY_OUT = path.join(parentFile, 'deployment.json'); + expect(() => preflightRecordOutput()).toThrow(); + } finally { + rmSync(directory, { recursive: true, force: true }); + } + }); + + test('requires an explicit absolute durable maintenance-key path before deployment', () => { + delete process.env.MN_MAINTENANCE_KEY_FILE; + expect(() => prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + })).toThrow('Set MN_MAINTENANCE_KEY_FILE'); + + process.env.MN_MAINTENANCE_KEY_FILE = 'relative-key.json'; + expect(() => prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + })).toThrow('must be an absolute path'); + }); + + test('does not enter wallet startup or submission when durable key preflight fails', async () => { + delete process.env.MN_MAINTENANCE_KEY_FILE; + const walletAndSubmission = vi.fn(async () => undefined); + await expect(withDurableMaintenanceKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + }, walletAndSubmission)).rejects.toThrow('Set MN_MAINTENANCE_KEY_FILE'); + expect(walletAndSubmission).not.toHaveBeenCalled(); + }); + + test('uses a bounded wallet sync, requires NIGHT and DUST, and always stops', async () => { + const wallet = { fixture: 'wallet' }; + const provider = { + wallet, + start: vi.fn(async () => undefined), + stop: vi.fn(async () => undefined), + }; + const fundedState = (night: bigint, dust: bigint) => ({ + unshielded: { balances: { [unshieldedToken().raw]: night } }, + dust: { balance: () => dust }, + }); + const action = vi.fn(async () => 'deployed'); + const sync = vi.fn(async () => fundedState(1n, 1n)); + + delete process.env.MN_WALLET_SYNC_TIMEOUT_MS; + await expect(withSyncedDeploymentWallet(provider, sync, action)).resolves.toBe('deployed'); + expect(provider.start).toHaveBeenCalledWith(false); + expect(sync).toHaveBeenCalledWith(wallet, 2_000, 300_000); + expect(action).toHaveBeenCalledOnce(); + expect(provider.stop).toHaveBeenCalledOnce(); + + process.env.MN_WALLET_SYNC_TIMEOUT_MS = '180000'; + expect(deploymentWalletSyncTimeoutMs()).toBe(180_000); + process.env.MN_WALLET_SYNC_TIMEOUT_MS = '29999'; + expect(() => deploymentWalletSyncTimeoutMs()).toThrow('between 30000 and 900000'); + process.env.MN_WALLET_SYNC_TIMEOUT_MS = 'not-a-timeout'; + expect(() => deploymentWalletSyncTimeoutMs()).toThrow('integer number of milliseconds'); + + process.env.MN_WALLET_SYNC_TIMEOUT_MS = '180000'; + const noNightAction = vi.fn(async () => undefined); + const noNightProvider = { + wallet, + start: vi.fn(async () => undefined), + stop: vi.fn(async () => undefined), + }; + await expect(withSyncedDeploymentWallet( + noNightProvider, + async () => fundedState(0n, 1n), + noNightAction, + )).rejects.toThrow('no available NIGHT'); + expect(noNightAction).not.toHaveBeenCalled(); + expect(noNightProvider.stop).toHaveBeenCalledOnce(); + + const noDustAction = vi.fn(async () => undefined); + const noDustProvider = { + wallet, + start: vi.fn(async () => undefined), + stop: vi.fn(async () => undefined), + }; + await expect(withSyncedDeploymentWallet( + noDustProvider, + async () => fundedState(1n, 0n), + noDustAction, + )).rejects.toThrow('no available DUST'); + expect(noDustAction).not.toHaveBeenCalled(); + expect(noDustProvider.stop).toHaveBeenCalledOnce(); + + const timedOutAction = vi.fn(async () => undefined); + const timedOutProvider = { + wallet, + start: vi.fn(async () => undefined), + stop: vi.fn(async () => undefined), + }; + await expect(withSyncedDeploymentWallet( + timedOutProvider, + async () => { throw new Error('synthetic sync timeout'); }, + timedOutAction, + )).rejects.toThrow('synthetic sync timeout'); + expect(timedOutAction).not.toHaveBeenCalled(); + expect(timedOutProvider.stop).toHaveBeenCalledOnce(); + }); + + test('persists mode-0600 signing-key custody before use and restores it in a fresh process', () => { + const directory = mkdtempSync(path.join(tmpdir(), 'shielded-night-key-')); + const destination = path.join(directory, 'maintenance-key.json'); + process.env.MN_MAINTENANCE_KEY_FILE = destination; + try { + const created = prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + }); + expect(created.created).toBe(true); + expect(statSync(destination).mode & 0o777).toBe(0o600); + + const reopened = prepareMaintenanceSigningKey({ + sourceCommit: '3'.repeat(40), + artifactSha256: '4'.repeat(64), + }); + expect(reopened.created).toBe(false); + expect(reopened.signingKey).toEqual(created.signingKey); + expect(reopened.verifyingKey).toEqual(created.verifyingKey); + + const profileUrl = pathToFileURL(path.resolve(import.meta.dirname, '../scripts/profile.ts')).href; + const childScript = [ + `const { prepareMaintenanceSigningKey } = await import(${JSON.stringify(profileUrl)});`, + `const key = prepareMaintenanceSigningKey({ sourceCommit: '${'5'.repeat(40)}', artifactSha256: '${'6'.repeat(64)}' });`, + 'process.stdout.write(JSON.stringify(key.verifyingKey));', + ].join('\n'); + const freshProcessPublicKey = JSON.parse(execFileSync(process.execPath, [ + '--import', 'tsx', '--input-type=module', '-e', childScript, + ], { + cwd: path.resolve(import.meta.dirname, '..'), + env: { ...process.env, MN_MAINTENANCE_KEY_FILE: destination }, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'pipe'], + })); + expect(freshProcessPublicKey).toEqual(created.verifyingKey); + + const matchingVerification: Verification = { + ...verification, + authority: { ...verification.authority, committee: [created.verifyingKey] }, + }; + expect(() => assertMaintenanceAuthorityKey(matchingVerification, created.verifyingKey)).not.toThrow(); + expect(() => assertMaintenanceAuthorityKey(verification, created.verifyingKey)).toThrow( + 'does not match the durably persisted signing key', + ); + } finally { + rmSync(directory, { recursive: true, force: true }); + } + }); + + test('rejects permissive, malformed, or mismatched existing maintenance-key files', () => { + const directory = mkdtempSync(path.join(tmpdir(), 'shielded-night-key-invalid-')); + const destination = path.join(directory, 'maintenance-key.json'); + process.env.MN_MAINTENANCE_KEY_FILE = destination; + try { + prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + }); + chmodSync(destination, 0o644); + expect(() => prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + })).toThrow('must have mode 0600'); + + chmodSync(destination, 0o600); + const validRecord = JSON.parse(readFileSync(destination, 'utf8')); + const fixturePrivateValue = 'feed'.repeat(16); + writeFileSync(destination, `${JSON.stringify({ + ...validRecord, + signingKey: { ...validRecord.signingKey, value: fixturePrivateValue }, + })}\n`, 'utf8'); + const invalidKeyError = (() => { + try { + prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + }); + } catch (caught) { + return caught; + } + })(); + expect(invalidKeyError).toBeInstanceOf(Error); + expect(String((invalidKeyError as Error).stack ?? (invalidKeyError as Error).message)).not.toContain( + fixturePrivateValue, + ); + + writeFileSync(destination, `${JSON.stringify({ + ...validRecord, + verifyingKey: { ...validRecord.verifyingKey, value: '0'.repeat(64) }, + })}\n`, 'utf8'); + expect(() => prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + })).toThrow('does not match its signing key'); + + const fixtureSecret = 'synthetic-secret-that-must-not-appear'; + writeFileSync(destination, `{not-json-${fixtureSecret}}\n`, 'utf8'); + const error = (() => { + try { + prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + }); + } catch (caught) { + return caught; + } + })(); + expect(error).toBeInstanceOf(Error); + expect(String((error as Error).stack ?? (error as Error).message)).toContain('malformed JSON'); + expect(String((error as Error).stack ?? (error as Error).message)).not.toContain(fixtureSecret); + expect(() => prepareMaintenanceSigningKey({ + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + })).toThrow('malformed JSON'); + } finally { + rmSync(directory, { recursive: true, force: true }); + } + }); + + test('rejects malformed configured source provenance', () => { + process.env.SHIELDED_NIGHT_COMMIT = 'not-a-full-git-sha'; + expect(() => sourceCommit()).toThrow('full 40-character hexadecimal Git SHA'); + }); + + test('later verification preserves immutable deployment provenance and appends history', () => { + const original = { + schemaVersion: 1, + contractAddress: ADDRESS, + sourceCommit: '1'.repeat(40), + artifactSha256: '2'.repeat(64), + compatibility: { compiler: 'deployment-compiler' }, + deploymentTransaction: { id: 'original-tx' }, + network: { name: 'stagenet', node: 'original-node' }, + }; + const firstVerification = mergeVerificationRecord({ + existing: original, + network: { name: 'stagenet', node: 'verification-node' }, + verified: verification, + verificationSourceCommit: '3'.repeat(40), + verificationArtifactSha256: '4'.repeat(64), + verifiedAt: '2026-09-07T00:00:00.000Z', + }); + const record = mergeVerificationRecord({ + existing: firstVerification, + network: { name: 'stagenet', node: 'later-verification-node' }, + verified: verification, + verificationSourceCommit: '5'.repeat(40), + verificationArtifactSha256: '6'.repeat(64), + verifiedAt: '2026-09-08T00:00:00.000Z', + }); + + expect(record.recordKind).toBe('deployment'); + expect(record.schemaVersion).toBe(2); + expect(record.sourceCommit).toBe(original.sourceCommit); + expect(record.artifactSha256).toBe(original.artifactSha256); + expect(record.compatibility).toEqual(original.compatibility); + expect(record.deploymentTransaction).toEqual(original.deploymentTransaction); + expect(record.network).toEqual(original.network); + expect(record.verification).toMatchObject({ + sourceCommit: '5'.repeat(40), + artifactSha256: '6'.repeat(64), + network: { node: 'later-verification-node' }, + }); + expect(record.verificationHistory).toHaveLength(2); + }); + + test('a verifier-created record is explicit and never invents deployment provenance', () => { + const first = mergeVerificationRecord({ + network: { name: 'stagenet', node: 'verification-node' }, + verified: verification, + verificationSourceCommit: '7'.repeat(40), + verificationArtifactSha256: '8'.repeat(64), + verifiedAt: '2026-09-07T00:00:00.000Z', + }); + const second = mergeVerificationRecord({ + existing: first, + network: { name: 'stagenet', node: 'newer-verification-node' }, + verified: verification, + verificationSourceCommit: '9'.repeat(40), + verificationArtifactSha256: '0'.repeat(64), + verifiedAt: '2026-09-08T00:00:00.000Z', + }); + + expect(second.recordKind).toBe('verification-only'); + expect(second).not.toHaveProperty('deploymentTransaction'); + expect(second).not.toHaveProperty('sourceCommit'); + expect(second).not.toHaveProperty('artifactSha256'); + expect(second.verificationHistory).toHaveLength(2); + expect(second.verification).toMatchObject({ + sourceCommit: '9'.repeat(40), + network: { node: 'newer-verification-node' }, + }); + }); + + test('refuses to merge a record for another contract address', () => { + expect(() => mergeVerificationRecord({ + existing: { contractAddress: 'c'.repeat(64), deploymentTransaction: { id: 'tx' } }, + network: { name: 'stagenet' }, + verified: verification, + verificationSourceCommit: 'd'.repeat(40), + verificationArtifactSha256: 'e'.repeat(64), + verifiedAt: '2026-09-07T00:00:00.000Z', + })).toThrow('does not match verified address'); + }); +}); diff --git a/contracts/v2/test/shielded-night.unit.test.ts b/contracts/v2/test/shielded-night.unit.test.ts new file mode 100644 index 0000000..11dc0b0 --- /dev/null +++ b/contracts/v2/test/shielded-night.unit.test.ts @@ -0,0 +1,172 @@ +import { beforeEach, describe, expect, it } from 'vitest'; +import { + createCircuitContext, + createConstructorContext, + sampleContractAddress, + type ChargedState, + type CircuitResults, + type Effects, + type StateValue, +} from '@midnight-ntwrk/compact-runtime'; +import { Contract, ledger, type Ledger } from '../managed/contract/index.js'; + +type PrivateState = Record; +type ShieldedCoin = { nonce: Uint8Array; color: Uint8Array; value: bigint }; +type Recipient = { + is_left: boolean; + left: { bytes: Uint8Array }; + right: { bytes: Uint8Array }; +}; + +const COIN_PUBLIC_KEY = '0'.repeat(64); +const AMOUNT = 10_000_000n; + +function bytes32(label: string): Uint8Array { + const value = new Uint8Array(32); + value.set(new TextEncoder().encode(label).subarray(0, 32)); + return value; +} + +function userRecipient(bytes = bytes32('user-address')): Recipient { + return { + is_left: false, + left: { bytes: new Uint8Array(32) }, + right: { bytes }, + }; +} + +class V2Simulator { + private readonly contract = new Contract({}); + private readonly address = sampleContractAddress(); + private state!: StateValue | ChargedState; + private privateState: PrivateState = {}; + effects!: Effects; + + static async create(): Promise { + const simulator = new V2Simulator(); + const initial = await simulator.contract.initialState( + createConstructorContext({}, COIN_PUBLIC_KEY), + 'Shielded Night', + 'sNight', + 6n, + ); + simulator.state = initial.currentContractState.data; + simulator.privateState = initial.currentPrivateState; + return simulator; + } + + getLedger(): Ledger { + return ledger(this.state); + } + + private async advance( + circuitId: string, + invoke: (context: ReturnType>) => Promise>, + ): Promise { + const context = createCircuitContext( + circuitId, + this.address, + COIN_PUBLIC_KEY, + this.state, + this.privateState, + ); + const result = await invoke(context); + this.state = result.context.callContext.currentQueryContext.state; + this.privateState = result.context.callContext.currentPrivateState ?? {}; + this.effects = result.context.callContext.currentQueryContext.effects; + return result.result; + } + + name() { return this.advance('name', (context) => this.contract.impureCircuits.name(context)); } + symbol() { return this.advance('symbol', (context) => this.contract.impureCircuits.symbol(context)); } + decimals() { return this.advance('decimals', (context) => this.contract.impureCircuits.decimals(context)); } + tokenColor() { return this.advance('tokenColor', (context) => this.contract.impureCircuits.tokenColor(context)); } + getBalance(secret: Uint8Array) { + return this.advance('getBalance', (context) => this.contract.impureCircuits.getBalance(context, secret)); + } + depositUnshielded(secret: Uint8Array, amount: bigint) { + return this.advance('depositUnshielded', (context) => this.contract.impureCircuits.depositUnshielded(context, secret, amount)); + } + withdrawShielded(secret: Uint8Array, amount: bigint, recipient: { bytes: Uint8Array }, nonce: Uint8Array) { + return this.advance('withdrawShielded', (context) => this.contract.impureCircuits.withdrawShielded(context, secret, amount, recipient, nonce)); + } + depositShielded(secret: Uint8Array, coin: ShieldedCoin) { + return this.advance('depositShielded', (context) => this.contract.impureCircuits.depositShielded(context, secret, coin)); + } + withdrawUnshielded(secret: Uint8Array, amount: bigint, recipient: Recipient) { + return this.advance('withdrawUnshielded', (context) => this.contract.impureCircuits.withdrawUnshielded(context, secret, amount, recipient)); + } + convertToShielded(amount: bigint, recipient: { bytes: Uint8Array }, nonce: Uint8Array) { + return this.advance('convertToShielded', (context) => this.contract.impureCircuits.convertToShielded(context, amount, recipient, nonce)); + } + convertToUnshielded(coin: ShieldedCoin, recipient: Recipient) { + return this.advance('convertToUnshielded', (context) => this.contract.impureCircuits.convertToUnshielded(context, coin, recipient)); + } +} + +describe('ShieldedNight compiler 0.34.0 / runtime 0.19.0', () => { + let contract: V2Simulator; + + beforeEach(async () => { + contract = await V2Simulator.create(); + }); + + it('preserves metadata and derives one stable wrapper color', async () => { + await expect(contract.name()).resolves.toBe('Shielded Night'); + await expect(contract.symbol()).resolves.toBe('sNight'); + await expect(contract.decimals()).resolves.toBe(6n); + const first = await contract.tokenColor(); + const second = await contract.tokenColor(); + expect(first).toHaveLength(32); + expect(first).toEqual(second); + }); + + it('round-trips both atomic conversion directions with 1:1 backing', async () => { + const nonce = bytes32('atomic-round-trip'); + const color = await contract.tokenColor(); + const wrapper = await contract.convertToShielded(AMOUNT, { bytes: bytes32('recipient') }, nonce); + expect(wrapper).toEqual({ nonce, color, value: AMOUNT }); + expect([...contract.effects.unshieldedInputs.values()]).toEqual([AMOUNT]); + expect([...contract.effects.shieldedMints.values()]).toEqual([AMOUNT]); + + await contract.convertToUnshielded(wrapper, userRecipient()); + expect([...contract.effects.unshieldedOutputs.values()]).toEqual([AMOUNT]); + expect(contract.effects.claimedShieldedReceives).toHaveLength(1); + expect(contract.getLedger().balances.isEmpty()).toBe(true); + }); + + it('round-trips the credit bridge without creating unbacked value', async () => { + const secret = bytes32('credit-round-trip'); + await contract.depositUnshielded(secret, AMOUNT); + expect([...contract.effects.unshieldedInputs.values()]).toEqual([AMOUNT]); + await expect(contract.getBalance(secret)).resolves.toBe(AMOUNT); + + const wrapper = await contract.withdrawShielded(secret, AMOUNT, { bytes: bytes32('recipient') }, bytes32('nonce')); + expect([...contract.effects.shieldedMints.values()]).toEqual([AMOUNT]); + await expect(contract.getBalance(secret)).resolves.toBe(0n); + await contract.depositShielded(secret, wrapper); + expect(contract.effects.claimedShieldedReceives).toHaveLength(1); + await expect(contract.getBalance(secret)).resolves.toBe(AMOUNT); + await contract.withdrawUnshielded(secret, AMOUNT, userRecipient()); + expect([...contract.effects.unshieldedOutputs.values()]).toEqual([AMOUNT]); + await expect(contract.getBalance(secret)).resolves.toBe(0n); + }); + + it('keeps the zero-value and wrong-token guards', async () => { + await expect(contract.convertToShielded(0n, { bytes: bytes32('recipient') }, bytes32('nonce'))) + .rejects.toThrow('amount must be positive'); + await expect(contract.convertToShielded(AMOUNT, { bytes: new Uint8Array(32) }, bytes32('nonce'))) + .rejects.toThrow('invalid recipient'); + + const wrapper = await contract.convertToShielded(AMOUNT, { bytes: bytes32('recipient') }, bytes32('nonce')); + const foreign = { ...wrapper, color: wrapper.color.slice() }; + foreign.color[0] ^= 0xff; + await expect(contract.convertToUnshielded(foreign, userRecipient())) + .rejects.toThrow("not this contract's shielded wrapper"); + + const secret = bytes32('overwithdraw'); + await contract.depositUnshielded(secret, 1n); + await expect(contract.withdrawUnshielded(secret, 2n, userRecipient())) + .rejects.toThrow('insufficient pool balance'); + }); +}); diff --git a/contracts/v2/tsconfig.json b/contracts/v2/tsconfig.json new file mode 100644 index 0000000..3d545c9 --- /dev/null +++ b/contracts/v2/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + "skipLibCheck": true, + "noEmit": true, + "types": ["node", "vitest/globals"] + }, + "include": ["scripts", "test", "managed/contract/index.d.ts"] +} diff --git a/frontend/.env b/frontend/.env index 76c9777..5830b2e 100644 --- a/frontend/.env +++ b/frontend/.env @@ -1,10 +1,10 @@ # Deployed Shielded NIGHT contract address, per network (public - this file is # committed; the deployed address lives in git history). The network dropdown -# shows only networks whose address is set; the sNight token type is derived -# from the address. +# always shows Preview, Preprod and Stagenet; an unset address is presented as +# unavailable and cannot connect. The sNight token type is derived from it. PREVIEW_ADDRESS=80b89b9a4213c61da84f54b2ea02e2809f9c4dedbdafacd04b38d4667bee1396 PREPROD_ADDRESS=e354e6725893397e6a2dfa44522a017fabb5d9c92efed50288711f5f865c8950 -MAINNET_ADDRESS= +STAGENET_ADDRESS=052051d38424bcb5e1b6616598aed7863fbe5e6a2db55215ef9ad45fc2bc1403 # Optional: local devnet (docker stack) address, for development. UNDEPLOYED_ADDRESS= diff --git a/frontend/README.md b/frontend/README.md index fb3bef7..9ef6454 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,126 +1,83 @@ -# ShieldedNight Frontend — NIGHT ⇄ sNight DEX +# Shielded NIGHT frontend -A browser dApp for the ShieldedNight contract: convert native unshielded **NIGHT** -into the shielded wrapper **sNight** and back. Connects to any `window.midnight[*]` -wallet, reads shielded + unshielded balances, and targets preview / preprod -(mainnet later) via a network dropdown. - -Vite + React 18 + TypeScript. Adapted from the `midnight-wallet-dapp` reference. +A Vite, React and TypeScript dApp for converting unshielded NIGHT to shielded sNight and back. The public selector supports Preview and Preprod on Midnight 1.x plus Stagenet on Midnight 2.x. ## Setup +Install the app and both isolated protocol trees from the repository root: + ```bash -cd frontend -bun install -bun run dev # http://localhost:5173 +bun install --frozen-lockfile +bun --cwd frontend install --frozen-lockfile +npm --prefix frontend/protocols/v1 ci +npm --prefix frontend/protocols/v2 ci +bun --cwd frontend run dev ``` -Requires the contract's compiled artifacts at `../src/managed` (run `bun run compact` -in the repo root if missing). Vite serves them at `/contract/compiled/shielded-night` -so the browser proof step can fetch prover/verifier keys. +The development server listens on `http://localhost:5173`. The repository must contain the full v1 artifacts in `src/managed` and v2 artifacts in `contracts/v2/managed`. -## Configuration (`.env`) +## Network configuration -| Var | Purpose | -| --- | --- | -| `PREVIEW_ADDRESS` / `PREPROD_ADDRESS` / `MAINNET_ADDRESS` / `UNDEPLOYED_ADDRESS` | Deployed contract address per network (the dropdown shows only networks with an address set). | +`frontend/.env` contains only public contract addresses and is committed: -The wallet supplies the indexer / node / proof-server URLs (`getConfiguration()`) -and owns proving; the dApp only needs the contract address per network. The -sNight token type is derived from the address. +| Variable | Selector | Protocol | +| --- | --- | --- | +| `PREVIEW_ADDRESS` | Preview | Midnight 1.x | +| `PREPROD_ADDRESS` | Preprod | Midnight 1.x | +| `STAGENET_ADDRESS` | Stagenet | Midnight 2.x | +| `UNDEPLOYED_ADDRESS` | Local (development only) | Midnight 1.x | -**`.env` is committed.** It holds only public on-chain addresses, so the -deployed address per network lives in git history (each redeploy is a commit). -Secrets never go in it - deploy scripts read `MN_MNEMONIC` / `MN_SEED` from the -shell environment. For personal overrides use `.env.local` (gitignored; Vite -loads it over `.env`). +Preview, Preprod and Stagenet always appear. A missing or malformed address displays an unavailable state and blocks wallet connection and transactions. Local appears in development or when its address is explicitly configured. -### Runtime address override (`window.SHIELDED_NIGHT`) +The wallet supplies its network, indexer and proving capabilities. The app verifies the wallet network throughout the operation and delegates proving, transaction balancing and submission to the wallet. It submits the exact balanced bytes returned by the wallet. -`.env` bakes the addresses in at BUILD time, which is right for the hosted -networks and wrong for a deployment that brings up its own chain: an image built -once and run against many throwaway local devnets only learns the contract -address when the container starts. So `index.html` loads `/config.js` as a -classic script — it therefore runs BEFORE the deferred module bundle — and -[public/config.js](public/config.js) ships a **no-op placeholder**, so every -deployment serves a real file (never a 404, never an HTML fallback the browser -refuses to execute): - -```js -// public/config.js → dist/config.js, as built -window.SHIELDED_NIGHT = window.SHIELDED_NIGHT || {}; -``` +### Runtime address override -A stack-hosted deployment overwrites that one file at container start, and needs -to touch nothing else in the build: +`index.html` loads `public/config.js` before the module bundle. A stack may replace its no-op value at container startup: ```js -// dist/config.js, written from the deploy record before nginx starts -window.SHIELDED_NIGHT = { UNDEPLOYED_ADDRESS: "0123…" }; +window.SHIELDED_NIGHT = { + UNDEPLOYED_ADDRESS: "0123…", +}; ``` -Per network, the injected value wins over the build-time one; a blank or absent -value falls through to `.env`, so **a build with no global behaves exactly as -before**. The keys are the same names as the env vars: `PREVIEW_ADDRESS`, -`PREPROD_ADDRESS`, `MAINNET_ADDRESS`, `UNDEPLOYED_ADDRESS`. The dropdown follows -suit — inject `UNDEPLOYED_ADDRESS` and "Local (undeployed)" appears in a bundle -built without one. +The supported keys are `PREVIEW_ADDRESS`, `PREPROD_ADDRESS`, `STAGENET_ADDRESS` and `UNDEPLOYED_ADDRESS`. A non-blank runtime value wins over its build-time value. Only public addresses are injectable; secrets remain outside the frontend. -Only ADDRESSES are injectable. The wallet still supplies the indexer / node / -proof-server URLs (`getConfiguration()`), so a stack on non-default ports needs -no URL lane in the page — one reason there is nothing else to get wrong. +## Protocol isolation -Packaging note: the literal `SHIELDED_NIGHT` is a property name on `window`, so -it survives minification and appears verbatim in the built bundle. An image that -injects `/config.js` can prove the lane is present in the build it ships instead -of trusting it: +The two ledger generations use incompatible runtime and WASM class identities. `protocols/v1` and `protocols/v2` therefore have independent package manifests, lockfiles and adapters. The UI talks to their shared protocol-neutral session interface and lazy-loads only the adapter selected for the wallet connection. -```bash -grep -q SHIELDED_NIGHT dist/assets/*.js # fail the build if the override is gone -``` +The production build contains four distinct runtime assets: v1 and v2 ledger WASM plus v1 and v2 on-chain runtime WASM. Vite also copies the complete proving trees to: + +- `/contract/v1/shielded-night` +- `/contract/v2/shielded-night` +- `/contract/compiled/shielded-night` (legacy v1 URL for already-open clients) -See [src/lib/runtime-config.ts](src/lib/runtime-config.ts); the behaviour is -pinned by `test/unit/runtime-config.unit.test.ts` in the repo root's unit tier. +The sNight token identity is derived inside the selected adapter with that generation's ledger package. -## How it works +## Conversion and switching behavior -Each conversion is **two transactions** with a pool credit keyed by a -client-generated secret held between them. One **Swap** click orchestrates both -legs (two wallet approvals) with a step indicator: +Each normal conversion calls an atomic circuit and uses one wallet approval: -- **NIGHT → sNight**: `depositUnshielded(secret, amount)` → `withdrawShielded(secret, amount, myCoinPublicKey, nonce)`. -- **sNight → NIGHT**: `depositShielded(secret, coin)` → `withdrawUnshielded(secret, coin.value, myAddress)`. +- NIGHT → sNight: `convertToShielded` +- sNight → NIGHT: `convertToUnshielded` -The secret and any minted wrapper coin are persisted to `localStorage`, so an -interrupted swap can be resumed (see the "Unfinished swaps" panel) and minted -sNight can be converted back later. +Changing the selector disposes the old protocol session, clears balances and operation state, and requires a new wallet connection. Generation guards ignore late callbacks from the old network. Wallet network checks before and after balancing and immediately before submission prevent an old session from submitting on the newly selected network. If submission has already started, any uncertain error retains the original transaction id and network association. -### Reverse-direction limitation (read this) +The unfinished-swaps panel remains able to resume deposits created by the older two-step UI. Recovery uses the selected protocol adapter and refuses records belonging to another contract. -The `window.midnight` connector exposes only **aggregate** shielded balances — it -does not reveal individual coins or their nonces. `depositShielded` needs the -exact `ShieldedCoinInfo{nonce, color, value}`. So **sNight → NIGHT works only for -wrapper coins this dApp minted in this browser** (tracked in `localStorage`). The -reverse UI is enabled regardless; if there is no tracked coin it surfaces a clear -error rather than failing silently. Converting arbitrary/received sNight would -require a coin-level wallet API that does not exist today. The reverse swap -converts a whole tracked coin at a time (remainder-free). +### Reverse coin limitation -## Verify end-to-end (needs a deployed contract + a Midnight wallet) +The connector exposes shielded balances by token and amount, without the nonce of each owned coin. `convertToUnshielded` must receive that exact nonce, color and value, so the frontend persists the deterministic coin candidate before forward wallet interaction and makes it spendable only after the contract returns the same coin. Reverse conversion therefore spends one whole coin minted and retained by this browser. Valid records from the older v1 two-step UI migrate into the scoped v1 store. -1. `bun run dev`; install a Midnight wallet extension set to **preview**. -2. Put the preview contract address in `.env`, reload. -3. Click **Connect wallet** (top-right) → approve. Balances panel shows NIGHT + sNight. -4. Enter an amount, **Swap NIGHT → sNight**, approve both prompts → sNight balance rises. -5. Flip direction, **Swap sNight → NIGHT** (converts a dApp-minted coin) → NIGHT rises. +An uncertain forward or reverse submission keeps the coin record quarantined with its transaction id and network; it is not offered again automatically. A known pre-submission failure or wallet cancellation removes a pending forward candidate. sNight received from another wallet, previously minted by the atomic UI that discarded its result, or cleared from browser storage cannot be reversed until the wallet connector exposes coin-level details. -## Build +## Validation ```bash -bun run typecheck # tsc --noEmit -bun run build # vite build → dist/ +bun --cwd frontend run typecheck +bun --cwd frontend run build +bun run test:unit -- test/unit/frontend-wallet-boundary.unit.test.ts test/unit/runtime-config.unit.test.ts ``` -The build bundles the ledger/runtime WASM and copies the contract artifacts. The -ledger WASM is ~10 MB and prover keys are multi-MB — expect a large first load, -cached by the browser afterward. +CI additionally installs both protocol lockfiles on Linux, rebuilds both contract artifact trees with their pinned Compact compilers, checks byte-exact output and runs the Docker integration suite. diff --git a/frontend/protocols/shared/adapter-core.ts b/frontend/protocols/shared/adapter-core.ts new file mode 100644 index 0000000..32eb556 --- /dev/null +++ b/frontend/protocols/shared/adapter-core.ts @@ -0,0 +1,350 @@ +import type { ConnectedAPI } from '@midnight-ntwrk/dapp-connector-api'; +import type { + Balances, + Direction, + ProfileBridge, + ProtocolSession, + ShieldedCoinInfo, + SwapCallbacks, +} from './types.js'; +import { createWrapperCoinStore, type CoinStorage } from './coin-store.js'; + +function bytesToHex(bytes: Uint8Array): string { + return Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join(''); +} + +function hexToBytes(value: string): Uint8Array { + const hex = value.trim().replace(/^0x/i, ''); + if (!hex || hex.length % 2 !== 0 || !/^[0-9a-f]+$/i.test(hex)) { + throw new Error('The wallet returned an invalid transaction encoding.'); + } + return Uint8Array.from(hex.match(/.{2}/g) ?? [], (part) => Number.parseInt(part, 16)); +} + +function normalizeTokenId(value: string): string { + return value.trim().replace(/^0x/i, '').toLowerCase(); +} + +function pickBalance( + balances: Record, + candidates: readonly string[], +): { key: string; value: bigint } | undefined { + const normalized = new Set(candidates.map(normalizeTokenId)); + const matches = Object.entries(balances).filter(([key]) => normalized.has(normalizeTokenId(key))); + if (matches.length > 1) throw new Error(`Wallet returned duplicate token identifiers for ${candidates[0]}.`); + return matches.length === 1 ? { key: matches[0][0], value: BigInt(matches[0][1]) } : undefined; +} + +function randomBytes32(): Uint8Array { + const value = new Uint8Array(32); + globalThis.crypto.getRandomValues(value); + return value; +} + +function inactiveError(): Error { + return new Error('The selected network changed; reconnect the wallet before submitting.'); +} + +function requireShieldedCoin(value: unknown, expected: ShieldedCoinInfo): ShieldedCoinInfo { + if (!value || typeof value !== 'object') throw new Error('The contract did not return the minted sNight coin.'); + const coin = value as Partial; + if (!(coin.nonce instanceof Uint8Array) || !(coin.color instanceof Uint8Array) || typeof coin.value !== 'bigint') { + throw new Error('The contract returned malformed sNight coin data.'); + } + if (coin.nonce.length !== 32 || coin.color.length !== 32 || coin.value !== expected.value) { + throw new Error('The contract returned unexpected sNight coin data.'); + } + if (bytesToHex(coin.color) !== bytesToHex(expected.color) || bytesToHex(coin.nonce) !== bytesToHex(expected.nonce)) { + throw new Error('The contract returned a coin with an unexpected nonce or token identity.'); + } + return { nonce: coin.nonce.slice(), color: coin.color.slice(), value: coin.value }; +} + +function isWalletCancellation(error: unknown): boolean { + const seen = new Set(); + let current = error; + for (let depth = 0; current != null && depth < 8 && !seen.has(current); depth += 1) { + seen.add(current); + if (typeof current !== 'object') return false; + const value = current as { code?: unknown; reason?: unknown; message?: unknown; cause?: unknown }; + const code = String(value.code ?? '').toUpperCase(); + if (['4001', 'ACTION_REJECTED', 'USER_REJECTED', 'USER_CANCELLED', 'USER_CANCELED'].includes(code)) return true; + const detail = [value.reason, value.message].filter((part): part is string => typeof part === 'string').join(' '); + if (/\buser (?:rejected|declined|cancelled|canceled|denied|aborted)\b/i.test(detail)) return true; + current = value.cause; + } + return false; +} + +function submissionIdentity(error: unknown): { transactionId: string; networkId?: string } | undefined { + const seen = new Set(); + let current = error; + for (let depth = 0; current != null && depth < 10 && !seen.has(current); depth += 1) { + seen.add(current); + if (typeof current !== 'object') return undefined; + const value = current as { transactionId?: unknown; networkId?: unknown; cause?: unknown }; + if (typeof value.transactionId === 'string' && value.transactionId) { + return { + transactionId: value.transactionId, + ...(typeof value.networkId === 'string' && value.networkId ? { networkId: value.networkId } : {}), + }; + } + current = value.cause; + } + return undefined; +} + +export function createWalletBoundary( + connectedAPI: ConnectedAPI, + shieldedAddress: { + shieldedCoinPublicKey: string; + shieldedEncryptionPublicKey: string; + }, + bridge: Pick, + isActive: () => boolean, + expectedNetworkId: string, + onSubmitted: (transactionId: string) => void = () => undefined, +) { + const walletBalancedTransactions = new WeakMap(); + const assertWalletNetwork = async () => { + if (!isActive()) throw inactiveError(); + const configuration = await connectedAPI.getConfiguration(); + if (!isActive()) throw inactiveError(); + if (configuration.networkId !== expectedNetworkId) { + throw new Error(`Wallet changed to ${configuration.networkId}; reconnect it to ${expectedNetworkId}.`); + } + }; + const walletProvider = { + getCoinPublicKey: () => shieldedAddress.shieldedCoinPublicKey, + getEncryptionPublicKey: () => shieldedAddress.shieldedEncryptionPublicKey, + async balanceTx(transaction: { serialize(): Uint8Array }) { + await assertWalletNetwork(); + if (!isActive()) throw inactiveError(); + const result = await connectedAPI.balanceUnsealedTransaction(bytesToHex(transaction.serialize())); + await assertWalletNetwork(); + const balanced = bridge.deserializeFinalizedTransaction(hexToBytes(result.tx)); + walletBalancedTransactions.set(balanced, normalizeTokenId(result.tx)); + return balanced; + }, + }; + const midnightProvider = { + async submitTx(transaction: { identifiers(): string[]; serialize(): Uint8Array }) { + await assertWalletNetwork(); + if (!isActive()) throw inactiveError(); + const transactionId = transaction.identifiers()[0]; + if (!transactionId) throw new Error('The balanced transaction has no identifier.'); + const exactWalletBytes = walletBalancedTransactions.get(transaction) ?? bytesToHex(transaction.serialize()); + walletBalancedTransactions.delete(transaction); + try { + if (!isActive()) throw inactiveError(); + await connectedAPI.submitTransaction(exactWalletBytes); + onSubmitted(transactionId); + } catch (error) { + if (isWalletCancellation(error)) throw error; + throw Object.assign( + new Error(`Transaction ${transactionId} submission on ${expectedNetworkId} could not be confirmed.`, { cause: error }), + { transactionId, networkId: expectedNetworkId }, + ); + } + return transactionId; + }, + }; + return { walletProvider, midnightProvider }; +} + +export async function createProtocolSession(input: { + bridge: ProfileBridge; + connectedAPI: ConnectedAPI; + networkId: string; + contractAddress: string; + coinStorage?: CoinStorage; +}): Promise { + const { bridge, connectedAPI, networkId, contractAddress } = input; + let active = true; + bridge.setNetworkId(networkId); + const configuration = await connectedAPI.getConfiguration(); + if (configuration.networkId !== networkId) { + throw new Error(`Wallet is on ${configuration.networkId}; select ${networkId} in the wallet and reconnect.`); + } + const [shieldedAddress, unshielded] = await Promise.all([ + connectedAPI.getShieldedAddresses(), + connectedAPI.getUnshieldedAddress(), + ]); + const wrapperColorHex = bridge.deriveWrapperColor(contractAddress); + const coinStore = createWrapperCoinStore({ + protocolFamily: bridge.protocolFamily, + networkId, + contractAddress, + storage: input.coinStorage, + }); + const submissionState: { current?: { transactionId: string; networkId: string } } = {}; + const readSubmittedIdentity = (): { transactionId: string; networkId: string } | undefined => + submissionState.current; + const built = await bridge.buildProviders({ + connectedAPI, + networkId, + contractAddress, + shieldedAddress, + isActive: () => active, + onSubmitted: (transactionId) => { + submissionState.current = { transactionId, networkId }; + }, + }); + let callInFlight = false; + + const assertActiveNetwork = async () => { + if (!active) throw inactiveError(); + const latest = await connectedAPI.getConfiguration(); + if (!active) throw inactiveError(); + if (latest.networkId !== networkId) { + throw new Error(`Wallet changed to ${latest.networkId}; reconnect it to ${networkId}.`); + } + bridge.setNetworkId(networkId); + }; + + const callCircuit = async (circuitId: string, args: unknown[]) => { + if (callInFlight) throw new Error('Another wallet transaction is already in progress.'); + callInFlight = true; + submissionState.current = undefined; + try { + await assertActiveNetwork(); + return await built.call(circuitId, args); + } catch (error) { + const submitted = readSubmittedIdentity(); + if (!submissionIdentity(error) && submitted) { + throw Object.assign( + new Error(`Transaction ${submitted.transactionId} was submitted on ${submitted.networkId}, but finalization could not be confirmed.`, { cause: error }), + submitted, + ); + } + throw error; + } finally { + callInFlight = false; + } + }; + + const mintTrackedCoin = async ( + circuitId: 'convertToShielded' | 'withdrawShielded', + amount: bigint, + buildArguments: (nonce: Uint8Array) => unknown[], + ): Promise => { + const expectedCoin: ShieldedCoinInfo = { + nonce: randomBytes32(), + color: hexToBytes(wrapperColorHex), + value: amount, + }; + // Persist the coin preimage before wallet interaction. A pending record is + // deliberately non-spendable until the submitted call returns the exact + // nonce, color and value that were staged here. + coinStore.stage(expectedCoin); + let response: { private: { result: unknown } }; + try { + response = await callCircuit(circuitId, buildArguments(expectedCoin.nonce)); + } catch (error) { + const identity = submissionIdentity(error); + if (identity) coinStore.markUncertain(expectedCoin, identity.transactionId, identity.networkId ?? networkId); + else coinStore.remove(expectedCoin); + throw error; + } + const returnedCoin = requireShieldedCoin(response.private.result, expectedCoin); + coinStore.add(returnedCoin); + }; + + return { + protocolFamily: bridge.protocolFamily, + connectedAPI, + networkId, + contractAddress, + coinPublicKey: shieldedAddress.shieldedCoinPublicKey, + unshieldedAddress: unshielded.unshieldedAddress, + wrapperColorHex, + addressToBytes: bridge.addressToBytes, + trackedWrapperCoins: coinStore.available, + wrapperCoinState: () => ({ available: coinStore.available(), blocked: coinStore.blocked() }), + async resumeShieldedWithdrawal(secret: Uint8Array, amount: bigint) { + if (amount <= 0n) throw new Error('Stored swap contains an invalid amount.'); + await mintTrackedCoin('withdrawShielded', amount, (nonce) => [ + secret, + amount, + { bytes: bridge.addressToBytes(shieldedAddress.shieldedCoinPublicKey) }, + nonce, + ]); + }, + async readMetadata() { + await assertActiveNetwork(); + const metadata = await built.readMetadata(); + await assertActiveNetwork(); + return metadata; + }, + async refreshBalances(): Promise { + await assertActiveNetwork(); + const [shielded, unshieldedBalances] = await Promise.all([ + connectedAPI.getShieldedBalances(), + connectedAPI.getUnshieldedBalances(), + ]); + await assertActiveNetwork(); + const native = pickBalance(unshieldedBalances, bridge.nativeNightKeys()); + const wrapper = pickBalance(shielded, [wrapperColorHex]); + return { + nativeNight: native?.value ?? 0n, + wrapper: wrapper?.value ?? 0n, + wrapperMatched: wrapper !== undefined, + nativeTokenId: native?.key ?? bridge.nativeNightKeys()[0], + wrapperTokenId: wrapper?.key ?? wrapperColorHex, + allShielded: shielded, + allUnshielded: unshieldedBalances, + trackedWrapperCoins: coinStore.available(), + blockedWrapperCoins: coinStore.blocked(), + }; + }, + async convert(direction: Direction, amount: bigint, callbacks: SwapCallbacks = {}) { + if (amount <= 0n) throw new Error('Enter an amount greater than zero'); + if (direction === 'toShielded') { + callbacks.onStep?.('started', 'Converting NIGHT → sNight in one transaction…'); + callbacks.onLog?.('convertToShielded — approve in wallet'); + await mintTrackedCoin('convertToShielded', amount, (nonce) => [ + amount, + { bytes: bridge.addressToBytes(shieldedAddress.shieldedCoinPublicKey) }, + nonce, + ]); + callbacks.onStep?.('done', 'Converted in one transaction ✓'); + callbacks.onLog?.(`Minted ${amount} sNight (single tx)`); + return; + } + callbacks.onStep?.('started', 'Converting sNight → NIGHT in one transaction…'); + callbacks.onLog?.('convertToUnshielded — approve in wallet'); + const coin = coinStore.available().find((candidate) => candidate.value === amount + && bytesToHex(candidate.color) === normalizeTokenId(wrapperColorHex)); + if (!coin) { + throw new Error('Reverse conversion requires one exact sNight coin minted and retained by this browser.'); + } + coinStore.stage(coin); + let callCompleted = false; + try { + await callCircuit('convertToUnshielded', [ + coin, + { + is_left: false, + left: { bytes: new Uint8Array(32) }, + right: { bytes: bridge.addressToBytes(unshielded.unshieldedAddress) }, + }, + ]); + callCompleted = true; + coinStore.remove(coin); + } catch (error) { + if (callCompleted) throw error; + const identity = submissionIdentity(error); + if (identity) coinStore.markUncertain(coin, identity.transactionId, identity.networkId ?? networkId); + else coinStore.add(coin); + throw error; + } + callbacks.onStep?.('done', 'Converted in one transaction ✓'); + callbacks.onLog?.(`Released ${amount} NIGHT (single tx)`); + }, + callCircuit, + dispose() { + active = false; + void built.providers.publicDataProvider.dispose?.(); + }, + }; +} diff --git a/frontend/protocols/shared/coin-store.ts b/frontend/protocols/shared/coin-store.ts new file mode 100644 index 0000000..b4a16dd --- /dev/null +++ b/frontend/protocols/shared/coin-store.ts @@ -0,0 +1,136 @@ +import type { BlockedWrapperCoin, ProtocolFamily, ShieldedCoinInfo } from './types.js'; + +export interface CoinStorage { + getItem(key: string): string | null; + setItem(key: string, value: string): void; + removeItem(key: string): void; +} + +interface StoredCoin { + nonceHex: string; + colorHex: string; + value: string; + status: 'pending' | 'available' | 'uncertain'; + transactionId?: string; + networkId?: string; +} + +const bytesToHex = (bytes: Uint8Array): string => + Array.from(bytes, (value) => value.toString(16).padStart(2, '0')).join(''); + +const hexToBytes = (hex: string): Uint8Array => + Uint8Array.from(hex.match(/.{2}/g) ?? [], (part) => Number.parseInt(part, 16)); + +function validStoredCoin(value: unknown): value is StoredCoin { + if (!value || typeof value !== 'object') return false; + const coin = value as Partial; + return typeof coin.nonceHex === 'string' + && /^[0-9a-f]{64}$/i.test(coin.nonceHex) + && typeof coin.colorHex === 'string' + && /^[0-9a-f]{64}$/i.test(coin.colorHex) + && typeof coin.value === 'string' + && /^[1-9][0-9]*$/.test(coin.value) + && (coin.status === 'pending' || coin.status === 'available' || coin.status === 'uncertain'); +} + +function stored(coin: ShieldedCoinInfo, status: StoredCoin['status'] = 'available'): StoredCoin { + if (coin.nonce.length !== 32 || coin.color.length !== 32 || coin.value <= 0n) { + throw new Error('The contract returned malformed shielded coin data.'); + } + return { + nonceHex: bytesToHex(coin.nonce), + colorHex: bytesToHex(coin.color), + value: coin.value.toString(), + status, + }; +} + +const identity = (coin: Pick): string => + `${coin.nonceHex}:${coin.colorHex}:${coin.value}`; + +function defaultStorage(): CoinStorage { + try { + if (typeof localStorage !== 'undefined') return localStorage; + } catch { + // Fall through to the actionable error below. + } + throw new Error('Browser storage is required to retain sNight coin details for reverse conversion.'); +} + +export function createWrapperCoinStore(input: { + protocolFamily: ProtocolFamily; + networkId: string; + contractAddress: string; + storage?: CoinStorage; +}) { + const storage = input.storage ?? defaultStorage(); + const key = `shielded-night:coins:${input.protocolFamily}:${input.networkId}:${input.contractAddress}`; + const legacyKey = `cv:coins:${input.contractAddress}`; + + const parse = (raw: string | null): StoredCoin[] => { + if (!raw) return []; + try { + const value: unknown = JSON.parse(raw); + if (!Array.isArray(value)) return []; + return value.flatMap((entry) => { + if (entry && typeof entry === 'object' && !('status' in entry)) { + entry = { ...entry, status: 'available' }; + } + return validStoredCoin(entry) ? [{ ...entry }] : []; + }); + } catch { + return []; + } + }; + const save = (coins: StoredCoin[]) => storage.setItem(key, JSON.stringify(coins)); + + let initial = storage.getItem(key); + if (initial == null && input.protocolFamily === 'midnight-1.x') { + const migrated = parse(storage.getItem(legacyKey)); + if (migrated.length > 0) save(migrated); + initial = storage.getItem(key); + } + // Fail during connection, before a transaction can mint a coin whose nonce + // the connector cannot later recover. + save(parse(initial)); + + const all = () => parse(storage.getItem(key)); + return { + key, + available(): ShieldedCoinInfo[] { + return all().filter((coin) => coin.status === 'available').map((coin) => ({ + nonce: hexToBytes(coin.nonceHex), + color: hexToBytes(coin.colorHex), + value: BigInt(coin.value), + })); + }, + blocked(): BlockedWrapperCoin[] { + return all().filter((coin) => coin.status !== 'available').map((coin) => ({ + status: coin.status as 'pending' | 'uncertain', + value: BigInt(coin.value), + ...(coin.transactionId ? { transactionId: coin.transactionId } : {}), + ...(coin.networkId ? { networkId: coin.networkId } : {}), + })); + }, + add(coin: ShieldedCoinInfo): void { + const next = stored(coin); + const coins = all().filter((candidate) => identity(candidate) !== identity(next)); + save([...coins, next]); + }, + stage(coin: ShieldedCoinInfo): void { + const next = stored(coin, 'pending'); + const coins = all().filter((candidate) => identity(candidate) !== identity(next)); + save([...coins, next]); + }, + remove(coin: ShieldedCoinInfo): void { + const selected = stored(coin); + save(all().filter((candidate) => identity(candidate) !== identity(selected))); + }, + markUncertain(coin: ShieldedCoinInfo, transactionId: string, networkId: string): void { + const selected = stored(coin); + save(all().map((candidate) => identity(candidate) === identity(selected) + ? { ...candidate, status: 'uncertain', transactionId, networkId } + : candidate)); + }, + }; +} diff --git a/frontend/protocols/shared/types.ts b/frontend/protocols/shared/types.ts new file mode 100644 index 0000000..ae98ff4 --- /dev/null +++ b/frontend/protocols/shared/types.ts @@ -0,0 +1,87 @@ +import type { ConnectedAPI } from '@midnight-ntwrk/dapp-connector-api'; + +export type ProtocolFamily = 'midnight-1.x' | 'midnight-2.x'; +export type Direction = 'toShielded' | 'toUnshielded'; +export type SwapStep = 'started' | 'deposited' | 'done'; + +export interface Balances { + nativeNight: bigint; + wrapper: bigint; + wrapperMatched: boolean; + nativeTokenId?: string; + wrapperTokenId?: string; + allShielded: Record; + allUnshielded: Record; + trackedWrapperCoins: ShieldedCoinInfo[]; + blockedWrapperCoins: BlockedWrapperCoin[]; +} + +export interface BlockedWrapperCoin { + status: 'pending' | 'uncertain'; + value: bigint; + transactionId?: string; + networkId?: string; +} + +export interface SwapCallbacks { + onStep?: (step: SwapStep, label: string) => void; + onLog?: (message: string) => void; +} + +export interface ShieldedCoinInfo { + nonce: Uint8Array; + color: Uint8Array; + value: bigint; +} + +export interface ProtocolSession { + readonly protocolFamily: ProtocolFamily; + readonly connectedAPI: ConnectedAPI; + readonly networkId: string; + readonly contractAddress: string; + readonly coinPublicKey: string; + readonly unshieldedAddress: string; + readonly wrapperColorHex: string; + addressToBytes(address: string): Uint8Array; + trackedWrapperCoins(): ShieldedCoinInfo[]; + wrapperCoinState(): { available: ShieldedCoinInfo[]; blocked: BlockedWrapperCoin[] }; + resumeShieldedWithdrawal(secret: Uint8Array, amount: bigint): Promise; + readMetadata(): Promise<{ name: string; symbol: string }>; + refreshBalances(): Promise; + convert(direction: Direction, amount: bigint, callbacks?: SwapCallbacks): Promise; + callCircuit(circuitId: string, args: unknown[]): Promise<{ private: { result: unknown } }>; + dispose(): void; +} + +export interface ProfileBridge { + readonly protocolFamily: ProtocolFamily; + setNetworkId(networkId: string): void; + deserializeFinalizedTransaction(bytes: Uint8Array): { + identifiers(): string[]; + serialize(): Uint8Array; + }; + addressToBytes(address: string): Uint8Array; + nativeNightKeys(): string[]; + deriveWrapperColor(contractAddress: string): string; + buildProviders(input: { + connectedAPI: ConnectedAPI; + networkId: string; + contractAddress: string; + shieldedAddress: { + shieldedAddress: string; + shieldedCoinPublicKey: string; + shieldedEncryptionPublicKey: string; + }; + isActive(): boolean; + onSubmitted(transactionId: string): void; + }): Promise<{ + providers: Record & { + publicDataProvider: { + queryContractState(address: string): Promise; + dispose?: () => void | Promise; + }; + }; + call(circuitId: string, args: unknown[]): Promise<{ private: { result: unknown } }>; + readMetadata(): Promise<{ name: string; symbol: string }>; + }>; +} diff --git a/frontend/protocols/v1/package-lock.json b/frontend/protocols/v1/package-lock.json new file mode 100644 index 0000000..a3d1a90 --- /dev/null +++ b/frontend/protocols/v1/package-lock.json @@ -0,0 +1,1095 @@ +{ + "name": "@zswap-da/shielded-night-browser-v1", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@zswap-da/shielded-night-browser-v1", + "version": "0.1.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.1", + "@midnight-ntwrk/compact-runtime": "0.16.0", + "@midnight-ntwrk/ledger-v8": "8.1.0", + "@midnight-ntwrk/midnight-js-contracts": "4.1.1", + "@midnight-ntwrk/midnight-js-fetch-zk-config-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-level-private-state-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-network-id": "4.1.1", + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/onchain-runtime-v3": "3.0.0", + "@midnight-ntwrk/wallet-sdk-address-format": "3.1.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@apollo/client": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-4.2.12.tgz", + "integrity": "sha512-+KS+LM/gZ58z92p9owZZpI54yCc27KfUi1HOtLrxmxz9kDIqUcp/zh+mNjCWCbNZkWGzWslvbbmXGGtTWT8nkw==", + "license": "MIT", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "@wry/caches": "^1.0.0", + "@wry/equality": "^0.5.6", + "@wry/trie": "^0.5.0", + "graphql-tag": "^2.12.6", + "optimism": "^0.18.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "graphql": "^16.0.0 || ^17.0.0", + "graphql-ws": "^5.5.5 || ^6.0.3", + "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "react-dom": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "rxjs": "^7.3.0", + "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" + }, + "peerDependenciesMeta": { + "graphql-ws": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "subscriptions-transport-ws": { + "optional": true + } + } + }, + "node_modules/@effect/platform": { + "version": "0.95.0", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.95.0.tgz", + "integrity": "sha512-WDlRiWRSWlmhCPq09bvAofK0qr5vM4yNklXjoJdZHmugKRRTpN/Okn3ODnjgM/Kb/4hjMrRyrsUeH/Brieq7KA==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.4", + "multipasta": "^0.2.7" + }, + "peerDependencies": { + "effect": "^3.20.0" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@midnight-ntwrk/compact-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-js/-/compact-js-2.5.1.tgz", + "integrity": "sha512-UO0+tDiRadYFO2kaUu9PIhAOISvDKvmiyh9vSOyKEZLj3AUAY1qmmHm/oQrzPqrkiWHO0Rnln/j/zZ5dvc5vxg==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.95.0", + "@midnight-ntwrk/compact-runtime": "0.16.0", + "@midnight-ntwrk/ledger-v8": "^8.0.3", + "@midnight-ntwrk/platform-js": "^2.2.4", + "effect": "^3.20.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/compact-runtime": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-runtime/-/compact-runtime-0.16.0.tgz", + "integrity": "sha512-UR8+MI5zol+gkne17ZZru8xmZNf11xMgQJkiLT9KWsF+QD8Wuz1WONaqQLL0RAZ2aN2XlRsBFd0ViKDVh8prFw==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/onchain-runtime-v3": "^3.0.0", + "@types/object-inspect": "^1.8.1", + "object-inspect": "^1.12.3" + } + }, + "node_modules/@midnight-ntwrk/ledger-v8": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/ledger-v8/-/ledger-v8-8.1.0.tgz", + "integrity": "sha512-rwOVP5kBwACpYmmY6+oLeaiM3e5gHscRMjbZUOntOC5QdtqLdpeep6eQW1OngI+sxjjdVoGg2eE16sLf+DAHmQ==" + }, + "node_modules/@midnight-ntwrk/midnight-js-contracts": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-contracts/-/midnight-js-contracts-4.1.1.tgz", + "integrity": "sha512-vHeKyaj9RXTx+Cep3YpIRgg2EWkzibO4gxI7k/rYpXmGXc3waetrR5sb9FPR7v9SUX00/zf/sYbLp1NZhwZbjg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "4.1.1", + "@midnight-ntwrk/midnight-js-protocol": "4.1.1", + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/midnight-js-utils": "4.1.1" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-fetch-zk-config-provider": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-fetch-zk-config-provider/-/midnight-js-fetch-zk-config-provider-4.1.1.tgz", + "integrity": "sha512-d9vPAXjCvbe3KdPDBwp8Cp4HXwdo9jfCjeyJjJPfIDHCctXrIQ7btu+CqY1+bgV05FHVMOBLjJ9TS2tc2xdwrw==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/midnight-js-utils": "4.1.1", + "cross-fetch": "^4.1.0" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-indexer-public-data-provider": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-indexer-public-data-provider/-/midnight-js-indexer-public-data-provider-4.1.1.tgz", + "integrity": "sha512-50CjiYqw/msRintyfkuNrJl1v4Zj+AaBFmV2uLjY/zpkPop4VBFH4QZSrtKsG1ljT9vzWsxU7Eo4Tn1tgKkPlA==", + "license": "Apache-2.0", + "dependencies": { + "@apollo/client": "^4.2.0", + "@graphql-typed-document-node/core": "^3.2.0", + "@midnight-ntwrk/midnight-js-network-id": "4.1.1", + "@midnight-ntwrk/midnight-js-protocol": "4.1.1", + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/midnight-js-utils": "4.1.1", + "buffer": "^6.0.3", + "cross-fetch": "^4.1.0", + "graphql": "^16.14.0", + "graphql-ws": "^6.0.8", + "isomorphic-ws": "^5.0.0", + "rxjs": "^7.8.2", + "ws": "^8.20.0" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-level-private-state-provider": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-level-private-state-provider/-/midnight-js-level-private-state-provider-4.1.1.tgz", + "integrity": "sha512-i+1lXJ4rcRGERnOPXHc3/Oh5ef7X/yb6p51bOAUjITazdPPcuU8qTeTeFgX+lPhWTGxROb9/pgrrVPH9G0FxSw==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "4.1.1", + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/midnight-js-utils": "4.1.1", + "@noble/ciphers": "^2.2.0", + "@noble/hashes": "^2.2.0", + "abstract-level": "^3.1.1", + "buffer": "^6.0.3", + "level": "^10.0.0", + "superjson": "^2.2.6" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-network-id": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-network-id/-/midnight-js-network-id-4.1.1.tgz", + "integrity": "sha512-g49IBK0In1Jt2wKgi18rUvoy1ShGVrfb/VvgWALkc9Noc6+4MX5NTLVg5zqu+CyO2waIGb5lqDPnAhTD9wPAOQ==", + "license": "Apache-2.0" + }, + "node_modules/@midnight-ntwrk/midnight-js-protocol": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-protocol/-/midnight-js-protocol-4.1.1.tgz", + "integrity": "sha512-JH1010ir3YrawKsA4C08aIXWpFGHrCrAaBkZFbn+xh+iwOX5Ss0WU4//mDSEnHvQN0wD6GTc2JwUfKYFaS2CcA==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.1", + "@midnight-ntwrk/compact-runtime": "0.16.0", + "@midnight-ntwrk/ledger-v8": "8.1.0", + "@midnight-ntwrk/onchain-runtime-v3": "3.0.0", + "@midnight-ntwrk/platform-js": "2.2.4" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-types": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-types/-/midnight-js-types-4.1.1.tgz", + "integrity": "sha512-MPT7YToXN2EsDtOOVSJonYZSZ4eqmdVgftBfH56w+tmZM0sZt9u+Mq18uuBQl9ebpTXnp8o7WqeISbgPMxTBcQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "4.1.1", + "effect": "^3.20.0", + "pino": "^10.3.1", + "rxjs": "^7.8.2" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-utils/-/midnight-js-utils-4.1.1.tgz", + "integrity": "sha512-b65QADd2FaZbWXe9D3fe9mSGmPlP1DTRMGSruJqhl9fOTNxBhQIzIKs0j/eL9Kv77dVeGDYgQdbV+JkDj3j5Qg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "4.1.1", + "@midnight-ntwrk/midnight-js-protocol": "4.1.1", + "@midnight-ntwrk/wallet-sdk-address-format": "^3.1.0" + } + }, + "node_modules/@midnight-ntwrk/onchain-runtime-v3": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/onchain-runtime-v3/-/onchain-runtime-v3-3.0.0.tgz", + "integrity": "sha512-HbFbUOsvgpEFy1OT0Ni2LMFk4jnMQS1em+H+Mof/B3DpnNKl0Lkx5QiulKOc6pyU4KPEagOqx4fYNyVXFwgZ7g==" + }, + "node_modules/@midnight-ntwrk/platform-js": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/platform-js/-/platform-js-2.2.4.tgz", + "integrity": "sha512-6mrYKSSE8kPgn/5rQ2xofDJk1yAZZRdLOO6Yelweuh5GOnOGz7Qw4venDG/c4TRqtV9ouFp+F5j7ta8aprMinw==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.95.0", + "effect": "^3.20.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/wallet-sdk-address-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/wallet-sdk-address-format/-/wallet-sdk-address-format-3.1.0.tgz", + "integrity": "sha512-X/MQnbyQQ1SoFVJrxhczkHza1SMJghp3Eo49nXXnHZw2qKUUmpiNa8Hx3MYFq36NXi3m3gsMH7rW0bilMFvdhw==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/ledger-v8": "^8.0.2", + "@scure/base": "^2.0.0", + "@subsquid/scale-codec": "^4.0.1" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz", + "integrity": "sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.4.tgz", + "integrity": "sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.4.tgz", + "integrity": "sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.4.tgz", + "integrity": "sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.4.tgz", + "integrity": "sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.4.tgz", + "integrity": "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@noble/ciphers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.4.0.tgz", + "integrity": "sha512-AnjFn0Jv92laAkvMrghlFZq4qQCIN/4DxFV/eooqtC2YTjB7kBeLMS2T9KJX4Dn+ZVXLOwK0lSgqDtx9gvxtiw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.4.0.tgz", + "integrity": "sha512-X5XaVWZIBCT7HHZGm5I7ZQXDwLG+bGXuSrMQAW+7Zvl87h1kmc1ZB1VSRJcpUfoUrGQp4Fkoxm5kZ+Ms+aW+eA==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "license": "MIT" + }, + "node_modules/@scure/base": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.4.0.tgz", + "integrity": "sha512-thZ1TuJwFwBblOhgsjDKvvGirBxNp+wSvY/DR6tJBJOTDhdAAcHJ8Vbr2eFnqaxeca4+t0i9KBf+uHYGWwZORg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@subsquid/scale-codec": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@subsquid/scale-codec/-/scale-codec-4.0.1.tgz", + "integrity": "sha512-H3mi5GIvlrvOSJVSYQRNnaiulSDktPF4TwUvquAgN86tN4kokyX8XcEM2Htrm1sVWRtMi7SgYpyVR5Yg5iPKUQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.2", + "@subsquid/util-internal-json": "^1.2.2" + } + }, + "node_modules/@subsquid/util-internal-hex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-hex/-/util-internal-hex-1.2.3.tgz", + "integrity": "sha512-rGIQKHP+RpriJR56oL/AD43H/KX1EQwsvUy8nP6IHnk/vmaLyC2ECTp5n0jB7kq4NYK4C2VotP3lXHR0vWpa0A==", + "license": "GPL-3.0-or-later" + }, + "node_modules/@subsquid/util-internal-json": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-json/-/util-internal-json-1.2.4.tgz", + "integrity": "sha512-YrEzKjTRPRI4FtJVQqn3mPlIYSWbKGazpOpccRYITmxH0jzKtUfwpIkeCRurVsB/293+oFO8YqyQ6LO14FbLwQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.3" + } + }, + "node_modules/@types/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@types/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-lwGTVESDDV+XsQ1pH4UifpJ1f7OtXzQ6QBOX2Afq2bM/T3oOt8hF6exJMjjIjtEWeAN2YAo25J7HxWh97CCz9w==", + "license": "MIT" + }, + "node_modules/@wry/caches": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.1.tgz", + "integrity": "sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/context": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", + "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/equality": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", + "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/trie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", + "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/abstract-level": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-3.1.1.tgz", + "integrity": "sha512-CW2gKbJFTuX1feMvOrvsVMmijAOgI9kg2Ie9Dq3gOcMt/dVVoVmqNlLcEUCT13NxHFMEajcUcVBIplbyDroDiw==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "is-buffer": "^2.0.5", + "level-supports": "^6.2.0", + "level-transcoder": "^1.0.1", + "maybe-combine-errors": "^1.0.0", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/browser-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-3.0.0.tgz", + "integrity": "sha512-kGXtLh29jMwqKaskz5xeDLtCtN1KBz/DbQSqmvH7QdJiyGRC7RAM8PPg6gvUiNMa+wVnaxS9eSmEtP/f5ajOVw==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/classic-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-3.0.0.tgz", + "integrity": "sha512-yGy8j8LjPbN0Bh3+ygmyYvrmskVita92pD/zCoalfcC9XxZj6iDtZTAnz+ot7GG8p9KLTG+MZ84tSA4AhkgVZQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/copy-anything": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.1.0.tgz", + "integrity": "sha512-ufbM3smX/Jbnpk5wcQjzd1MgBpzmqfNETUAyZNrGwU9foRlyHoGzMMBBCRzEhQLBjZfFDE1W2ufPXX2vdWkV8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/cross-fetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", + "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/effect": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.22.1.tgz", + "integrity": "sha512-TNoXushmPOBAjJlthF5d2QwnX2xBPEtcNJr5XKNKbRLbDvBcOYkXlYDfvGfSA0zriwLFuCll5MDtNMAdZL17PQ==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/find-my-way-ts": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", + "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", + "license": "MIT" + }, + "node_modules/graphql": { + "version": "16.14.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.2.tgz", + "integrity": "sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", + "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/graphql-ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.2.1.tgz", + "integrity": "sha512-NMbPNeTwXpUOxmczdMtzEnynLNbbR267E9hRcJ81SSbQeIvZup3cMjbD1ZT3jpS2xkpxooisitvO7LZNOyz17Q==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@fastify/websocket": "^10 || ^11", + "crossws": "~0.3", + "graphql": "^15.10.1 || ^16 || ^17", + "ws": "^8" + }, + "peerDependenciesMeta": { + "@fastify/websocket": { + "optional": true + }, + "crossws": { + "optional": true + }, + "ws": { + "optional": true + } + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/level": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-10.0.0.tgz", + "integrity": "sha512-aZJvdfRr/f0VBbSRF5C81FHON47ZsC2TkGxbBezXpGGXAUEL/s6+GP73nnhAYRSCIqUNsmJjfeOF4lzRDKbUig==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "browser-level": "^3.0.0", + "classic-level": "^3.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/level" + } + }, + "node_modules/level-supports": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-6.2.0.tgz", + "integrity": "sha512-QNxVXP0IRnBmMsJIh+sb2kwNCYcKciQZJEt+L1hPCHrKNELllXhvrlClVHXBYZVT+a7aTSM6StgNXdAldoab3w==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/maybe-combine-errors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/maybe-combine-errors/-/maybe-combine-errors-1.0.0.tgz", + "integrity": "sha512-eefp6IduNPT6fVdwPp+1NgD0PML1NU5P6j1Mj5nz1nidX8/sWY7119WL8vTAHgqfsY74TzW0w1XPgdYEKkGZ5A==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/msgpackr": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.12.1.tgz", + "integrity": "sha512-4EUH9tQHnMmEgzW/MdAP0KIfa1T9AF+htl0ffe2n5vb2EKn9y2co8ccpgWko6S52Jy1PQZKwRnx5/KkYjtd9MQ==", + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.4.tgz", + "integrity": "sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4" + } + }, + "node_modules/multipasta": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.8.tgz", + "integrity": "sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==", + "license": "MIT" + }, + "node_modules/napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/optimism": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.1.tgz", + "integrity": "sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==", + "license": "MIT", + "dependencies": { + "@wry/caches": "^1.0.0", + "@wry/context": "^0.7.0", + "@wry/trie": "^0.5.0", + "tslib": "^2.3.0" + } + }, + "node_modules/pino": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.3.1.tgz", + "integrity": "sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==", + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^4.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz", + "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==", + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "license": "MIT" + }, + "node_modules/process-warning": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.1.0.tgz", + "integrity": "sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "license": "MIT" + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/superjson": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz", + "integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==", + "license": "MIT", + "dependencies": { + "copy-anything": "^4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/thread-stream": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz", + "integrity": "sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==", + "license": "MIT", + "dependencies": { + "real-require": "^1.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/thread-stream/node_modules/real-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz", + "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/ws": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/frontend/protocols/v1/package.json b/frontend/protocols/v1/package.json new file mode 100644 index 0000000..6cf2524 --- /dev/null +++ b/frontend/protocols/v1/package.json @@ -0,0 +1,28 @@ +{ + "name": "@zswap-da/shielded-night-browser-v1", + "version": "0.1.0", + "private": true, + "type": "module", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.1", + "@midnight-ntwrk/compact-runtime": "0.16.0", + "@midnight-ntwrk/ledger-v8": "8.1.0", + "@midnight-ntwrk/midnight-js-contracts": "4.1.1", + "@midnight-ntwrk/midnight-js-fetch-zk-config-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-level-private-state-provider": "4.1.1", + "@midnight-ntwrk/midnight-js-network-id": "4.1.1", + "@midnight-ntwrk/midnight-js-types": "4.1.1", + "@midnight-ntwrk/onchain-runtime-v3": "3.0.0", + "@midnight-ntwrk/wallet-sdk-address-format": "3.1.0" + }, + "overrides": { + "@midnight-ntwrk/compact-js": "2.5.1", + "@midnight-ntwrk/compact-runtime": "0.16.0", + "@midnight-ntwrk/ledger-v8": "8.1.0", + "@midnight-ntwrk/onchain-runtime-v3": "3.0.0" + }, + "engines": { + "node": ">=22" + } +} diff --git a/frontend/protocols/v1/src/adapter.ts b/frontend/protocols/v1/src/adapter.ts new file mode 100644 index 0000000..ec1e1aa --- /dev/null +++ b/frontend/protocols/v1/src/adapter.ts @@ -0,0 +1,108 @@ +import { CompiledContract } from '@midnight-ntwrk/compact-js'; +import { ContractState } from '@midnight-ntwrk/compact-runtime'; +import * as ledgerV1 from '@midnight-ntwrk/ledger-v8'; +import { submitCallTx } from '@midnight-ntwrk/midnight-js-contracts'; +import { FetchZkConfigProvider } from '@midnight-ntwrk/midnight-js-fetch-zk-config-provider'; +import { indexerPublicDataProvider } from '@midnight-ntwrk/midnight-js-indexer-public-data-provider'; +import { levelPrivateStateProvider } from '@midnight-ntwrk/midnight-js-level-private-state-provider'; +import { setNetworkId } from '@midnight-ntwrk/midnight-js-network-id'; +import { createProofProvider } from '@midnight-ntwrk/midnight-js-types'; +import { MidnightBech32m } from '@midnight-ntwrk/wallet-sdk-address-format'; +import * as ShieldedNight from '../../../../src/managed/contract/index.js'; +import { createProtocolSession, createWalletBoundary } from '../../shared/adapter-core'; +import type { ProfileBridge } from '../../shared/types'; + +const ASSET_PATH = './contract/v1/shielded-night'; +const compiled = (CompiledContract.make as unknown as (name: string, contract: unknown) => any)( + 'ShieldedNight-v1', + ShieldedNight.Contract, +).pipe( + CompiledContract.withVacantWitnesses, + (CompiledContract.withCompiledFileAssets as unknown as (path: string) => unknown)(ASSET_PATH), +); + +function addressToBytes(value: string): Uint8Array { + const clean = value.trim().replace(/^0x/i, ''); + if (/^[0-9a-f]+$/i.test(clean) && clean.length % 2 === 0) { + return Uint8Array.from(clean.match(/.{2}/g) ?? [], (part) => Number.parseInt(part, 16)); + } + return Uint8Array.from((MidnightBech32m.parse(value) as unknown as { data: Uint8Array }).data); +} + +function deriveWrapperColor(contractAddress: string): string { + const domain = new Uint8Array(32); + domain.set(new TextEncoder().encode('shielded-night:wrapper')); + return ledgerV1.rawTokenType(domain, contractAddress).toLowerCase(); +} + +const bridge: ProfileBridge = { + protocolFamily: 'midnight-1.x', + setNetworkId, + deserializeFinalizedTransaction: (bytes) => ledgerV1.Transaction.deserialize( + 'signature', + 'proof', + 'binding', + bytes, + ) as unknown as ReturnType, + addressToBytes, + nativeNightKeys() { + return [ledgerV1.nativeToken().raw, ledgerV1.unshieldedToken().raw].map((value) => value.toLowerCase()); + }, + deriveWrapperColor, + async buildProviders(input) { + const configuration = await input.connectedAPI.getConfiguration(); + const zkConfigProvider = new FetchZkConfigProvider(ASSET_PATH, window.fetch.bind(window)); + const publicDataProvider = indexerPublicDataProvider(configuration.indexerUri, configuration.indexerWsUri); + const originalQuery = publicDataProvider.queryZSwapAndContractState.bind(publicDataProvider); + publicDataProvider.queryZSwapAndContractState = async (...args: Parameters) => { + const result = await originalQuery(...args); + return result + ? [result[0].postBlockUpdate(new Date()), result[1], result[2]] + : result; + }; + const provingProvider = await input.connectedAPI.getProvingProvider(zkConfigProvider.asKeyMaterialProvider()); + const { walletProvider, midnightProvider } = createWalletBoundary( + input.connectedAPI, + input.shieldedAddress, + bridge, + input.isActive, + input.networkId, + input.onSubmitted, + ); + const providers = { + privateStateProvider: levelPrivateStateProvider({ + privateStoragePasswordProvider: () => 'shielded-night-dapp-storage-password!', + accountId: input.shieldedAddress.shieldedAddress, + }), + publicDataProvider, + zkConfigProvider, + proofProvider: createProofProvider(provingProvider), + walletProvider, + midnightProvider, + }; + return { + providers, + call: (circuitId, args) => submitCallTx(providers as never, { + compiledContract: compiled, + contractAddress: input.contractAddress, + circuitId, + args, + } as never) as unknown as Promise<{ private: { result: unknown } }>, + async readMetadata() { + const state = await publicDataProvider.queryContractState(input.contractAddress); + if (!state) throw new Error(`No contract state found at ${input.contractAddress}.`); + const runtimeState = ContractState.deserialize(state.serialize()); + const value = ShieldedNight.ledger(runtimeState.data); + return { name: value._name, symbol: value._symbol }; + }, + }; + }, +}; + +export function createV1Adapter( + connectedAPI: Parameters[0]['connectedAPI'], + networkId: string, + contractAddress: string, +) { + return createProtocolSession({ bridge, connectedAPI, networkId, contractAddress }); +} diff --git a/frontend/protocols/v2/package-lock.json b/frontend/protocols/v2/package-lock.json new file mode 100644 index 0000000..40c468e --- /dev/null +++ b/frontend/protocols/v2/package-lock.json @@ -0,0 +1,1153 @@ +{ + "name": "@zswap-da/shielded-night-browser-v2", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@zswap-da/shielded-night-browser-v2", + "version": "0.1.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-fetch-zk-config-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-level-private-state-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@apollo/client": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-4.2.12.tgz", + "integrity": "sha512-+KS+LM/gZ58z92p9owZZpI54yCc27KfUi1HOtLrxmxz9kDIqUcp/zh+mNjCWCbNZkWGzWslvbbmXGGtTWT8nkw==", + "license": "MIT", + "dependencies": { + "@graphql-typed-document-node/core": "^3.1.1", + "@wry/caches": "^1.0.0", + "@wry/equality": "^0.5.6", + "@wry/trie": "^0.5.0", + "graphql-tag": "^2.12.6", + "optimism": "^0.18.0", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "graphql": "^16.0.0 || ^17.0.0", + "graphql-ws": "^5.5.5 || ^6.0.3", + "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "react-dom": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "rxjs": "^7.3.0", + "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" + }, + "peerDependenciesMeta": { + "graphql-ws": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "subscriptions-transport-ws": { + "optional": true + } + } + }, + "node_modules/@effect/platform": { + "version": "0.97.1", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.97.1.tgz", + "integrity": "sha512-IevWxwmrxCdeXxbXDx/hiOstHtERRigd1nhZSuHgiFEl7NkBmS/5GVWsRacq4NfJN2uCXqggETKNwij15VEpew==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.10", + "multipasta": "^0.2.8" + }, + "peerDependencies": { + "effect": "^3.22.1" + } + }, + "node_modules/@graphql-typed-document-node/core": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@midnight-ntwrk/compact-js": { + "version": "2.5.5-rc.8", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-js/-/compact-js-2.5.5-rc.8.tgz", + "integrity": "sha512-7CGWGCTL+8IvqFUI/srHRwAWxGVLD2ytHLjSyvOcNi6UX1QLeG5vUtGlXQAKSJXvjPwndosqIFdW39OgkNH/Mg==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.97.0", + "@midnight-ntwrk/compact-runtime": "0.19.0-rc.0", + "@midnight-ntwrk/platform-js": "^3.0.0", + "@midnightntwrk/ledger-v9": "^1.0.0-rc.3", + "@noble/hashes": "^2.3.0", + "effect": "^3.22.1", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/compact-runtime": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/compact-runtime/-/compact-runtime-0.19.0.tgz", + "integrity": "sha512-0q1ZOlyPdCCEasAxlHxagO6Sb+Db5GM6qYPQ+c+cp71NRxQgiY0Wd0/LIoshQTs+OBISb4XTjiNQ1lxcKR79qQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/onchain-runtime-v4": "^4.0.0-rc.3", + "@noble/curves": "^2.2.0", + "@noble/hashes": "^2.0.1", + "@types/object-inspect": "^1.8.1", + "object-inspect": "^1.12.3" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-contracts": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-contracts/-/midnight-js-contracts-5.0.0-beta.7.tgz", + "integrity": "sha512-dWM+u2SEShctUb6BvR38wiXWPr4JkYAughEM33RpthP+mnqGP+C5oOq9FOPLzdKvlYg6Ne5Fk+OMiJjaG0AZQg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "effect": "^3.22.1" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-fetch-zk-config-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-fetch-zk-config-provider/-/midnight-js-fetch-zk-config-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-/NgVAV8Zt7AO/fTZ4cxXfeprjkMPh9r4YfzO7Yve8M5p88Z/BBGwji8R0sXwPe251PiMWxtxaekeg5rygb27oQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "cross-fetch": "^4.1.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-indexer-public-data-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-indexer-public-data-provider/-/midnight-js-indexer-public-data-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-rjKG5U1bbjOD4acVia81hrobBVj8xovp1IA++RL4SVE75lveFekqNaZO+Y0Z6RbZwEjVBbmPOAD4jChdFuSFkQ==", + "license": "Apache-2.0", + "dependencies": { + "@apollo/client": "^4.2.5", + "@graphql-typed-document-node/core": "^3.2.0", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "buffer": "^6.0.3", + "cross-fetch": "^4.1.0", + "graphql": "^17.0.1", + "graphql-ws": "^6.0.8", + "isomorphic-ws": "^5.0.0", + "rxjs": "^7.8.2", + "ws": "^8.20.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-level-private-state-provider": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-level-private-state-provider/-/midnight-js-level-private-state-provider-5.0.0-beta.7.tgz", + "integrity": "sha512-O3eLwjltjAkXVeXiKyot2aiM43POGtiem2DhtAD4gfsGbWVPGQ//yFyMDsS92h2eb4eJma9wpUqdmAXzs5ilxQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-utils": "5.0.0-beta.7", + "@noble/ciphers": "^2.2.0", + "@noble/hashes": "^2.2.0", + "abstract-level": "^3.1.1", + "buffer": "^6.0.3", + "level": "^10.0.0", + "superjson": "^2.2.6" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-network-id": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-network-id/-/midnight-js-network-id-5.0.0-beta.7.tgz", + "integrity": "sha512-S51x/aRibCViA+4NdjYImdCHSCltJCCnI0K3K0ZqoAQc6d4b+KfIK1aSvo0cU1k1bdJwQhcgohhWH6Z5GxEHBQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-protocol": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-protocol/-/midnight-js-protocol-5.0.0-beta.7.tgz", + "integrity": "sha512-XwcAiVjEvXqpbp58oZnYq3/TCs1lduN8YHxbRKB4EvltxkpptaHr2fE78MMndpvSDGEgernJreAKO0VYDOACCA==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0-rc.0", + "@midnight-ntwrk/platform-js": "3.0.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-types": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-types/-/midnight-js-types-5.0.0-beta.7.tgz", + "integrity": "sha512-dZMW1DWgvyOPuuSCaEAx6pOYQomT+YYHFrDk9pjPSSRG/3qhe8PKtc2DYFRu9t8E4xy7FkZM8A2EW/S8auf5JQ==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "effect": "^3.22.1", + "pino": "^10.3.1", + "rxjs": "^7.8.2" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/midnight-js-utils": { + "version": "5.0.0-beta.7", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/midnight-js-utils/-/midnight-js-utils-5.0.0-beta.7.tgz", + "integrity": "sha512-mZwdEL/o38yeFp+ba3Uil6xuxFPAC9bplMVoP6Cs6C5gycVaeWkW1h+7wDEKGDcJ2qImfi7egNDHs+u+PbHWTg==", + "license": "Apache-2.0", + "dependencies": { + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-protocol": "5.0.0-beta.7", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2", + "@noble/hashes": "^2.2.0" + }, + "engines": { + "node": ">=22.12" + } + }, + "node_modules/@midnight-ntwrk/platform-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@midnight-ntwrk/platform-js/-/platform-js-3.0.0.tgz", + "integrity": "sha512-cAOpmWURUELDKmcNf8/mZjDtxkqg6ShjV6v0KY7mmwMWkieDEERq/TRmK5cMJgUqMi6nCWjwLZqOmPB07B8Y4A==", + "license": "Apache-2.0", + "dependencies": { + "@effect/platform": "^0.96.1", + "effect": "^3.21.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@midnight-ntwrk/platform-js/node_modules/@effect/platform": { + "version": "0.96.3", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.96.3.tgz", + "integrity": "sha512-LzvIj4HYE++TcTv/cVTCI/GRvQTV0ymwRmgjZMzNB5dU4OS05pTN36RKN0npiOm5orLJgw4yjIv1dNZoYGh/vg==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.10", + "multipasta": "^0.2.7" + }, + "peerDependencies": { + "effect": "^3.21.5" + } + }, + "node_modules/@midnightntwrk/ledger-v9": { + "version": "1.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@midnightntwrk/ledger-v9/-/ledger-v9-1.0.0-rc.3.tgz", + "integrity": "sha512-i/Cl/d2XQ19gIm5SCruMHr+XiruxIn9Ec3i15DrZ/44Yggzu1u5+dG7QUx7Rw1htkgALXivEt7Kw4NzxPr4pBw==" + }, + "node_modules/@midnightntwrk/onchain-runtime-v4": { + "version": "4.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@midnightntwrk/onchain-runtime-v4/-/onchain-runtime-v4-4.0.0-rc.3.tgz", + "integrity": "sha512-LAf4g3vgwtPqActbi5RAoZcfYduqnFqtsHN+i1s/Mcb5vi2yMbPmpSOJ0YCCIGb2S/qY7G5tQARHVD0PJyHSNA==" + }, + "node_modules/@midnightntwrk/wallet-sdk-address-format": { + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@midnightntwrk/wallet-sdk-address-format/-/wallet-sdk-address-format-4.0.0-beta.2.tgz", + "integrity": "sha512-yK4jlntQ0Pgks8dKrPx6J7IMdzIznEYZ4yO9/msIJrn2IM4o1d8+MEh07OMFvZ9ui1YNQB272aUv5muopBCrdA==", + "license": "Apache-2.0", + "dependencies": { + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@scure/base": "^2.0.0", + "@subsquid/scale-codec": "^4.0.1" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz", + "integrity": "sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.4.tgz", + "integrity": "sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.4.tgz", + "integrity": "sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.4.tgz", + "integrity": "sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.4.tgz", + "integrity": "sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.4.tgz", + "integrity": "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@noble/ciphers": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.4.0.tgz", + "integrity": "sha512-AnjFn0Jv92laAkvMrghlFZq4qQCIN/4DxFV/eooqtC2YTjB7kBeLMS2T9KJX4Dn+ZVXLOwK0lSgqDtx9gvxtiw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.4.0.tgz", + "integrity": "sha512-P4/62zrgfH33CneE3Dn4WhJVA22YUU0eR51wKIan4NVRvwsA0YnPTwWGpNbpuacSujmSFLvyzpyuR30+fbq2Ew==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.4.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.4.0.tgz", + "integrity": "sha512-X5XaVWZIBCT7HHZGm5I7ZQXDwLG+bGXuSrMQAW+7Zvl87h1kmc1ZB1VSRJcpUfoUrGQp4Fkoxm5kZ+Ms+aW+eA==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "license": "MIT" + }, + "node_modules/@scure/base": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.4.0.tgz", + "integrity": "sha512-thZ1TuJwFwBblOhgsjDKvvGirBxNp+wSvY/DR6tJBJOTDhdAAcHJ8Vbr2eFnqaxeca4+t0i9KBf+uHYGWwZORg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@subsquid/scale-codec": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@subsquid/scale-codec/-/scale-codec-4.0.1.tgz", + "integrity": "sha512-H3mi5GIvlrvOSJVSYQRNnaiulSDktPF4TwUvquAgN86tN4kokyX8XcEM2Htrm1sVWRtMi7SgYpyVR5Yg5iPKUQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.2", + "@subsquid/util-internal-json": "^1.2.2" + } + }, + "node_modules/@subsquid/util-internal-hex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-hex/-/util-internal-hex-1.2.3.tgz", + "integrity": "sha512-rGIQKHP+RpriJR56oL/AD43H/KX1EQwsvUy8nP6IHnk/vmaLyC2ECTp5n0jB7kq4NYK4C2VotP3lXHR0vWpa0A==", + "license": "GPL-3.0-or-later" + }, + "node_modules/@subsquid/util-internal-json": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@subsquid/util-internal-json/-/util-internal-json-1.2.4.tgz", + "integrity": "sha512-YrEzKjTRPRI4FtJVQqn3mPlIYSWbKGazpOpccRYITmxH0jzKtUfwpIkeCRurVsB/293+oFO8YqyQ6LO14FbLwQ==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@subsquid/util-internal-hex": "^1.2.3" + } + }, + "node_modules/@types/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@types/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-lwGTVESDDV+XsQ1pH4UifpJ1f7OtXzQ6QBOX2Afq2bM/T3oOt8hF6exJMjjIjtEWeAN2YAo25J7HxWh97CCz9w==", + "license": "MIT" + }, + "node_modules/@wry/caches": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.1.tgz", + "integrity": "sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/context": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", + "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/equality": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", + "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/trie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", + "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/abstract-level": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-3.1.1.tgz", + "integrity": "sha512-CW2gKbJFTuX1feMvOrvsVMmijAOgI9kg2Ie9Dq3gOcMt/dVVoVmqNlLcEUCT13NxHFMEajcUcVBIplbyDroDiw==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "is-buffer": "^2.0.5", + "level-supports": "^6.2.0", + "level-transcoder": "^1.0.1", + "maybe-combine-errors": "^1.0.0", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/browser-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-3.0.0.tgz", + "integrity": "sha512-kGXtLh29jMwqKaskz5xeDLtCtN1KBz/DbQSqmvH7QdJiyGRC7RAM8PPg6gvUiNMa+wVnaxS9eSmEtP/f5ajOVw==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/classic-level": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-3.0.0.tgz", + "integrity": "sha512-yGy8j8LjPbN0Bh3+ygmyYvrmskVita92pD/zCoalfcC9XxZj6iDtZTAnz+ot7GG8p9KLTG+MZ84tSA4AhkgVZQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/copy-anything": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.1.0.tgz", + "integrity": "sha512-ufbM3smX/Jbnpk5wcQjzd1MgBpzmqfNETUAyZNrGwU9foRlyHoGzMMBBCRzEhQLBjZfFDE1W2ufPXX2vdWkV8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/cross-fetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", + "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/effect": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.22.1.tgz", + "integrity": "sha512-TNoXushmPOBAjJlthF5d2QwnX2xBPEtcNJr5XKNKbRLbDvBcOYkXlYDfvGfSA0zriwLFuCll5MDtNMAdZL17PQ==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/find-my-way-ts": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", + "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", + "license": "MIT" + }, + "node_modules/graphql": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-17.0.2.tgz", + "integrity": "sha512-FRWbddMxfkjiB7z+aQDWIR+E34xo9I8c9mtK2RPv8PmMzKRvrdsreHL/Ui/TmwHJfhHChEtsFPyMHKI+xuarQQ==", + "license": "MIT", + "engines": { + "node": "^22.0.0 || ^24.0.0 || ^25.0.0 || >=26.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.7.tgz", + "integrity": "sha512-xnE/NFzy+0eIesvAsREJZ284zTl/wYuBAvpsFSDhRGRdRHdnE90M21Q3xAWyYInb0J756c6x0pIQ62+vtvOs1Q==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/graphql-ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.2.1.tgz", + "integrity": "sha512-NMbPNeTwXpUOxmczdMtzEnynLNbbR267E9hRcJ81SSbQeIvZup3cMjbD1ZT3jpS2xkpxooisitvO7LZNOyz17Q==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@fastify/websocket": "^10 || ^11", + "crossws": "~0.3", + "graphql": "^15.10.1 || ^16 || ^17", + "ws": "^8" + }, + "peerDependenciesMeta": { + "@fastify/websocket": { + "optional": true + }, + "crossws": { + "optional": true + }, + "ws": { + "optional": true + } + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/level": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-10.0.0.tgz", + "integrity": "sha512-aZJvdfRr/f0VBbSRF5C81FHON47ZsC2TkGxbBezXpGGXAUEL/s6+GP73nnhAYRSCIqUNsmJjfeOF4lzRDKbUig==", + "license": "MIT", + "dependencies": { + "abstract-level": "^3.1.0", + "browser-level": "^3.0.0", + "classic-level": "^3.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/level" + } + }, + "node_modules/level-supports": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-6.2.0.tgz", + "integrity": "sha512-QNxVXP0IRnBmMsJIh+sb2kwNCYcKciQZJEt+L1hPCHrKNELllXhvrlClVHXBYZVT+a7aTSM6StgNXdAldoab3w==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/maybe-combine-errors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/maybe-combine-errors/-/maybe-combine-errors-1.0.0.tgz", + "integrity": "sha512-eefp6IduNPT6fVdwPp+1NgD0PML1NU5P6j1Mj5nz1nidX8/sWY7119WL8vTAHgqfsY74TzW0w1XPgdYEKkGZ5A==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/msgpackr": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.12.1.tgz", + "integrity": "sha512-4EUH9tQHnMmEgzW/MdAP0KIfa1T9AF+htl0ffe2n5vb2EKn9y2co8ccpgWko6S52Jy1PQZKwRnx5/KkYjtd9MQ==", + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.4.tgz", + "integrity": "sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.4", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.4" + } + }, + "node_modules/multipasta": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.8.tgz", + "integrity": "sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==", + "license": "MIT" + }, + "node_modules/napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/optimism": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.1.tgz", + "integrity": "sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==", + "license": "MIT", + "dependencies": { + "@wry/caches": "^1.0.0", + "@wry/context": "^0.7.0", + "@wry/trie": "^0.5.0", + "tslib": "^2.3.0" + } + }, + "node_modules/pino": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.3.1.tgz", + "integrity": "sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==", + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^4.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz", + "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==", + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "license": "MIT" + }, + "node_modules/process-warning": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.1.0.tgz", + "integrity": "sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "license": "MIT" + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/superjson": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz", + "integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==", + "license": "MIT", + "dependencies": { + "copy-anything": "^4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/thread-stream": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.0.tgz", + "integrity": "sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==", + "license": "MIT", + "dependencies": { + "real-require": "^1.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/thread-stream/node_modules/real-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz", + "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/ws": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/frontend/protocols/v2/package.json b/frontend/protocols/v2/package.json new file mode 100644 index 0000000..aee6c07 --- /dev/null +++ b/frontend/protocols/v2/package.json @@ -0,0 +1,29 @@ +{ + "name": "@zswap-da/shielded-night-browser-v2", + "version": "0.1.0", + "private": true, + "type": "module", + "dependencies": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/midnight-js-contracts": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-fetch-zk-config-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-indexer-public-data-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-level-private-state-provider": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-network-id": "5.0.0-beta.7", + "@midnight-ntwrk/midnight-js-types": "5.0.0-beta.7", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3", + "@midnightntwrk/wallet-sdk-address-format": "4.0.0-beta.2" + }, + "overrides": { + "@midnight-ntwrk/compact-js": "2.5.5-rc.8", + "@midnight-ntwrk/compact-runtime": "0.19.0", + "@midnight-ntwrk/platform-js": "3.0.0", + "@midnightntwrk/ledger-v9": "1.0.0-rc.3", + "@midnightntwrk/onchain-runtime-v4": "4.0.0-rc.3" + }, + "engines": { + "node": ">=22.12" + } +} diff --git a/frontend/protocols/v2/src/adapter.ts b/frontend/protocols/v2/src/adapter.ts new file mode 100644 index 0000000..065c4f5 --- /dev/null +++ b/frontend/protocols/v2/src/adapter.ts @@ -0,0 +1,117 @@ +import { CompiledContract } from '@midnight-ntwrk/compact-js'; +import { ContractState } from '@midnight-ntwrk/compact-runtime'; +import { submitCallTx } from '@midnight-ntwrk/midnight-js-contracts'; +import { FetchZkConfigProvider } from '@midnight-ntwrk/midnight-js-fetch-zk-config-provider'; +import { indexerPublicDataProvider } from '@midnight-ntwrk/midnight-js-indexer-public-data-provider'; +import { levelPrivateStateProvider } from '@midnight-ntwrk/midnight-js-level-private-state-provider'; +import { setNetworkId } from '@midnight-ntwrk/midnight-js-network-id'; +import { createProofProvider } from '@midnight-ntwrk/midnight-js-types'; +import * as ledgerV2 from '@midnightntwrk/ledger-v9'; +import { MidnightBech32m } from '@midnightntwrk/wallet-sdk-address-format'; +import * as ShieldedNight from '../../../../contracts/v2/managed/contract/index.js'; +import { createProtocolSession, createWalletBoundary } from '../../shared/adapter-core'; +import type { ProfileBridge } from '../../shared/types'; + +const ASSET_PATH = './contract/v2/shielded-night'; +const compiled = (CompiledContract.make as unknown as (name: string, contract: unknown) => any)( + 'ShieldedNight-v2', + ShieldedNight.Contract, +).pipe( + CompiledContract.withVacantWitnesses, + (CompiledContract.withCompiledFileAssets as unknown as (path: string) => unknown)(ASSET_PATH), +); + +function addressToBytes(value: string): Uint8Array { + const clean = value.trim().replace(/^0x/i, ''); + if (/^[0-9a-f]+$/i.test(clean) && clean.length % 2 === 0) { + return Uint8Array.from(clean.match(/.{2}/g) ?? [], (part) => Number.parseInt(part, 16)); + } + return Uint8Array.from((MidnightBech32m.parse(value) as unknown as { data: Uint8Array }).data); +} + +function deriveWrapperColor(contractAddress: string): string { + const domain = new Uint8Array(32); + domain.set(new TextEncoder().encode('shielded-night:wrapper')); + return ledgerV2.rawTokenType(domain, contractAddress).toLowerCase(); +} + +const bridge: ProfileBridge = { + protocolFamily: 'midnight-2.x', + setNetworkId, + deserializeFinalizedTransaction: (bytes) => ledgerV2.Transaction.deserialize( + 'signature', + 'proof', + 'binding', + bytes, + ) as unknown as ReturnType, + addressToBytes, + nativeNightKeys() { + return [ledgerV2.nativeToken().raw, ledgerV2.unshieldedToken().raw].map((value) => value.toLowerCase()); + }, + deriveWrapperColor, + async buildProviders(input) { + const configuration = await input.connectedAPI.getConfiguration(); + const zkConfigProvider = new FetchZkConfigProvider(ASSET_PATH, { fetchFunc: window.fetch.bind(window) }); + const publicDataProvider = indexerPublicDataProvider({ + queryURL: configuration.indexerUri, + subscriptionURL: configuration.indexerWsUri, + }); + const originalQuery = publicDataProvider.queryZSwapAndContractState.bind(publicDataProvider); + publicDataProvider.queryZSwapAndContractState = async (...args: Parameters) => { + const result = await originalQuery(...args); + return result + // v9 requires the Merkle-root retention window explicitly. The newly + // inserted current root is sufficient for the transaction being built. + ? [result[0].postBlockUpdate(new Date(), 0n), result[1], result[2]] + : result; + }; + const provingProvider = await input.connectedAPI.getProvingProvider(zkConfigProvider.asKeyMaterialProvider()); + const { walletProvider, midnightProvider } = createWalletBoundary( + input.connectedAPI, + input.shieldedAddress, + bridge, + input.isActive, + input.networkId, + input.onSubmitted, + ); + const providers = { + privateStateProvider: levelPrivateStateProvider({ + privateStoragePasswordProvider: () => 'shielded-night-dapp-storage-password!', + accountId: input.shieldedAddress.shieldedAddress, + }), + publicDataProvider, + zkConfigProvider, + // Connector API 4.x types predate ledger-v9's added lookupKey method; + // stagenet wallets implement the v9 proving boundary at runtime. + proofProvider: createProofProvider(provingProvider as Parameters[0]), + walletProvider, + midnightProvider, + }; + return { + providers, + call: (circuitId, args) => submitCallTx(providers as never, { + compiledContract: compiled, + contractAddress: input.contractAddress, + circuitId, + args, + } as never) as unknown as Promise<{ private: { result: unknown } }>, + async readMetadata() { + const state = await publicDataProvider.queryContractState(input.contractAddress); + if (!state) throw new Error(`No contract state found at ${input.contractAddress}.`); + // Both the indexer and generated contract resolve through this profile's + // single runtime identity; serialize/deserialize also pins the boundary. + const runtimeState = ContractState.deserialize(state.serialize()); + const value = ShieldedNight.ledger(runtimeState.data); + return { name: value._name, symbol: value._symbol }; + }, + }; + }, +}; + +export function createV2Adapter( + connectedAPI: Parameters[0]['connectedAPI'], + networkId: string, + contractAddress: string, +) { + return createProtocolSession({ bridge, connectedAPI, networkId, contractAddress }); +} diff --git a/frontend/public/config.js b/frontend/public/config.js index eb9da41..94ce74a 100644 --- a/frontend/public/config.js +++ b/frontend/public/config.js @@ -13,6 +13,6 @@ // // Per network, an injected address wins over the one baked in at build time // from frontend/.env; a blank or absent value falls through to the build-time -// value. Keys: PREVIEW_ADDRESS, PREPROD_ADDRESS, MAINNET_ADDRESS, +// value. Keys: PREVIEW_ADDRESS, PREPROD_ADDRESS, STAGENET_ADDRESS, // UNDEPLOYED_ADDRESS. See src/lib/runtime-config.ts. window.SHIELDED_NIGHT = window.SHIELDED_NIGHT || {}; diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 279b699..b37df83 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,4 @@ import { useShieldedNight } from './hooks/useShieldedNight'; -import { trackedWrapperTotal } from './lib/swap'; import { explorerContractUrl } from './lib/networks'; import { WalletBar } from './components/WalletBar'; import { BalancePanel } from './components/BalancePanel'; @@ -26,13 +25,13 @@ export default function App() { void sn.refreshBalances()} - mintedTotal={sn.contractAddress ? trackedWrapperTotal(sn.contractAddress) : 0n} + mintedTotal={sn.balances?.trackedWrapperCoins.reduce((total, coin) => total + coin.value, 0n) ?? 0n} /> )} - + - + diff --git a/frontend/src/components/BalancePanel.tsx b/frontend/src/components/BalancePanel.tsx index 6fd1c4c..aad93f5 100644 --- a/frontend/src/components/BalancePanel.tsx +++ b/frontend/src/components/BalancePanel.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import type { Balances } from '../hooks/useShieldedNight'; +import type { Balances } from '../../protocols/shared/types'; import { formatAmount } from '../lib/tokens'; export function BalancePanel({ diff --git a/frontend/src/components/PendingSwaps.tsx b/frontend/src/components/PendingSwaps.tsx index 88e912b..c45dc0d 100644 --- a/frontend/src/components/PendingSwaps.tsx +++ b/frontend/src/components/PendingSwaps.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import type { ShieldedNightState } from '../hooks/useShieldedNight'; import { errMsg } from '../hooks/useShieldedNight'; import { formatAmount } from '../lib/tokens'; @@ -7,29 +7,37 @@ import { loadPending, type PendingSwap, removePending, resumeSwap } from '../lib export function PendingSwaps({ sn }: { sn: ShieldedNightState }) { const [pending, setPending] = useState([]); const [busyId, setBusyId] = useState(); + const mounted = useRef(true); const addr = sn.contractAddress; const reload = () => setPending(addr ? loadPending(addr) : []); useEffect(reload, [addr, sn.connected]); + useEffect(() => () => { + mounted.current = false; + }, []); // Only the second leg (step === 'deposited') is safely resumable. const resumable = pending.filter((s) => s.step === 'deposited'); if (!addr || resumable.length === 0) return null; async function onResume(s: PendingSwap) { - if (!sn.providers || !addr) return; + if (!sn.session || !addr) return; setBusyId(s.id); try { - await resumeSwap(sn.providers, addr, s, sn.coinPublicKey ?? '', sn.unshieldedAddress ?? '', { - onLog: sn.appendLog, + await resumeSwap(sn.session, addr, s, { + onLog: (message) => { + if (mounted.current) sn.appendLog(message); + }, }); - await sn.refreshBalances(); + if (mounted.current) await sn.refreshBalances(); } catch (e) { - sn.appendLog('Resume failed: ' + errMsg(e)); + if (mounted.current) sn.appendLog('Resume failed: ' + errMsg(e)); } finally { - setBusyId(undefined); - reload(); + if (mounted.current) { + setBusyId(undefined); + reload(); + } } } diff --git a/frontend/src/components/SwapCard.tsx b/frontend/src/components/SwapCard.tsx index 936ce4b..ebf1994 100644 --- a/frontend/src/components/SwapCard.tsx +++ b/frontend/src/components/SwapCard.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import type { ShieldedNightState } from '../hooks/useShieldedNight'; import { errMsg } from '../hooks/useShieldedNight'; import { formatAmount, parseAmount } from '../lib/tokens'; -import { type Direction, runConvertToShielded, runConvertToUnshielded, type SwapStep } from '../lib/swap'; +import type { Direction, SwapStep } from '../../protocols/shared/types'; const TOKENS = { toShielded: { from: 'NIGHT', to: 'sNight' }, @@ -18,7 +18,12 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { const [localErr, setLocalErr] = useState(); const { from, to } = TOKENS[direction]; - const ready = sn.connected && !!sn.contractAddress; + const trackedCoins = sn.balances?.trackedWrapperCoins ?? []; + const blockedCoins = sn.balances?.blockedWrapperCoins ?? []; + const ready = sn.connected + && !!sn.contractAddress + && !sn.configurationError + && (direction === 'toShielded' || trackedCoins.length > 0); const flip = () => { setDirection((d) => (d === 'toShielded' ? 'toUnshielded' : 'toShielded')); @@ -27,7 +32,9 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { // Max = the wallet's balance in the "from" token: NIGHT for forward, sNight // for reverse (the wallet funds the conversion + change during balancing). - const maxBase = direction === 'toShielded' ? (sn.balances?.nativeNight ?? 0n) : (sn.balances?.wrapper ?? 0n); + const maxBase = direction === 'toShielded' + ? (sn.balances?.nativeNight ?? 0n) + : trackedCoins.reduce((largest, coin) => coin.value > largest ? coin.value : largest, 0n); const onMax = () => { setLocalErr(undefined); setAmount(formatAmount(maxBase)); @@ -35,7 +42,7 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { async function onSwap() { setLocalErr(undefined); - if (!sn.providers || !sn.contractAddress) return; + if (!sn.session || !sn.contractAddress) return; let amt: bigint; try { amt = parseAmount(amount); @@ -55,29 +62,7 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { }, onLog: sn.appendLog, }; - if (direction === 'toShielded') { - await runConvertToShielded( - { - providers: sn.providers, - contractAddress: sn.contractAddress, - amount: amt, - coinPublicKey: sn.coinPublicKey!, - }, - cb, - ); - } else { - await runConvertToUnshielded( - { - providers: sn.providers, - contractAddress: sn.contractAddress, - amount: amt, - unshieldedAddress: sn.unshieldedAddress!, - wrapperColorHex: sn.wrapperColorHex!, - }, - cb, - ); - } - await sn.refreshBalances(); + await sn.convert(direction, amt, cb); setAmount(''); } catch (e) { setLocalErr(errMsg(e)); @@ -133,10 +118,18 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { {direction === 'toUnshielded' && ( -

- Converts sNight back to NIGHT; the wallet selects coins and makes change. Available:{' '} - {formatAmount(sn.balances?.wrapper ?? 0n)} sNight. -

+ <> +

+ Reverse conversion spends one exact coin retained by this browser. Wallet total:{' '} + {formatAmount(sn.balances?.wrapper ?? 0n)} sNight. Tracked coin amounts:{' '} + {trackedCoins.length ? trackedCoins.map((coin) => formatAmount(coin.value)).join(', ') : 'none'}. +

+ {blockedCoins.length > 0 && ( +

+ {blockedCoins.map((coin) => `${formatAmount(coin.value)} sNight ${coin.status}${coin.transactionId ? ` (tx ${coin.transactionId}, ${coin.networkId ?? sn.networkKey})` : ' (no transaction id recorded)'}`).join('; ')}. Do not retry these coins until the transaction is checked. +

+ )} + )} {step && ( @@ -148,13 +141,19 @@ export function SwapCard({ sn }: { sn: ShieldedNightState }) { {localErr &&

{localErr}

}
- {!ready && (

- {sn.connected - ? `No contract address configured for ${sn.networkKey}. Set ${sn.networkKey.toUpperCase()}_ADDRESS in .env.` + {sn.configurationError + ? sn.configurationError + : direction === 'toUnshielded' && sn.connected && trackedCoins.length === 0 && blockedCoins.length > 0 + ? 'A retained sNight coin has a pending or uncertain outcome. Check its transaction status before retrying.' + : direction === 'toUnshielded' && sn.connected && trackedCoins.length === 0 + ? 'No exact sNight coin is retained by this browser; received or previously untracked coins cannot be reversed with the current wallet API.' + : sn.connected + ? `Reconnect the wallet to ${sn.networkKey}.` : 'Connect a wallet to swap.'}

)} diff --git a/frontend/src/components/WalletBar.tsx b/frontend/src/components/WalletBar.tsx index 3c2af3b..63f8362 100644 --- a/frontend/src/components/WalletBar.tsx +++ b/frontend/src/components/WalletBar.tsx @@ -55,10 +55,12 @@ export function WalletBar({ sn }: { sn: ShieldedNightState }) {