diff --git a/e2e/swap-across-zones.test.ts b/e2e/swap-across-zones.test.ts index 9c513ca4..a7650cc8 100644 --- a/e2e/swap-across-zones.test.ts +++ b/e2e/swap-across-zones.test.ts @@ -54,7 +54,9 @@ test('swap pathUSD from Zone A into betaUSD on Zone B', async ({ page }) => { timeout: 120000, }) await expect( - page.getByText('Withdraw 25 pathUSD from Zone A, swap it, and route betaUSD into Zone B.').first(), + page + .getByText('Withdraw 25 pathUSD from Zone A, swap it, and route betaUSD into Zone B.') + .first(), ).toBeVisible() await client.send('WebAuthn.removeVirtualAuthenticator', { authenticatorId }) diff --git a/package.json b/package.json index 6a8c7005..57b9f698 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "cva": "1.0.0-beta.4", "mermaid": "^11.14.0", "monaco-editor": "^0.55.1", - "ox": "0.14.18", + "ox": "0.14.20", "posthog-js": "^1.367.0", "posthog-node": "^5.29.2", "prool": "^0.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35423bcc..5eeb72bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,7 +39,7 @@ importers: version: 1.2.3(typescript@5.9.3)(zod@4.3.6) accounts: specifier: ^0.6.5 - version: 0.6.7(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(express@5.2.1)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + version: 0.6.7(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(express@5.2.1)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) cva: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(typescript@5.9.3) @@ -50,8 +50,8 @@ importers: specifier: ^0.55.1 version: 0.55.1 ox: - specifier: 0.14.18 - version: 0.14.18(typescript@5.9.3)(zod@4.3.6) + specifier: 0.14.20 + version: 0.14.20(typescript@5.9.3)(zod@4.3.6) posthog-js: specifier: ^1.367.0 version: 1.367.0 @@ -93,7 +93,7 @@ importers: version: https://pkg.pr.new/wevm/vocs@2fb25c2(@cfworker/json-schema@4.1.1)(@types/react@19.2.14)(mermaid@11.14.0)(react-dom@19.2.5(react@19.2.5))(react-server-dom-webpack@19.2.3(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(webpack@5.104.1))(react@19.2.5)(rollup@4.60.1)(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3))(waku@1.0.0-alpha.4(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(react-dom@19.2.5(react@19.2.5))(react-server-dom-webpack@19.2.3(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(webpack@5.104.1))(react@19.2.5)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) wagmi: specifier: ^3.6.1 - version: 3.6.1(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + version: 3.6.1(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) waku: specifier: 1.0.0-alpha.4 version: 1.0.0-alpha.4(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(react-dom@19.2.5(react@19.2.5))(react-server-dom-webpack@19.2.3(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(webpack@5.104.1))(react@19.2.5)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) @@ -3157,8 +3157,8 @@ packages: typescript: optional: true - ox@0.14.18: - resolution: {integrity: sha512-1Irk/tvMsw7xJDuCTT/u9azSjz0YX9hrYFgJOacIuFwibaW2zZBXAMrpzegndYb5o8GLpxB6/0qro4/c40q6VQ==} + ox@0.14.20: + resolution: {integrity: sha512-rby38C3nDn8eQkf29Zgw4hkCZJ64Qqi0zRPWL8ENUQ7JVuoITqrVtwWQgM/He19SCMUEc7hS/Sjw0jIOSLJhOw==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -5434,14 +5434,14 @@ snapshots: optionalDependencies: react-server-dom-webpack: 19.2.3(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(webpack@5.104.1) - '@wagmi/connectors@8.0.1(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6))': + '@wagmi/connectors@8.0.1(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6))': dependencies: - '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) optionalDependencies: typescript: 5.9.3 - '@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6))': + '@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.9.3) @@ -5449,7 +5449,7 @@ snapshots: zustand: 5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.6.0(react@19.2.5)) optionalDependencies: '@tanstack/query-core': 5.99.0 - ox: 0.14.18(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.20(typescript@5.9.3)(zod@4.3.6) typescript: 5.9.3 transitivePeerDependencies: - '@types/react' @@ -5547,18 +5547,18 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - accounts@0.6.7(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(express@5.2.1)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)): + accounts@0.6.7(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(express@5.2.1)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)): dependencies: hono: 4.12.12 idb-keyval: 6.2.2 mipd: 0.0.7(typescript@5.9.3) mppx: 0.5.12(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.12)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) - ox: 0.14.18(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.20(typescript@5.9.3)(zod@4.3.6) webauthx: 0.1.1(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 zustand: 5.0.12(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.6.0(react@19.2.5)) optionalDependencies: - '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) react: 19.2.5 viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) transitivePeerDependencies: @@ -7285,7 +7285,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.18(typescript@5.9.3)(zod@4.3.6): + ox@0.14.20(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -8273,11 +8273,11 @@ snapshots: w3c-keyname@2.2.8: {} - wagmi@3.6.1(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)): + wagmi@3.6.1(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)): dependencies: '@tanstack/react-query': 5.99.0(react@19.2.5) - '@wagmi/connectors': 8.0.1(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) - '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.18(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + '@wagmi/connectors': 8.0.1(@wagmi/core@3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)))(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) + '@wagmi/core': 3.4.2(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(ox@0.14.20(typescript@5.9.3)(zod@4.3.6))(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) react: 19.2.5 use-sync-external-store: 1.4.0(react@19.2.5) viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) @@ -8333,7 +8333,7 @@ snapshots: webauthx@0.1.1(typescript@5.9.3)(zod@4.3.6): dependencies: - ox: 0.14.18(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.20(typescript@5.9.3)(zod@4.3.6) transitivePeerDependencies: - typescript - zod diff --git a/src/components/guides/Demo.tsx b/src/components/guides/Demo.tsx index 67390091..ad8f8dcb 100644 --- a/src/components/guides/Demo.tsx +++ b/src/components/guides/Demo.tsx @@ -57,12 +57,12 @@ function getExplorerHost() { return tempoModerato.blockExplorers.default.url } -export function ExplorerLink({ hash }: { hash: string }) { +export function ExplorerLink({ hash, inline = false }: { hash: string; inline?: boolean }) { const { trackExternalLinkClick } = usePostHogTracking() const url = `${getExplorerHost()}/tx/${hash}` return ( -
{demoSender.address}
+
+ {demoSender.address}
+ {hasExplorerLink &&
- {registration.virtualAddress}
-
+
+
+ {registration.virtualAddress}
+
+ {hasExplorerLink && {address}
+
+ {address}
+ {hasExplorerLink && address &&
- {sendResult.txHash}
-
+
+
+ {sendResult.txHash}
+
+ {hasExplorerLink &&
diff --git a/src/components/guides/virtual-addresses/miner.worker.ts b/src/components/guides/virtual-addresses/miner.worker.ts
deleted file mode 100644
index 572a6e01..00000000
--- a/src/components/guides/virtual-addresses/miner.worker.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { VirtualMaster } from 'ox/tempo'
-import type { Address, Hex } from 'viem'
-
-type ToWorker =
- | {
- type: 'start'
- batchSize: number
- masterAddress: Address
- startHex: Hex
- }
- | { type: 'stop' }
-
-type FromWorker =
- | { type: 'ready' }
- | {
- type: 'progress'
- attempts: number
- hashesPerSecond: number
- }
- | {
- type: 'found'
- attempts: number
- saltHex: string
- masterIdHex: string
- registrationHashHex: string
- }
- | { type: 'stopped'; attempts: number }
- | { type: 'error'; message: string }
-
-function post(message: FromWorker) {
- self.postMessage(message)
-}
-
-let running = false
-
-self.onmessage = (event: MessageEvent) => {
- const message = event.data
-
- if (message.type === 'stop') {
- running = false
- return
- }
-
- if (message.type !== 'start') return
-
- running = true
-
- const { masterAddress, startHex, batchSize } = message
- let nextStart = BigInt(startHex)
- let totalAttempts = 0
- const startedAt = performance.now()
-
- const mine = () => {
- if (!running) {
- post({ type: 'stopped', attempts: totalAttempts })
- return
- }
-
- try {
- const result = VirtualMaster.mineSalt({
- address: masterAddress,
- start: nextStart,
- count: batchSize,
- })
-
- if (result) {
- running = false
- const attemptsInBatch = Number(BigInt(result.salt) - nextStart + 1n)
-
- post({
- type: 'found',
- attempts: totalAttempts + attemptsInBatch,
- saltHex: result.salt,
- masterIdHex: result.masterId,
- registrationHashHex: result.registrationHash,
- })
- return
- }
-
- totalAttempts += batchSize
- nextStart += BigInt(batchSize)
- const elapsed = performance.now() - startedAt
- const hashesPerSecond = Math.round((totalAttempts / elapsed) * 1000)
-
- post({
- type: 'progress',
- attempts: totalAttempts,
- hashesPerSecond,
- })
-
- setTimeout(mine, 0)
- } catch (error) {
- running = false
- post({
- type: 'error',
- message: error instanceof Error ? error.message : 'Virtual master mining failed.',
- })
- }
- }
-
- post({ type: 'ready' })
- mine()
-}
diff --git a/src/pages/guide/payments/virtual-addresses.mdx b/src/pages/guide/payments/virtual-addresses.mdx
index 11a4d1a7..2fef5fef 100644
--- a/src/pages/guide/payments/virtual-addresses.mdx
+++ b/src/pages/guide/payments/virtual-addresses.mdx
@@ -4,8 +4,9 @@ description: Register a virtual-address master, derive deposit addresses offchai
interactive: true
---
-import { Card, Cards } from 'vocs'
+import { Card, Cards, Tab, Tabs } from 'vocs'
import * as Demo from '../../../components/guides/Demo.tsx'
+import { VirtualAddressesFastDemo } from '../../../components/guides/VirtualAddressesFastDemo.tsx'
import { VirtualAddressesLiveDemo } from '../../../components/guides/VirtualAddressesLiveDemo.tsx'
import { MermaidDiagram } from '../../../components/MermaidDiagram'
@@ -47,10 +48,41 @@ This walkthrough shows the full flow:
3. send `pathUSD` from a second address to a virtual address derived from that master id
4. confirm that the balance lands in the registered wallet
+
+
+
+
+
+Use `VirtualMaster.mineSaltAsync` to register a master id for the passkey account you create in the demo.
+
+
+
+:::info
+Mining the TIP-1022 salt can take 30+ seconds depending on your browser, hardware, and available worker parallelism.
+:::
+
+
+
+
+
+
+
+
+Use a docs-managed master with a pre-mined valid salt so you can skip the wait and jump straight to the forwarding flow.
+
+
+
+
+
+
+
+
+
+
## What to look for
When the demo succeeds, you should see all of the following: