From 57c7cd213d4cf7520fc5f4e0fa8a72a3ee81626a Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:54:55 +1000 Subject: [PATCH 01/10] docs: add access keys guides (overview + send a payment) Amp-Thread-ID: https://ampcode.com/threads/T-019d74be-6ebd-729e-b27f-d26f023a9256 --- package.json | 2 +- pnpm-lock.yaml | 56 ++- pnpm-workspace.yaml | 2 + src/pages/guide/access-keys/index.mdx | 47 ++ .../guide/access-keys/send-a-payment.mdx | 412 ++++++++++++++++++ tasks/access-keys-guides.md | 152 +++++++ vocs.config.ts | 22 + 7 files changed, 668 insertions(+), 25 deletions(-) create mode 100644 src/pages/guide/access-keys/index.mdx create mode 100644 src/pages/guide/access-keys/send-a-payment.mdx create mode 100644 tasks/access-keys-guides.md diff --git a/package.json b/package.json index 4cec01f9..2489e1de 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "tailwindcss": "^4.1.18", "unplugin-auto-import": "^21.0.0", "unplugin-icons": "^23.0.1", - "viem": "^2.47.10", + "viem": "^2.47.12", "vocs": "https://pkg.pr.new/wevm/vocs@2fb25c2", "wagmi": "^3.5.0", "waku": "1.0.0-alpha.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9318eee3..379a2cd5 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.5) accounts: specifier: ^0.5.4 - version: 0.5.4(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(@types/react@19.2.9)(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)))(express@5.2.1)(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) + version: 0.5.4(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(@types/react@19.2.9)(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)))(express@5.2.1)(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) cva: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(typescript@5.9.3) @@ -86,14 +86,14 @@ importers: specifier: ^23.0.1 version: 23.0.1(@svgr/core@8.1.0(typescript@5.9.3)) viem: - specifier: ^2.47.10 - version: 2.47.10(typescript@5.9.3)(zod@4.3.5) + specifier: ^2.47.12 + version: 2.47.12(typescript@5.9.3)(zod@4.3.5) vocs: specifier: https://pkg.pr.new/wevm/vocs@2fb25c2 version: https://pkg.pr.new/wevm/vocs@2fb25c2(@cfworker/json-schema@4.1.1)(@types/react@19.2.9)(mermaid@11.12.2)(react-dom@19.2.3(react@19.2.3))(react-server-dom-webpack@19.2.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(webpack@5.104.1))(react@19.2.3)(rollup@4.56.0)(typescript@5.9.3)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3))(waku@1.0.0-alpha.4(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@19.2.3(react@19.2.3))(react-server-dom-webpack@19.2.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(webpack@5.104.1))(react@19.2.3)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3)) wagmi: specifier: ^3.5.0 - version: 3.5.0(@tanstack/query-core@5.90.19)(@tanstack/react-query@5.90.19(react@19.2.3))(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) + version: 3.5.0(@tanstack/query-core@5.90.19)(@tanstack/react-query@5.90.19(react@19.2.3))(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) waku: specifier: 1.0.0-alpha.4 version: 1.0.0-alpha.4(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2)(react-dom@19.2.3(react@19.2.3))(react-server-dom-webpack@19.2.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(webpack@5.104.1))(react@19.2.3)(terser@5.46.1)(tsx@4.21.0)(yaml@2.8.3) @@ -3184,6 +3184,14 @@ packages: typescript: optional: true + ox@0.14.13: + resolution: {integrity: sha512-N3slDyEUq3qGw/53Xd8YZPZD7NUbbiOJDeWKvQ1ElNo2mFjjz6cV2TIbGenHw7k5ATcefDQh42dwUWoGtxU9Hg==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + ox@0.14.7: resolution: {integrity: sha512-zSQ/cfBdolj7U4++NAvH7sI+VG0T3pEohITCgcQj8KlawvTDY4vGVhDT64Atsm0d6adWfIYHDpu88iUBMMp+AQ==} peerDependencies: @@ -3872,8 +3880,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - viem@2.47.10: - resolution: {integrity: sha512-D+l6SDDZWB5bh8u9hgICzMX2/egMrgEQ+Pef/QkZgmOl6bOTyCQMSgWAH8jZTWJ/218J9QNv7s/9BH6Wu5oPDg==} + viem@2.47.12: + resolution: {integrity: sha512-tz3CBeGUMU357aZqzlHskgAiEoC3k0/PuEwBSOxh4EQ3uuNr4GJ2Gc67ArNYmdm4MVTVL+rsRdKYoqbloUva6g==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -5508,18 +5516,18 @@ snapshots: optionalDependencies: react-server-dom-webpack: 19.2.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(webpack@5.104.1) - '@wagmi/connectors@7.2.1(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)))(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5))': + '@wagmi/connectors@7.2.1(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)))(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5))': dependencies: - '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) - viem: 2.47.10(typescript@5.9.3)(zod@4.3.5) + '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) + viem: 2.47.12(typescript@5.9.3)(zod@4.3.5) optionalDependencies: typescript: 5.9.3 - '@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5))': + '@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.9.3) - viem: 2.47.10(typescript@5.9.3)(zod@4.3.5) + viem: 2.47.12(typescript@5.9.3)(zod@4.3.5) zustand: 5.0.0(@types/react@19.2.9)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)) optionalDependencies: '@tanstack/query-core': 5.90.19 @@ -5626,20 +5634,20 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - accounts@0.5.4(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(@types/react@19.2.9)(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)))(express@5.2.1)(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)): + accounts@0.5.4(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(@types/react@19.2.9)(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)))(express@5.2.1)(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)): dependencies: hono: 4.12.9 idb-keyval: 6.2.2 mipd: 0.0.7(typescript@5.9.3) - mppx: 0.5.9(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(express@5.2.1)(hono@4.12.9)(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) + mppx: 0.5.9(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(express@5.2.1)(hono@4.12.9)(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) ox: 0.14.10(typescript@5.9.3)(zod@4.3.6) webauthx: 0.1.0(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 zustand: 5.0.12(@types/react@19.2.9)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)) optionalDependencies: - '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) + '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) react: 19.2.3 - viem: 2.47.10(typescript@5.9.3)(zod@4.3.5) + viem: 2.47.12(typescript@5.9.3)(zod@4.3.5) transitivePeerDependencies: - '@modelcontextprotocol/sdk' - '@types/react' @@ -7299,13 +7307,13 @@ snapshots: moo@0.5.2: {} - mppx@0.5.9(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(express@5.2.1)(hono@4.12.9)(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)): + mppx@0.5.9(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5))(express@5.2.1)(hono@4.12.9)(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)): dependencies: '@remix-run/fetch-proxy': 0.7.1 '@remix-run/node-fetch-server': 0.13.0 incur: 0.3.24 ox: 0.14.7(typescript@5.9.3)(zod@4.3.6) - viem: 2.47.10(typescript@5.9.3)(zod@4.3.5) + viem: 2.47.12(typescript@5.9.3)(zod@4.3.5) zod: 4.3.6 optionalDependencies: '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.5) @@ -7410,7 +7418,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.7(typescript@5.9.3)(zod@4.3.5): + ox@0.14.13(typescript@5.9.3)(zod@4.3.5): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -8257,7 +8265,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - viem@2.47.10(typescript@5.9.3)(zod@4.3.5): + viem@2.47.12(typescript@5.9.3)(zod@4.3.5): dependencies: '@noble/curves': 1.9.1 '@noble/hashes': 1.8.0 @@ -8265,7 +8273,7 @@ snapshots: '@scure/bip39': 1.6.0 abitype: 1.2.3(typescript@5.9.3)(zod@4.3.5) isows: 1.0.7(ws@8.18.3) - ox: 0.14.7(typescript@5.9.3)(zod@4.3.5) + ox: 0.14.13(typescript@5.9.3)(zod@4.3.5) ws: 8.18.3 optionalDependencies: typescript: 5.9.3 @@ -8424,14 +8432,14 @@ snapshots: w3c-keyname@2.2.8: {} - wagmi@3.5.0(@tanstack/query-core@5.90.19)(@tanstack/react-query@5.90.19(react@19.2.3))(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)): + wagmi@3.5.0(@tanstack/query-core@5.90.19)(@tanstack/react-query@5.90.19(react@19.2.3))(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)): dependencies: '@tanstack/react-query': 5.90.19(react@19.2.3) - '@wagmi/connectors': 7.2.1(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)))(typescript@5.9.3)(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) - '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.10(typescript@5.9.3)(zod@4.3.5)) + '@wagmi/connectors': 7.2.1(@wagmi/core@3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)))(typescript@5.9.3)(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) + '@wagmi/core': 3.4.0(@tanstack/query-core@5.90.19)(@types/react@19.2.9)(ox@0.14.10(typescript@5.9.3)(zod@4.3.5))(react@19.2.3)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.3))(viem@2.47.12(typescript@5.9.3)(zod@4.3.5)) react: 19.2.3 use-sync-external-store: 1.4.0(react@19.2.3) - viem: 2.47.10(typescript@5.9.3)(zod@4.3.5) + viem: 2.47.12(typescript@5.9.3)(zod@4.3.5) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 407bbaab..7e7bc301 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,3 +7,5 @@ minimumReleaseAgeExclude: - accounts - mppx - incur + - viem + - ox diff --git a/src/pages/guide/access-keys/index.mdx b/src/pages/guide/access-keys/index.mdx new file mode 100644 index 00000000..ac526369 --- /dev/null +++ b/src/pages/guide/access-keys/index.mdx @@ -0,0 +1,47 @@ +--- +title: Use Access Keys +description: Delegate transaction signing with scoped access keys. Authorize secondary keys with spending limits and expiry for payments, subscriptions, and agent workflows. +--- + +import { Cards, Card } from 'vocs' + +# Use Access Keys + +Access keys are secondary signing keys authorized by your account's root key. They let you delegate transaction signing with scoped permissions - avoiding repeated sign prompts and enabling use cases like subscriptions and agent-driven payments. + +## Why use access keys? + +- **No repeated prompts**: authorize a key once, sign subsequent transactions without signing prompts +- **Spending limits**: scope keys with per-token spending limits to control exposure +- **Expiry**: set keys to automatically expire after a time window +- **Revocable**: revoke keys at any time to immediately cut off access + +## Guides + + + + + + + + + +## Learn more + +- [Account Keychain specification](/protocol/transactions/AccountKeychain): technical details on how access keys work at the protocol level +- [Tempo Transactions](/guide/tempo-transaction): access keys are a feature of Tempo Transactions diff --git a/src/pages/guide/access-keys/send-a-payment.mdx b/src/pages/guide/access-keys/send-a-payment.mdx new file mode 100644 index 00000000..cec013fd --- /dev/null +++ b/src/pages/guide/access-keys/send-a-payment.mdx @@ -0,0 +1,412 @@ +--- +title: Send a Payment with Access Keys +description: Send stablecoin payments using access keys on Tempo. Authorize a secondary signing key to send transactions without repeated passkey prompts. +--- + +import * as Demo from '../../../components/guides/Demo.tsx' +import * as Step from '../../../components/guides/steps' +import { Cards, Card } from 'vocs' +import { Tabs, Tab } from 'vocs' + +# Send a Payment with Access Keys + +Send stablecoin payments using an access key: a secondary signing key that lets you transact without repeated passkey prompts. Access keys can be scoped with spending limits and expiry for security. + +## Demo + +By the end of this guide you will be able to send payments on Tempo using an access key. Notice that no passkey prompt appears when sending a payment. + + + + + + + +## Steps + +::::steps + +### Set up Wagmi & integrate accounts + +Ensure that you have set up your project with Wagmi and integrated accounts by following either of the guides: + +- [Embed Tempo Wallet](/guide/use-accounts/embed-tempo-wallet) +- [Embed domain-bound Passkeys](/guide/use-accounts/embed-passkeys) + +### Authorize an access key + +Configure your connector to authorize an access key when the user connects. The access key will be used to sign subsequent transactions without passkey prompts. + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { tempoWallet } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + tempoWallet({ + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { webAuthn } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + webAuthn({ + authUrl: '/auth', + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + +When the user connects, the connector will authorize an access key with: +- **7-day expiry**: the key automatically becomes invalid after 7 days +- **Contract scopes**: the key can only call `transfer` on the AlphaUSD token contract +- **100 AlphaUSD spending limit**: the key can spend up to 100 AlphaUSD + +### Add testnet funds + +Before you can send a payment, you need to fund your account with `AlphaUSD` (`0x20c000…0001`). + +```tsx twoslash [AddFunds.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { useConnection } from 'wagmi' + +function AddFunds() { + const { address } = useConnection() + const { mutate, isPending } = Hooks.faucet.useFundSync() + + return ( + + ) +} +``` + +:::warning +The `addFunds` Hook only works on testnets as a convenience feature to get +started quickly. For production, you will need to onramp & fund your account manually. +::: + +### Send a payment + +Now send a payment using `useTransferSync`. Because you authorized an access key in step 2, this transaction will be signed automatically: no passkey prompt. + +```tsx twoslash [SendPayment.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { parseUnits } from 'viem' + +function SendPayment() { + const sendPayment = Hooks.token.useTransferSync() // [!code hl] + + return ( +
{ + event.preventDefault() + const formData = new FormData(event.target as HTMLFormElement) + const recipient = formData.get('recipient') as `0x${string}` + + sendPayment.mutate({ // [!code hl] + amount: parseUnits('100', 6), // [!code hl] + to: recipient, // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + }) // [!code hl] + } + }> + + + +
+ ) +} +``` + +### Display receipt + +Display the transaction receipt on success. + +```tsx twoslash [SendPayment.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { parseUnits } from 'viem' + +function SendPayment() { + const sendPayment = Hooks.token.useTransferSync() + + return ( + <> + {/* ... your payment form ... */} + {sendPayment.data && ( // [!code hl] + {/* [!code hl] */} + View receipt {/* [!code hl] */} + {/* [!code hl] */} + )} {/* [!code hl] */} + + ) +} +``` + +### Next steps + +Now that you can send payments with access keys: +- **[Set up subscriptions](/guide/access-keys/subscriptions)** using access keys with spending limits +- Learn about the [Account Keychain specification](/protocol/transactions/AccountKeychain) +- Send a payment [with a specific fee token](/guide/payments/pay-fees-in-any-stablecoin) + +:::: + +## Recipes + +### Basic transfer with access key + +Send a payment using an access key across different SDKs: + + + + + :::code-group + + ```ts twoslash [example.ts] + // @noErrors + import { parseUnits } from 'viem' + import { client } from './viem.config' + + const { receipt } = await client.token.transferSync({ + amount: parseUnits('100', 6), // [!code hl] + to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + }) + ``` + + ```ts twoslash [viem.config.ts] + // [!include ~/snippets/viem.config.ts:setup] + ``` + + ::: + + + + + + ```tsx twoslash + // @noErrors + import { Hooks } from 'wagmi/tempo' + import { parseUnits } from 'viem' + + function SendPayment() { + const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] + + return ( + + ) + } + ``` + + + + + + ```tsx twoslash + // @noErrors + import { Hooks } from 'wagmi/tempo' + import { parseUnits } from 'viem' + + // Same API: the connector handles access key signing automatically + function SendPayment() { + const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] + + return ( + + ) + } + ``` + + + + + + :::code-group + + ```rust [example.rs] + use alloy::{ + primitives::{address, U256}, + providers::ProviderBuilder, + }; + use tempo_alloy::{TempoNetwork, contracts::precompiles::ITIP20}; + + mod provider; + + #[tokio::main] + async fn main() -> Result<(), Box> { + let provider = provider::get_provider().await?; + + let token = ITIP20::new( // [!code hl] + address!("0x20c0000000000000000000000000000000000001"), // [!code hl] + &provider, // [!code hl] + ); // [!code hl] + + let receipt = token // [!code hl] + .transfer( // [!code hl] + address!("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb"), // [!code hl] + U256::from(100_000_000), // [!code hl] + ) // [!code hl] + .send() // [!code hl] + .await? // [!code hl] + .get_receipt() // [!code hl] + .await?; // [!code hl] + + println!("Transfer successful: {:?}", receipt.transaction_hash); + + Ok(()) + } + ``` + + ```rust [provider.rs] + // [!include ~/snippets/rust-signer-provider.rs:setup] + ``` + + ::: + + + + + + ```bash + # Send using an access key (delegated signing) + $ cast erc20 transfer \ + 0x20c0000000000000000000000000000000000001 \ + 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb \ + 100000000 \ + --rpc-url $TEMPO_RPC_URL \ + --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ # [!code hl] + --tempo.root-account $ROOT_ADDRESS # [!code hl] + ``` + + + + +## Best practices + +### Scope to specific contracts and functions +Always define `scopes` to restrict which contracts and functions the access key can call. A key scoped to `transfer` on a specific token contract cannot be used to call other contracts or functions, even if compromised. + +### Set appropriate expiry +Access keys should have a reasonable expiry window. Use `Expiry.days(7)` for interactive sessions or `Expiry.hours(1)` for short-lived operations. + +### Use spending limits +Combine scopes with per-token spending limits for defense in depth. Spending limits cap the total amount a key can transfer, while scopes restrict which contracts it can interact with. + +### Error handling +If a transaction fails (e.g. spending limit exceeded, key expired), display the error to the user: + +```tsx +import { Hooks } from 'wagmi/tempo' + +function SendPayment() { + const sendPayment = Hooks.token.useTransferSync() + + return ( + <> + {/* ... your payment form ... */} + {sendPayment.error &&
Error: {sendPayment.error.message}
} + + ) +} +``` + +## Learning resources + + + + + diff --git a/tasks/access-keys-guides.md b/tasks/access-keys-guides.md new file mode 100644 index 00000000..918b3ac0 --- /dev/null +++ b/tasks/access-keys-guides.md @@ -0,0 +1,152 @@ +# Use Access Keys — Guide Structure + +New sidebar section under **Build on Tempo** called **"Use Access Keys"**. + +## Sidebar Structure + +``` +Build on Tempo +├── ...existing items... +├── Use Access Keys ← NEW section (after "Make Payments" or "Issue Stablecoins") +│ ├── Overview → /guide/access-keys +│ ├── Send a payment → /guide/access-keys/send-a-payment ← START HERE +│ ├── Set up subscriptions → /guide/access-keys/subscriptions +│ └── Revoke access keys → /guide/access-keys/revoke-a-key (future) +├── ...existing items... +``` + +## File Structure + +``` +src/pages/guide/access-keys/ +├── index.mdx # Overview — what access keys are, when to use them +├── send-a-payment.mdx # Send a payment using an access key +└── subscriptions.mdx # Set up recurring subscriptions via access keys +``` + +## Page: Overview (`index.mdx`) + +Brief intro page covering: +- What access keys are (secondary signing keys provisioned by a root key) +- Why use them (avoid repeated passkey prompts, delegate to agents/scripts, scoped spending limits) +- Link to protocol spec (AccountKeychain) +- Cards linking to each guide + +## Page: Send a Payment (`send-a-payment.mdx`) + +Mirrors the structure of `/guide/payments/send-a-payment` but centered around access keys. + +### Outline + +1. **Intro** — "Send a stablecoin payment using an access key. Access keys let you sign transactions without repeated passkey prompts, with optional spending limits." + +2. **Steps** + 1. **Set up Wagmi & integrate accounts** — link to existing embed passkeys/connect wallets guides + 2. **Authorize an access key** — show how to authorize an access key on connect (via `authorizeAccessKey` param on connector) or programmatically via `wallet_authorizeAccessKey` + - **Wagmi examples should show two variants side-by-side (Tabs):** + - **Tempo Wallet** — using `tempoWallet()` connector with `authorizeAccessKey` + - **Domain-bound WebAuthn** — using `webAuthn()` connector with `authorizeAccessKey` + 3. **Add testnet funds** — same as existing (faucet) + 4. **Send a payment with the access key** — show `useTransferSync` (transactions auto-sign with the access key, no passkey prompt) + 5. **Display receipt** — same pattern as existing + +3. **Recipes** (Tabs: Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / Cast / Solidity) + - **Authorize an access key** — code to provision a key with expiry + spending limits + - **Send a transfer with an access key** — code showing the key_authorization field + - **Check remaining spending limit** — read from AccountKeychain precompile + +4. **Best practices** + - Set appropriate expiry times + - Use spending limits to scope access + - Revoke keys when no longer needed + - Store access keys securely + +5. **Next steps** + - Revoke access keys → (future guide) + - Learn about [Account Keychain](/protocol/transactions/AccountKeychain) + +## Page: Set Up Subscriptions (`subscriptions.mdx`) + +Subscriptions use access keys as the primitive — a user authorizes an access key with a spending limit and expiry, and the merchant/service pulls payments periodically using that key. + +### Outline + +1. **Intro** — "Set up recurring stablecoin subscriptions on Tempo. Access keys with spending limits let users authorize merchants to pull payments on a schedule — no smart contract escrow needed." + +2. **How it works** + - User authorizes an access key for the merchant with a periodic spending limit (e.g. 10 USDC/month) + - Merchant stores the access key and pulls payments on their schedule + - User can revoke the key at any time to cancel + - Spending limits prevent overcharging + +3. **Steps** + 1. **Set up accounts** — link to existing guides + 2. **User: Authorize a subscription key** — authorize an access key for the merchant's address with spending limits matching the subscription amount + expiry + - **Wagmi examples should show two variants (Tabs):** + - **Tempo Wallet** — using `tempoWallet()` connector with `authorizeAccessKey` + - **Domain-bound WebAuthn** — using `webAuthn()` connector with `authorizeAccessKey` + 3. **Merchant: Pull a payment** — use the access key to sign a transfer on behalf of the user + 4. **User: Cancel the subscription** — revoke the access key + +4. **Recipes** (Tabs: Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / etc.) + - **Authorize a subscription key with monthly limit** + - **Pull a subscription payment (merchant-side)** + - **Check remaining subscription allowance** + - **Revoke/cancel subscription** + +5. **Best practices** + - Set spending limits to match subscription amount (prevent overcharging) + - Use expiry for fixed-term subscriptions + - Provide users a clear way to revoke (cancel) + - Emit events / memos for reconciliation + +6. **Next steps** + - Send a payment → /guide/access-keys/send-a-payment + - Account Keychain spec → /protocol/transactions/AccountKeychain + +## vocs.config.ts Changes + +Add new sidebar item after "Make Payments": + +```ts +{ + text: 'Use Access Keys', + collapsed: true, + items: [ + { text: 'Overview', link: '/guide/access-keys' }, + { text: 'Send a payment', link: '/guide/access-keys/send-a-payment' }, + { text: 'Set up subscriptions', link: '/guide/access-keys/subscriptions' }, + ], +}, +``` + +## Phases + +### Phase 1: Scaffold & Overview ✅ +- [x] Draft structure (this file) +- [x] Create `src/pages/guide/access-keys/` directory +- [x] Create `src/pages/guide/access-keys/index.mdx` (overview page) +- [x] Add sidebar entry in `vocs.config.ts` (all items, link future ones) +- [x] Verify with `pnpm run check` + +### Phase 2: Send a Payment guide ✅ +- [x] Create `src/pages/guide/access-keys/send-a-payment.mdx` + - [x] Intro + steps section (set up, authorize key, add funds, send, receipt) + - [x] Wagmi tabs: Tempo Wallet + WebAuthn variants + - [x] Recipes section (Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / Cast) + - [x] Best practices + next steps +- [x] Verify with `pnpm run check` + +### Phase 3: Subscriptions guide +- [ ] Create `src/pages/guide/access-keys/subscriptions.mdx` + - [ ] Intro + "How it works" section + - [ ] Steps (authorize subscription key, pull payment, cancel) + - [ ] Wagmi tabs: Tempo Wallet + WebAuthn variants + - [ ] Recipes section (authorize, pull, check allowance, revoke) + - [ ] Best practices + next steps +- [ ] Verify with `pnpm run dev` and `pnpm run check` + +### Phase 4: Polish & cross-link +- [ ] Cross-link from existing guides (payments, tempo-transaction, machine-payments) +- [ ] Add links from AccountKeychain protocol page to new guides +- [ ] Final `pnpm run check` for dead links diff --git a/vocs.config.ts b/vocs.config.ts index 72e0861a..346e4e14 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -154,6 +154,28 @@ export default defineConfig({ // }, ], }, + { + text: 'Use Access Keys', + collapsed: true, + items: [ + { + text: 'Overview', + link: '/guide/access-keys', + }, + { + text: 'Send a payment', + link: '/guide/access-keys/send-a-payment', + }, + { + text: 'Set up subscriptions', + link: '/guide/access-keys/subscriptions', + }, + { + text: 'Revoke access keys', + link: '/guide/access-keys/revoke', + }, + ], + }, { text: 'Issue Stablecoins', collapsed: true, From 827a0295e36c550e62cc7fec82d3eef0a82affbd Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:11:24 +1000 Subject: [PATCH 02/10] up --- e2e/swap-across-zones.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }) From b474ef55083a7d36d94ecd0772f1af0bb724e65e Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:17:20 +1000 Subject: [PATCH 03/10] docs: access key guides - authorize, periodical payments, public keys, revoke Amp-Thread-ID: https://ampcode.com/threads/T-019dad40-f171-72ac-bde8-ae91249ec34a --- .../guide/access-keys/send-a-payment.mdx | 412 --------- .../use-accounts/authorize-access-keys.mdx | 841 ++++++++++++++++++ vocs.config.ts | 26 +- 3 files changed, 845 insertions(+), 434 deletions(-) delete mode 100644 src/pages/guide/access-keys/send-a-payment.mdx create mode 100644 src/pages/guide/use-accounts/authorize-access-keys.mdx diff --git a/src/pages/guide/access-keys/send-a-payment.mdx b/src/pages/guide/access-keys/send-a-payment.mdx deleted file mode 100644 index cec013fd..00000000 --- a/src/pages/guide/access-keys/send-a-payment.mdx +++ /dev/null @@ -1,412 +0,0 @@ ---- -title: Send a Payment with Access Keys -description: Send stablecoin payments using access keys on Tempo. Authorize a secondary signing key to send transactions without repeated passkey prompts. ---- - -import * as Demo from '../../../components/guides/Demo.tsx' -import * as Step from '../../../components/guides/steps' -import { Cards, Card } from 'vocs' -import { Tabs, Tab } from 'vocs' - -# Send a Payment with Access Keys - -Send stablecoin payments using an access key: a secondary signing key that lets you transact without repeated passkey prompts. Access keys can be scoped with spending limits and expiry for security. - -## Demo - -By the end of this guide you will be able to send payments on Tempo using an access key. Notice that no passkey prompt appears when sending a payment. - - - - - - - -## Steps - -::::steps - -### Set up Wagmi & integrate accounts - -Ensure that you have set up your project with Wagmi and integrated accounts by following either of the guides: - -- [Embed Tempo Wallet](/guide/use-accounts/embed-tempo-wallet) -- [Embed domain-bound Passkeys](/guide/use-accounts/embed-passkeys) - -### Authorize an access key - -Configure your connector to authorize an access key when the user connects. The access key will be used to sign subsequent transactions without passkey prompts. - - - - - ```ts twoslash [wagmi.config.ts] - // @noErrors - import { createConfig, http } from 'wagmi' - import { tempo } from 'wagmi/chains' - import { parseUnits } from 'viem' - import { Expiry } from 'accounts' - import { tempoWallet } from 'accounts/wagmi' - - export const config = createConfig({ - chains: [tempo], - connectors: [ - tempoWallet({ - authorizeAccessKey: () => ({ // [!code hl] - // When the key expires // [!code hl] - expiry: Expiry.days(7), // [!code hl] - // Tokens & functions the key can call // [!code hl] - scopes: [{ // [!code hl] - target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] - selector: 'transfer(address,uint256)', // [!code hl] - }], // [!code hl] - // Max spend per token // [!code hl] - limits: [{ // [!code hl] - token: '0x20c0000000000000000000000000000000000001', // [!code hl] - limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] - }], // [!code hl] - }), // [!code hl] - }), - ], - transports: { [tempo.id]: http() }, - }) - ``` - - - - - - ```ts twoslash [wagmi.config.ts] - // @noErrors - import { createConfig, http } from 'wagmi' - import { tempo } from 'wagmi/chains' - import { parseUnits } from 'viem' - import { Expiry } from 'accounts' - import { webAuthn } from 'accounts/wagmi' - - export const config = createConfig({ - chains: [tempo], - connectors: [ - webAuthn({ - authUrl: '/auth', - authorizeAccessKey: () => ({ // [!code hl] - // When the key expires // [!code hl] - expiry: Expiry.days(7), // [!code hl] - // Tokens & functions the key can call // [!code hl] - scopes: [{ // [!code hl] - target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] - selector: 'transfer(address,uint256)', // [!code hl] - }], // [!code hl] - // Max spend per token // [!code hl] - limits: [{ // [!code hl] - token: '0x20c0000000000000000000000000000000000001', // [!code hl] - limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] - }], // [!code hl] - }), // [!code hl] - }), - ], - transports: { [tempo.id]: http() }, - }) - ``` - - - - -When the user connects, the connector will authorize an access key with: -- **7-day expiry**: the key automatically becomes invalid after 7 days -- **Contract scopes**: the key can only call `transfer` on the AlphaUSD token contract -- **100 AlphaUSD spending limit**: the key can spend up to 100 AlphaUSD - -### Add testnet funds - -Before you can send a payment, you need to fund your account with `AlphaUSD` (`0x20c000…0001`). - -```tsx twoslash [AddFunds.tsx] -// @noErrors -import { Hooks } from 'wagmi/tempo' -import { useConnection } from 'wagmi' - -function AddFunds() { - const { address } = useConnection() - const { mutate, isPending } = Hooks.faucet.useFundSync() - - return ( - - ) -} -``` - -:::warning -The `addFunds` Hook only works on testnets as a convenience feature to get -started quickly. For production, you will need to onramp & fund your account manually. -::: - -### Send a payment - -Now send a payment using `useTransferSync`. Because you authorized an access key in step 2, this transaction will be signed automatically: no passkey prompt. - -```tsx twoslash [SendPayment.tsx] -// @noErrors -import { Hooks } from 'wagmi/tempo' -import { parseUnits } from 'viem' - -function SendPayment() { - const sendPayment = Hooks.token.useTransferSync() // [!code hl] - - return ( -
{ - event.preventDefault() - const formData = new FormData(event.target as HTMLFormElement) - const recipient = formData.get('recipient') as `0x${string}` - - sendPayment.mutate({ // [!code hl] - amount: parseUnits('100', 6), // [!code hl] - to: recipient, // [!code hl] - token: '0x20c0000000000000000000000000000000000001', // [!code hl] - }) // [!code hl] - } - }> - - - -
- ) -} -``` - -### Display receipt - -Display the transaction receipt on success. - -```tsx twoslash [SendPayment.tsx] -// @noErrors -import { Hooks } from 'wagmi/tempo' -import { parseUnits } from 'viem' - -function SendPayment() { - const sendPayment = Hooks.token.useTransferSync() - - return ( - <> - {/* ... your payment form ... */} - {sendPayment.data && ( // [!code hl] - {/* [!code hl] */} - View receipt {/* [!code hl] */} - {/* [!code hl] */} - )} {/* [!code hl] */} - - ) -} -``` - -### Next steps - -Now that you can send payments with access keys: -- **[Set up subscriptions](/guide/access-keys/subscriptions)** using access keys with spending limits -- Learn about the [Account Keychain specification](/protocol/transactions/AccountKeychain) -- Send a payment [with a specific fee token](/guide/payments/pay-fees-in-any-stablecoin) - -:::: - -## Recipes - -### Basic transfer with access key - -Send a payment using an access key across different SDKs: - - - - - :::code-group - - ```ts twoslash [example.ts] - // @noErrors - import { parseUnits } from 'viem' - import { client } from './viem.config' - - const { receipt } = await client.token.transferSync({ - amount: parseUnits('100', 6), // [!code hl] - to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', // [!code hl] - token: '0x20c0000000000000000000000000000000000001', // [!code hl] - }) - ``` - - ```ts twoslash [viem.config.ts] - // [!include ~/snippets/viem.config.ts:setup] - ``` - - ::: - - - - - - ```tsx twoslash - // @noErrors - import { Hooks } from 'wagmi/tempo' - import { parseUnits } from 'viem' - - function SendPayment() { - const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] - - return ( - - ) - } - ``` - - - - - - ```tsx twoslash - // @noErrors - import { Hooks } from 'wagmi/tempo' - import { parseUnits } from 'viem' - - // Same API: the connector handles access key signing automatically - function SendPayment() { - const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] - - return ( - - ) - } - ``` - - - - - - :::code-group - - ```rust [example.rs] - use alloy::{ - primitives::{address, U256}, - providers::ProviderBuilder, - }; - use tempo_alloy::{TempoNetwork, contracts::precompiles::ITIP20}; - - mod provider; - - #[tokio::main] - async fn main() -> Result<(), Box> { - let provider = provider::get_provider().await?; - - let token = ITIP20::new( // [!code hl] - address!("0x20c0000000000000000000000000000000000001"), // [!code hl] - &provider, // [!code hl] - ); // [!code hl] - - let receipt = token // [!code hl] - .transfer( // [!code hl] - address!("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb"), // [!code hl] - U256::from(100_000_000), // [!code hl] - ) // [!code hl] - .send() // [!code hl] - .await? // [!code hl] - .get_receipt() // [!code hl] - .await?; // [!code hl] - - println!("Transfer successful: {:?}", receipt.transaction_hash); - - Ok(()) - } - ``` - - ```rust [provider.rs] - // [!include ~/snippets/rust-signer-provider.rs:setup] - ``` - - ::: - - - - - - ```bash - # Send using an access key (delegated signing) - $ cast erc20 transfer \ - 0x20c0000000000000000000000000000000000001 \ - 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb \ - 100000000 \ - --rpc-url $TEMPO_RPC_URL \ - --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ # [!code hl] - --tempo.root-account $ROOT_ADDRESS # [!code hl] - ``` - - - - -## Best practices - -### Scope to specific contracts and functions -Always define `scopes` to restrict which contracts and functions the access key can call. A key scoped to `transfer` on a specific token contract cannot be used to call other contracts or functions, even if compromised. - -### Set appropriate expiry -Access keys should have a reasonable expiry window. Use `Expiry.days(7)` for interactive sessions or `Expiry.hours(1)` for short-lived operations. - -### Use spending limits -Combine scopes with per-token spending limits for defense in depth. Spending limits cap the total amount a key can transfer, while scopes restrict which contracts it can interact with. - -### Error handling -If a transaction fails (e.g. spending limit exceeded, key expired), display the error to the user: - -```tsx -import { Hooks } from 'wagmi/tempo' - -function SendPayment() { - const sendPayment = Hooks.token.useTransferSync() - - return ( - <> - {/* ... your payment form ... */} - {sendPayment.error &&
Error: {sendPayment.error.message}
} - - ) -} -``` - -## Learning resources - - - - - diff --git a/src/pages/guide/use-accounts/authorize-access-keys.mdx b/src/pages/guide/use-accounts/authorize-access-keys.mdx new file mode 100644 index 00000000..6ab04586 --- /dev/null +++ b/src/pages/guide/use-accounts/authorize-access-keys.mdx @@ -0,0 +1,841 @@ +--- +title: Authorize access keys +description: Authorize access keys on Tempo. Use a secondary signing key to send transactions without repeated passkey prompts, with spending limits and expiry for security. +interactive: true +--- + +import * as Demo from '../../../components/guides/Demo.tsx' +import { Connect } from '../../../components/guides/steps/auth/Connect.tsx' +import { AddFunds } from '../../../components/guides/steps/payments/AddFunds.tsx' +import { SendPayment } from '../../../components/guides/steps/payments/SendPayment.tsx' +import { Cards, Card } from 'vocs' +import { Tabs, Tab } from 'vocs' + +# Authorize access keys + +Send stablecoin payments using an access key: a secondary signing key that lets you transact without repeated passkey prompts. Access keys can be scoped with spending limits and expiry for security. + +## Demo + +By the end of this guide you will be able to send payments on Tempo using an access key. Notice that no passkey prompt appears when sending a payment. + + + + + + + +## Steps + +::::steps + +### Set up Wagmi & integrate accounts + +Ensure that you have set up your project with Wagmi and integrated accounts by following either of the guides: + +- [Embed Tempo Wallet](/guide/use-accounts/embed-tempo-wallet) +- [Embed domain-bound Passkeys](/guide/use-accounts/embed-passkeys) + +### Authorize an access key + +Configure your connector to authorize an access key when the user connects. The access key will be used to sign subsequent transactions without passkey prompts. + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { tempoWallet } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + tempoWallet({ + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { webAuthn } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + webAuthn({ + authUrl: '/auth', + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + +When the user connects, the connector will authorize an access key with: +- **7-day expiry**: the key automatically becomes invalid after 7 days +- **Scopes**: the key can only call `transfer` on the AlphaUSD token +- **100 AlphaUSD spending limit**: the key can spend up to 100 AlphaUSD + +### Add testnet funds + +Before you can send a payment, you need to fund your account with `AlphaUSD` (`0x20c000…0001`). + +```tsx twoslash [AddFunds.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { useConnection } from 'wagmi' + +function AddFunds() { + const { address } = useConnection() + const { mutate, isPending } = Hooks.faucet.useFundSync() + + return ( + + ) +} +``` + +:::warning +The `addFunds` Hook only works on testnets as a convenience feature to get +started quickly. For production, you will need to onramp & fund your account manually. +::: + +### Send a payment + +Now send a payment using `useTransferSync`. Because you authorized an access key in step 2, this transaction will be signed automatically: no passkey prompt. + +```tsx twoslash [SendPayment.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { parseUnits } from 'viem' + +function SendPayment() { + const transfer = Hooks.token.useTransferSync() // [!code hl] + + return ( +
{ + event.preventDefault() + const formData = new FormData(event.target as HTMLFormElement) + const recipient = formData.get('recipient') as `0x${string}` + + transfer.mutate({ // [!code hl] + amount: parseUnits('100', 6), // [!code hl] + to: recipient, // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + }) // [!code hl] + } + }> + + + +
+ ) +} +``` + +### Display receipt + +Display the transaction receipt on success. + +```tsx twoslash [SendPayment.tsx] +// @noErrors +import { Hooks } from 'wagmi/tempo' +import { parseUnits } from 'viem' + +function SendPayment() { + const sendPayment = Hooks.token.useTransferSync() + + return ( + <> + {/* ... your payment form ... */} + {sendPayment.data && ( // [!code hl] + {/* [!code hl] */} + View receipt {/* [!code hl] */} + {/* [!code hl] */} + )} {/* [!code hl] */} + + ) +} +``` + +### Next steps + +Now that you can send payments with access keys: +- **[Revoke access keys](/guide/access-keys/revoke)** when they are no longer needed +- Learn about the [Account Keychain specification](/protocol/transactions/AccountKeychain) +- Send a payment [with a specific fee token](/guide/payments/pay-fees-in-any-stablecoin) + +:::: + +## SDKs + +### Basic transfer with access key + +Send a payment using an access key across different SDKs: + + + + + :::code-group + + ```ts twoslash [example.ts] + // @noErrors + import { parseUnits } from 'viem' + import { generatePrivateKey } from 'viem/accounts' + import { Account, Actions, Expiry } from 'viem/tempo' + import { client } from './viem.config' + + // 1. Create an access key. // [!code hl] + const accessKey = Account.fromP256(generatePrivateKey(), { // [!code hl] + access: client.account, // [!code hl] + }) // [!code hl] + + // 2. Sign a key authorization. // [!code hl] + const keyAuthorization = await Actions.accessKey.signAuthorization(client, { // [!code hl] + accessKey, // [!code hl] + expiry: Expiry.days(7), // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // [!code hl] + }], // [!code hl] + }) // [!code hl] + + // 3. Send a transfer with the key authorization. // [!code hl] + const { receipt } = await client.token.transferSync({ + amount: parseUnits('100', 6), + to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', + token: '0x20c0000000000000000000000000000000000001', + keyAuthorization, // [!code hl] + }) + ``` + + ```ts twoslash [viem.config.ts] + // [!include ~/snippets/viem.config.ts:setup] + ``` + + ::: + +
+ + :::info + Once you have broadcasted the transaction with `keyAuthorization`, you can reuse the same access key to sign subsequent transactions without the need to pass the key authorization again. + ::: + + + + + + :::code-group + + ```tsx twoslash [example.tsx] + // @noErrors + import { Hooks } from 'wagmi/tempo' + import { parseUnits } from 'viem' + + function SendPayment() { + const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] + + return ( + + ) + } + ``` + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { tempoWallet } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + tempoWallet({ + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + ::: + + + + + + :::code-group + + ```tsx twoslash [example.tsx] + // @noErrors + import { Hooks } from 'wagmi/tempo' + import { parseUnits } from 'viem' + + // Same API: the connector handles access key signing automatically + function SendPayment() { + const { mutate, isPending } = Hooks.token.useTransferSync() // [!code hl] + + return ( + + ) + } + ``` + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { webAuthn } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + webAuthn({ + authUrl: '/auth', + authorizeAccessKey: () => ({ // [!code hl] + // When the key expires // [!code hl] + expiry: Expiry.days(7), // [!code hl] + // Max spend per token // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('100', 6), // 100 AlphaUSD // [!code hl] + }], // [!code hl] + // Tokens & functions the key can call // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // AlphaUSD // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + }), // [!code hl] + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + ::: + + + + + + :::code-group + + ```rust [example.rs] + use alloy::primitives::{address, U256}; + use alloy::providers::Provider; + use alloy::signers::{SignerSync, local::PrivateKeySigner}; + use alloy::sol_types::SolCall; + use tempo_alloy::contracts::precompiles::ITIP20; + use tempo_alloy::primitives::transaction::key_authorization::{ + KeyAuthorization, SignedKeyAuthorization, TokenLimit, + }; + use tempo_alloy::primitives::transaction::tt_signature::{ + KeychainSignature, PrimitiveSignature, SignatureType, TempoSignature, + }; + use tempo_alloy::rpc::TempoTransactionRequest; + + mod provider; + + #[tokio::main] + async fn main() -> Result<(), Box> { + let provider = provider::get_provider().await?; + let root: PrivateKeySigner = std::env::var("PRIVATE_KEY")?.parse()?; + + let token = address!("0x20c0000000000000000000000000000000000001"); + let recipient = address!("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb"); + let amount = U256::from(100_000_000u64); // 100 AlphaUSD (6 decimals) + let chain_id = provider.get_chain_id().await?; + + // 1. Create an access key. // [!code hl] + let access_key = PrivateKeySigner::random(); // [!code hl] + + // 2. Sign a key authorization with the root account. // [!code hl] + let expiry = std::time::SystemTime::now() // [!code hl] + .duration_since(std::time::UNIX_EPOCH)? // [!code hl] + .as_secs() + 7 * 24 * 60 * 60; // 7 days // [!code hl] + + let authorization = KeyAuthorization { // [!code hl] + chain_id, // [!code hl] + key_type: SignatureType::Secp256k1, // [!code hl] + key_id: access_key.address(), // [!code hl] + expiry: Some(expiry), // [!code hl] + limits: Some(vec![TokenLimit { // [!code hl] + token, // [!code hl] + limit: amount, // [!code hl] + period: 0, // [!code hl] + }]), // [!code hl] + ..Default::default() // [!code hl] + }; // [!code hl] + + let sig = root.sign_hash_sync(&authorization.signature_hash())?; // [!code hl] + let key_authorization = SignedKeyAuthorization { // [!code hl] + authorization, // [!code hl] + signature: sig.into(), // [!code hl] + }; // [!code hl] + + // 3. Send a transfer with the key authorization. // [!code hl] + let call_data = ITIP20::transferCall { // [!code hl] + to: recipient, // [!code hl] + amount, // [!code hl] + }.abi_encode(); // [!code hl] + + let tx = TempoTransactionRequest { // [!code hl] + key_authorization: Some(key_authorization), // [!code hl] + ..Default::default() // [!code hl] + } // [!code hl] + .with_to(token) // [!code hl] + .with_input(call_data.into()); // [!code hl] + + let receipt = provider // [!code hl] + .send_transaction(tx) // [!code hl] + .await? // [!code hl] + .get_receipt() // [!code hl] + .await?; // [!code hl] + + println!("Transfer successful: {:?}", receipt.transaction_hash); + + Ok(()) + } + ``` + + ```rust [provider.rs] + // [!include ~/snippets/rust-signer-provider.rs:setup] + ``` + + ::: + + + + + + ```bash + # 1. Generate an access key. + $ cast wallet new + # Address: 0x9f3a7b2c1d4e5f6a8b0c9d2e3f4a5b6c7d8e9f0a + # Private key: 0x4c0883a69102937d6231471b5dbb6204fe512961708279f22a3c36f1e24b8e10 + + # 2. Authorize the access key on-chain with expiry and limits. + $ cast keychain auth \ + $ACCESS_KEY_ADDRESS \ + secp256k1 \ + $(date -v+7d +%s) \ # 7-day expiry + --limit 0x20c0000000000000000000000000000000000001:100000000 \ + --rpc-url $TEMPO_RPC_URL \ + --private-key $ROOT_PRIVATE_KEY + + # 3. Send a transfer with the access key. + $ cast send \ + 0x20c0000000000000000000000000000000000001 \ + "transfer(address,uint256)" \ + 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb \ + 100000000 \ + --rpc-url $TEMPO_RPC_URL \ + --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ + --tempo.root-account $ROOT_ADDRESS + ``` + + + + +### Periodical payments + +Use `period` in spending limits to cap how much an access key can spend per time window. The limit resets automatically after each period, making it ideal for subscriptions and recurring billing. + + + + + :::code-group + + ```ts twoslash [client.ts] + // @noErrors + import { parseUnits } from 'viem' + import { Actions, Expiry } from 'viem/tempo' + import { client } from './viem.config' + + // Sign a key authorization with a periodic spending limit. + const keyAuthorization = await Actions.accessKey.signAuthorization(client, { + accessKey, + expiry: Expiry.days(30), + limits: [{ + token: '0x20c0000000000000000000000000000000000001', + limit: parseUnits('10', 6), // 10 AlphaUSD // [!code hl] + period: 60 * 60 * 24 * 7, // resets every 7 days // [!code hl] + }], + }) + ``` + + ```ts twoslash [server.ts] + // @noErrors + import { parseUnits } from 'viem' + import { client } from './viem.config' + + // Charge the user weekly from the server. + const { receipt } = await client.token.transferSync({ + account: accessKey, + amount: parseUnits('10', 6), + to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', + token: '0x20c0000000000000000000000000000000000001', + keyAuthorization, + }) + ``` + + ```ts twoslash [viem.config.ts] + // [!include ~/snippets/viem.config.ts:setup] + ``` + + ::: + + + + + + :::code-group + + ```tsx twoslash [client.tsx] + // @noErrors + import { parseUnits } from 'viem' + import { useConnectorClient } from 'wagmi' + import { Expiry } from 'accounts' + + function Subscribe() { + const { data: client } = useConnectorClient() + + async function handleSubscribe() { + await client.request({ // [!code hl] + method: 'wallet_authorizeAccessKey', // [!code hl] + params: [{ // [!code hl] + expiry: Expiry.days(30), // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('10', 6), // 10 AlphaUSD // [!code hl] + period: 60 * 60 * 24 * 7, // resets every 7 days // [!code hl] + }], // [!code hl] + scopes: [{ // [!code hl] + target: '0x20c0000000000000000000000000000000000001', // [!code hl] + selector: 'transfer(address,uint256)', // [!code hl] + }], // [!code hl] + }], // [!code hl] + }) // [!code hl] + } + + return ( + + ) + } + ``` + + ```ts twoslash [server.ts] + // @noErrors + import { parseUnits } from 'viem' + import { Actions } from 'wagmi/tempo' + import { config } from './wagmi.config' + + // Charge the user weekly from the server. + const { receipt } = await Actions.token.transferSync(config, { + amount: parseUnits('10', 6), + to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', + token: '0x20c0000000000000000000000000000000000001', + }) + ``` + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { tempoWallet } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [tempoWallet()], + transports: { [tempo.id]: http() }, + }) + ``` + + ::: + + + + + + :::code-group + + ```tsx twoslash [client.tsx] + // @noErrors + import { parseUnits } from 'viem' + import { useConnectorClient } from 'wagmi' + import { Expiry } from 'accounts' + + function Subscribe() { + const { data: client } = useConnectorClient() + + async function handleSubscribe() { + await client.request({ // [!code hl] + method: 'wallet_authorizeAccessKey', // [!code hl] + params: [{ // [!code hl] + expiry: Expiry.days(30), // [!code hl] + limits: [{ // [!code hl] + token: '0x20c0000000000000000000000000000000000001', // [!code hl] + limit: parseUnits('10', 6), // 10 AlphaUSD // [!code hl] + period: 60 * 60 * 24 * 7, // resets every 7 days // [!code hl] + }], // [!code hl] + }], // [!code hl] + }) // [!code hl] + } + + return ( + + ) + } + ``` + + ```ts twoslash [server.ts] + // @noErrors + import { parseUnits } from 'viem' + import { Actions } from 'wagmi/tempo' + import { config } from './wagmi.config' + + // Charge the user weekly from the server. + const { receipt } = await Actions.token.transferSync(config, { + amount: parseUnits('10', 6), + to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', + token: '0x20c0000000000000000000000000000000000001', + }) + ``` + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { webAuthn } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [webAuthn({ authUrl: '/auth' })], + transports: { [tempo.id]: http() }, + }) + ``` + + ::: + + + + +### Authorize arbitrary public keys + +You can also directly authorize a public key: + + + + + :::code-group + + ```ts twoslash [example.ts] + // @noErrors + import { parseUnits } from 'viem' + import { Account, Actions, Expiry } from 'viem/tempo' + import { client } from './viem.config' + + // Sign authorization by public key + const keyAuthorization = await Actions.accessKey.signAuthorization(client, { + accessKey: { // [!code hl] + publicKey: '0x...', // [!code hl] + // address: '0x...', // or address // [!code hl] + type: 'p256', // [!code hl] + }, // [!code hl] + expiry: Expiry.days(7), + limits: [{ + token: '0x20c0000000000000000000000000000000000001', + limit: parseUnits('100', 6), + }], + }) + ``` + + ```ts twoslash [viem.config.ts] + // [!include ~/snippets/viem.config.ts:setup] + ``` + + ::: + + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { tempoWallet } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + tempoWallet({ + authorizeAccessKey: () => ({ + publicKey: '0x...', // [!code hl] + // address: '0x...', // or address // [!code hl] + expiry: Expiry.days(7), + limits: [{ + token: '0x20c0000000000000000000000000000000000001', + limit: parseUnits('100', 6), + }], + scopes: [{ + target: '0x20c0000000000000000000000000000000000001', + selector: 'transfer(address,uint256)', + }], + }), + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + + + ```ts twoslash [wagmi.config.ts] + // @noErrors + import { createConfig, http } from 'wagmi' + import { tempo } from 'wagmi/chains' + import { parseUnits } from 'viem' + import { Expiry } from 'accounts' + import { webAuthn } from 'accounts/wagmi' + + export const config = createConfig({ + chains: [tempo], + connectors: [ + webAuthn({ + authUrl: '/auth', + authorizeAccessKey: () => ({ + publicKey: '0x...', // [!code hl] + // address: '0x...', // or address // [!code hl] + expiry: Expiry.days(7), + limits: [{ + token: '0x20c0000000000000000000000000000000000001', + limit: parseUnits('100', 6), + }], + }), + }), + ], + transports: { [tempo.id]: http() }, + }) + ``` + + + + +## Best practices + +### Scope to specific tokens and functions +Always define `scopes` to restrict which tokens and functions the access key can call. A key scoped to `transfer` on a specific token cannot be used to call other tokens or functions, even if compromised. + +### Set appropriate expiry +Access keys should have a reasonable expiry window. Use `Expiry.days(7)` for interactive sessions or `Expiry.hours(1)` for short-lived operations. + +### Use spending limits +Combine scopes with per-token spending limits for defense in depth. Spending limits cap the total amount a key can transfer, while scopes restrict which tokens it can interact with. + +## Learning resources + + + + diff --git a/vocs.config.ts b/vocs.config.ts index 6257bab2..99b84481 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -100,6 +100,10 @@ export default defineConfig({ text: 'Embed domain-bound Passkeys', link: '/guide/use-accounts/embed-passkeys', }, + { + text: 'Authorize access keys', + link: '/guide/use-accounts/authorize-access-keys', + }, { text: 'Connect to other wallets', link: '/guide/use-accounts/connect-to-wallets', @@ -188,28 +192,6 @@ export default defineConfig({ }, ], }, - { - text: 'Use Access Keys', - collapsed: true, - items: [ - { - text: 'Overview', - link: '/guide/access-keys', - }, - { - text: 'Send a payment', - link: '/guide/access-keys/send-a-payment', - }, - { - text: 'Set up subscriptions', - link: '/guide/access-keys/subscriptions', - }, - { - text: 'Revoke access keys', - link: '/guide/access-keys/revoke', - }, - ], - }, { text: 'Issue Stablecoins', collapsed: true, From b0c6d29da4c295c167d5d65143598b8e630aae4c Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:19:14 +1000 Subject: [PATCH 04/10] rm --- tasks/access-keys-guides.md | 152 ------------------------------------ 1 file changed, 152 deletions(-) delete mode 100644 tasks/access-keys-guides.md diff --git a/tasks/access-keys-guides.md b/tasks/access-keys-guides.md deleted file mode 100644 index 918b3ac0..00000000 --- a/tasks/access-keys-guides.md +++ /dev/null @@ -1,152 +0,0 @@ -# Use Access Keys — Guide Structure - -New sidebar section under **Build on Tempo** called **"Use Access Keys"**. - -## Sidebar Structure - -``` -Build on Tempo -├── ...existing items... -├── Use Access Keys ← NEW section (after "Make Payments" or "Issue Stablecoins") -│ ├── Overview → /guide/access-keys -│ ├── Send a payment → /guide/access-keys/send-a-payment ← START HERE -│ ├── Set up subscriptions → /guide/access-keys/subscriptions -│ └── Revoke access keys → /guide/access-keys/revoke-a-key (future) -├── ...existing items... -``` - -## File Structure - -``` -src/pages/guide/access-keys/ -├── index.mdx # Overview — what access keys are, when to use them -├── send-a-payment.mdx # Send a payment using an access key -└── subscriptions.mdx # Set up recurring subscriptions via access keys -``` - -## Page: Overview (`index.mdx`) - -Brief intro page covering: -- What access keys are (secondary signing keys provisioned by a root key) -- Why use them (avoid repeated passkey prompts, delegate to agents/scripts, scoped spending limits) -- Link to protocol spec (AccountKeychain) -- Cards linking to each guide - -## Page: Send a Payment (`send-a-payment.mdx`) - -Mirrors the structure of `/guide/payments/send-a-payment` but centered around access keys. - -### Outline - -1. **Intro** — "Send a stablecoin payment using an access key. Access keys let you sign transactions without repeated passkey prompts, with optional spending limits." - -2. **Steps** - 1. **Set up Wagmi & integrate accounts** — link to existing embed passkeys/connect wallets guides - 2. **Authorize an access key** — show how to authorize an access key on connect (via `authorizeAccessKey` param on connector) or programmatically via `wallet_authorizeAccessKey` - - **Wagmi examples should show two variants side-by-side (Tabs):** - - **Tempo Wallet** — using `tempoWallet()` connector with `authorizeAccessKey` - - **Domain-bound WebAuthn** — using `webAuthn()` connector with `authorizeAccessKey` - 3. **Add testnet funds** — same as existing (faucet) - 4. **Send a payment with the access key** — show `useTransferSync` (transactions auto-sign with the access key, no passkey prompt) - 5. **Display receipt** — same pattern as existing - -3. **Recipes** (Tabs: Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / Cast / Solidity) - - **Authorize an access key** — code to provision a key with expiry + spending limits - - **Send a transfer with an access key** — code showing the key_authorization field - - **Check remaining spending limit** — read from AccountKeychain precompile - -4. **Best practices** - - Set appropriate expiry times - - Use spending limits to scope access - - Revoke keys when no longer needed - - Store access keys securely - -5. **Next steps** - - Revoke access keys → (future guide) - - Learn about [Account Keychain](/protocol/transactions/AccountKeychain) - -## Page: Set Up Subscriptions (`subscriptions.mdx`) - -Subscriptions use access keys as the primitive — a user authorizes an access key with a spending limit and expiry, and the merchant/service pulls payments periodically using that key. - -### Outline - -1. **Intro** — "Set up recurring stablecoin subscriptions on Tempo. Access keys with spending limits let users authorize merchants to pull payments on a schedule — no smart contract escrow needed." - -2. **How it works** - - User authorizes an access key for the merchant with a periodic spending limit (e.g. 10 USDC/month) - - Merchant stores the access key and pulls payments on their schedule - - User can revoke the key at any time to cancel - - Spending limits prevent overcharging - -3. **Steps** - 1. **Set up accounts** — link to existing guides - 2. **User: Authorize a subscription key** — authorize an access key for the merchant's address with spending limits matching the subscription amount + expiry - - **Wagmi examples should show two variants (Tabs):** - - **Tempo Wallet** — using `tempoWallet()` connector with `authorizeAccessKey` - - **Domain-bound WebAuthn** — using `webAuthn()` connector with `authorizeAccessKey` - 3. **Merchant: Pull a payment** — use the access key to sign a transfer on behalf of the user - 4. **User: Cancel the subscription** — revoke the access key - -4. **Recipes** (Tabs: Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / etc.) - - **Authorize a subscription key with monthly limit** - - **Pull a subscription payment (merchant-side)** - - **Check remaining subscription allowance** - - **Revoke/cancel subscription** - -5. **Best practices** - - Set spending limits to match subscription amount (prevent overcharging) - - Use expiry for fixed-term subscriptions - - Provide users a clear way to revoke (cancel) - - Emit events / memos for reconciliation - -6. **Next steps** - - Send a payment → /guide/access-keys/send-a-payment - - Account Keychain spec → /protocol/transactions/AccountKeychain - -## vocs.config.ts Changes - -Add new sidebar item after "Make Payments": - -```ts -{ - text: 'Use Access Keys', - collapsed: true, - items: [ - { text: 'Overview', link: '/guide/access-keys' }, - { text: 'Send a payment', link: '/guide/access-keys/send-a-payment' }, - { text: 'Set up subscriptions', link: '/guide/access-keys/subscriptions' }, - ], -}, -``` - -## Phases - -### Phase 1: Scaffold & Overview ✅ -- [x] Draft structure (this file) -- [x] Create `src/pages/guide/access-keys/` directory -- [x] Create `src/pages/guide/access-keys/index.mdx` (overview page) -- [x] Add sidebar entry in `vocs.config.ts` (all items, link future ones) -- [x] Verify with `pnpm run check` - -### Phase 2: Send a Payment guide ✅ -- [x] Create `src/pages/guide/access-keys/send-a-payment.mdx` - - [x] Intro + steps section (set up, authorize key, add funds, send, receipt) - - [x] Wagmi tabs: Tempo Wallet + WebAuthn variants - - [x] Recipes section (Viem / Wagmi (Tempo Wallet) / Wagmi (WebAuthn) / Rust / Cast) - - [x] Best practices + next steps -- [x] Verify with `pnpm run check` - -### Phase 3: Subscriptions guide -- [ ] Create `src/pages/guide/access-keys/subscriptions.mdx` - - [ ] Intro + "How it works" section - - [ ] Steps (authorize subscription key, pull payment, cancel) - - [ ] Wagmi tabs: Tempo Wallet + WebAuthn variants - - [ ] Recipes section (authorize, pull, check allowance, revoke) - - [ ] Best practices + next steps -- [ ] Verify with `pnpm run dev` and `pnpm run check` - -### Phase 4: Polish & cross-link -- [ ] Cross-link from existing guides (payments, tempo-transaction, machine-payments) -- [ ] Add links from AccountKeychain protocol page to new guides -- [ ] Final `pnpm run check` for dead links From f931b5bd1fd8fd51bd0a6f1a3d24037b053b4a6d Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:19:57 +1000 Subject: [PATCH 05/10] up --- package.json | 2 +- pnpm-lock.yaml | 50 ++++++++++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index b74959f7..5a531d27 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@vercel/analytics": "^1.6.1", "@vercel/speed-insights": "^1.3.1", "abitype": "^1.2.3", - "accounts": "^0.6.5", + "accounts": "^0.7.1", "cva": "1.0.0-beta.4", "mermaid": "^11.14.0", "monaco-editor": "^0.55.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88008f1c..76cf3fbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,8 +38,8 @@ importers: specifier: ^1.2.3 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.15(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)) + specifier: ^0.7.1 + version: 0.7.1(@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.15(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) @@ -1640,8 +1640,8 @@ packages: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} - accounts@0.6.7: - resolution: {integrity: sha512-bXTyx3AFoe98dnlavPsxp7Uoho+QXNdOeHNdsvzC5pzQ2idgK50yUiBTKXtI7+E8kSvvfzGQR8ZdwfgJS5bJHg==} + accounts@0.7.1: + resolution: {integrity: sha512-cPWahfFLc7vsCHN+sppXIfg53+sQIRtxv7AeJba8AYvPg2rViVbslIWZxgpy+Heizf7s07u+Pr3GkhShjhYUbQ==} peerDependencies: '@react-native-async-storage/async-storage': ^3.0.2 '@wagmi/core': '>=2' @@ -2430,6 +2430,10 @@ packages: resolution: {integrity: sha512-p1JfQMKaceuCbpJKAPKVqyqviZdS0eUxH9v82oWo1kb9xjQ5wA6iP3FNVAPDFlz5/p7d45lO+BpSk1tuSZMF4Q==} engines: {node: '>=16.9.0'} + hono@4.12.14: + resolution: {integrity: sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w==} + engines: {node: '>=16.9.0'} + html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} @@ -2949,8 +2953,8 @@ packages: moo@0.5.3: resolution: {integrity: sha512-m2fmM2dDm7GZQsY7KK2cme8agi+AAljILjQnof7p1ZMDe6dQ4bdnSMx0cPppudoeNv5hEFQirN6u+O4fDE0IWA==} - mppx@0.5.12: - resolution: {integrity: sha512-pr6epOYJd8Q6D+MRMc27G48IMh0naAGMMyY1cZYrxMXVwH8PPn1ZaqUwv31svcjOV+UpSrSAe/MP2hRWJ0KQ7A==} + mppx@0.5.11: + resolution: {integrity: sha512-jV3G7RKGp0ANk7UBcfAeIRgqKDtJUDOCdwtqQKQi6dft9hTOLo5+jfLG7NRIE/1lncbIhxsX+zXhfbi34lgcxA==} hasBin: true peerDependencies: '@modelcontextprotocol/sdk': '>=1.25.0' @@ -3141,24 +3145,24 @@ packages: outvariant@1.4.0: resolution: {integrity: sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw==} - ox@0.14.10: - resolution: {integrity: sha512-PYsqEnSP7CrcxISS3uVBtw9yPy2gATAnWNptTI0pMnlrXLTiw0Xw/IIivJVHDFgGvKuRAtBSafhVjs+jis3CVA==} + ox@0.14.15: + resolution: {integrity: sha512-3TubCmbKen/cuZQzX0qDbOS5lojjdSZ90lqKxWIDWd5siuJ0IJBaTXMYs8eMPLcraqnOwGZazz3apHPGiRCkGQ==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: typescript: optional: true - ox@0.14.15: - resolution: {integrity: sha512-3TubCmbKen/cuZQzX0qDbOS5lojjdSZ90lqKxWIDWd5siuJ0IJBaTXMYs8eMPLcraqnOwGZazz3apHPGiRCkGQ==} + ox@0.14.17: + resolution: {integrity: sha512-jOzNb2Wlfzsr8z/GoCtd1bf6OSRuWuysvbhnHGD+7fV1WRbcBR6B0RYoe3xWnUedF7zp4l5APmS7CzAhUok/lA==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: typescript: optional: true - ox@0.14.17: - resolution: {integrity: sha512-jOzNb2Wlfzsr8z/GoCtd1bf6OSRuWuysvbhnHGD+7fV1WRbcBR6B0RYoe3xWnUedF7zp4l5APmS7CzAhUok/lA==} + ox@0.14.7: + resolution: {integrity: sha512-zSQ/cfBdolj7U4++NAvH7sI+VG0T3pEohITCgcQj8KlawvTDY4vGVhDT64Atsm0d6adWfIYHDpu88iUBMMp+AQ==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -3911,7 +3915,7 @@ packages: optional: true vocs@https://pkg.pr.new/wevm/vocs@2fb25c2: - resolution: {tarball: https://pkg.pr.new/wevm/vocs@2fb25c2} + resolution: {integrity: sha512-ks2EN0bid4JPpFiHH8LDtKn4fRII9HrpyeHmD49VoOmZcgFvK6FAQ5iryi8HeS1f7uZfk/UoFdaPKC0mnR7ebw==, tarball: https://pkg.pr.new/wevm/vocs@2fb25c2} version: 0.0.0 hasBin: true peerDependencies: @@ -5547,12 +5551,12 @@ 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.15(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.7.1(@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.15(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 + hono: 4.12.14 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)) + mppx: 0.5.11(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.14)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)) ox: 0.14.15(typescript@5.9.3)(zod@4.3.6) webauthx: 0.1.1(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 @@ -6412,6 +6416,8 @@ snapshots: hono@4.12.12: {} + hono@4.12.14: {} + html-void-elements@3.0.0: {} http-errors@2.0.1: @@ -7176,16 +7182,16 @@ snapshots: moo@0.5.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)): + mppx@0.5.11(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.14)(typescript@5.9.3)(viem@2.48.0(typescript@5.9.3)(zod@4.3.6)): dependencies: incur: 0.3.25 - ox: 0.14.10(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.7(typescript@5.9.3)(zod@4.3.6) viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 optionalDependencies: '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6) express: 5.2.1 - hono: 4.12.12 + hono: 4.12.14 transitivePeerDependencies: - typescript @@ -7255,7 +7261,7 @@ snapshots: outvariant@1.4.0: {} - ox@0.14.10(typescript@5.9.3)(zod@4.3.6): + ox@0.14.15(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -7270,7 +7276,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.15(typescript@5.9.3)(zod@4.3.6): + ox@0.14.17(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -7285,7 +7291,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.17(typescript@5.9.3)(zod@4.3.6): + ox@0.14.7(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 From 1483c371b110090d763cee794542073c72483eca Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Wed, 22 Apr 2026 02:55:36 +1000 Subject: [PATCH 06/10] Delete src/pages/guide/access-keys/index.mdx --- src/pages/guide/access-keys/index.mdx | 47 --------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/pages/guide/access-keys/index.mdx diff --git a/src/pages/guide/access-keys/index.mdx b/src/pages/guide/access-keys/index.mdx deleted file mode 100644 index ac526369..00000000 --- a/src/pages/guide/access-keys/index.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Use Access Keys -description: Delegate transaction signing with scoped access keys. Authorize secondary keys with spending limits and expiry for payments, subscriptions, and agent workflows. ---- - -import { Cards, Card } from 'vocs' - -# Use Access Keys - -Access keys are secondary signing keys authorized by your account's root key. They let you delegate transaction signing with scoped permissions - avoiding repeated sign prompts and enabling use cases like subscriptions and agent-driven payments. - -## Why use access keys? - -- **No repeated prompts**: authorize a key once, sign subsequent transactions without signing prompts -- **Spending limits**: scope keys with per-token spending limits to control exposure -- **Expiry**: set keys to automatically expire after a time window -- **Revocable**: revoke keys at any time to immediately cut off access - -## Guides - - - - - - - - - -## Learn more - -- [Account Keychain specification](/protocol/transactions/AccountKeychain): technical details on how access keys work at the protocol level -- [Tempo Transactions](/guide/tempo-transaction): access keys are a feature of Tempo Transactions From e9f6c6e0a6eea730961752e7c51bf79f91efc478 Mon Sep 17 00:00:00 2001 From: jxom <7336481+jxom@users.noreply.github.com> Date: Wed, 22 Apr 2026 03:00:44 +1000 Subject: [PATCH 07/10] Update authorize-access-keys.mdx --- src/pages/guide/use-accounts/authorize-access-keys.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/guide/use-accounts/authorize-access-keys.mdx b/src/pages/guide/use-accounts/authorize-access-keys.mdx index 6ab04586..186bddae 100644 --- a/src/pages/guide/use-accounts/authorize-access-keys.mdx +++ b/src/pages/guide/use-accounts/authorize-access-keys.mdx @@ -210,7 +210,6 @@ function SendPayment() { ### Next steps Now that you can send payments with access keys: -- **[Revoke access keys](/guide/access-keys/revoke)** when they are no longer needed - Learn about the [Account Keychain specification](/protocol/transactions/AccountKeychain) - Send a payment [with a specific fee token](/guide/payments/pay-fees-in-any-stablecoin) From 96542754ba83860ee0367a58fadd8bd822583cdc Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Fri, 24 Apr 2026 08:21:59 -0700 Subject: [PATCH 08/10] fix: update pnpm-lock.yaml for accounts ^0.7.1 --- pnpm-lock.yaml | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35423bcc..e09a05e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,8 +38,8 @@ importers: specifier: ^1.2.3 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)) + specifier: ^0.7.1 + version: 0.7.2(@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))(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))) cva: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(typescript@5.9.3) @@ -1640,15 +1640,16 @@ packages: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} - accounts@0.6.7: - resolution: {integrity: sha512-bXTyx3AFoe98dnlavPsxp7Uoho+QXNdOeHNdsvzC5pzQ2idgK50yUiBTKXtI7+E8kSvvfzGQR8ZdwfgJS5bJHg==} + accounts@0.7.2: + resolution: {integrity: sha512-oMsrbfGxMd1mjfLF0j4d9cUYR/N5vadHvh0kwAI9nKchBJjKJde6m/rF8wbeLM5FwYEUnrwrkkwtAP7J7Oxc/w==} peerDependencies: '@react-native-async-storage/async-storage': ^3.0.2 - '@wagmi/core': '>=2' + '@wagmi/core': '>=3.4.3' expo-secure-store: ^55.0.12 expo-web-browser: ^55.0.13 react: '>=18' viem: '>=2.43.3' + wagmi: '>=0.0.0' peerDependenciesMeta: '@react-native-async-storage/async-storage': optional: true @@ -1662,6 +1663,8 @@ packages: optional: true viem: optional: true + wagmi: + optional: true acorn-import-phases@1.0.4: resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} @@ -2949,8 +2952,8 @@ packages: moo@0.5.3: resolution: {integrity: sha512-m2fmM2dDm7GZQsY7KK2cme8agi+AAljILjQnof7p1ZMDe6dQ4bdnSMx0cPppudoeNv5hEFQirN6u+O4fDE0IWA==} - mppx@0.5.12: - resolution: {integrity: sha512-pr6epOYJd8Q6D+MRMc27G48IMh0naAGMMyY1cZYrxMXVwH8PPn1ZaqUwv31svcjOV+UpSrSAe/MP2hRWJ0KQ7A==} + mppx@0.5.11: + resolution: {integrity: sha512-jV3G7RKGp0ANk7UBcfAeIRgqKDtJUDOCdwtqQKQi6dft9hTOLo5+jfLG7NRIE/1lncbIhxsX+zXhfbi34lgcxA==} hasBin: true peerDependencies: '@modelcontextprotocol/sdk': '>=1.25.0' @@ -3141,24 +3144,24 @@ packages: outvariant@1.4.0: resolution: {integrity: sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw==} - ox@0.14.10: - resolution: {integrity: sha512-PYsqEnSP7CrcxISS3uVBtw9yPy2gATAnWNptTI0pMnlrXLTiw0Xw/IIivJVHDFgGvKuRAtBSafhVjs+jis3CVA==} + ox@0.14.17: + resolution: {integrity: sha512-jOzNb2Wlfzsr8z/GoCtd1bf6OSRuWuysvbhnHGD+7fV1WRbcBR6B0RYoe3xWnUedF7zp4l5APmS7CzAhUok/lA==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: typescript: optional: true - ox@0.14.17: - resolution: {integrity: sha512-jOzNb2Wlfzsr8z/GoCtd1bf6OSRuWuysvbhnHGD+7fV1WRbcBR6B0RYoe3xWnUedF7zp4l5APmS7CzAhUok/lA==} + ox@0.14.18: + resolution: {integrity: sha512-1Irk/tvMsw7xJDuCTT/u9azSjz0YX9hrYFgJOacIuFwibaW2zZBXAMrpzegndYb5o8GLpxB6/0qro4/c40q6VQ==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: typescript: optional: true - ox@0.14.18: - resolution: {integrity: sha512-1Irk/tvMsw7xJDuCTT/u9azSjz0YX9hrYFgJOacIuFwibaW2zZBXAMrpzegndYb5o8GLpxB6/0qro4/c40q6VQ==} + ox@0.14.7: + resolution: {integrity: sha512-zSQ/cfBdolj7U4++NAvH7sI+VG0T3pEohITCgcQj8KlawvTDY4vGVhDT64Atsm0d6adWfIYHDpu88iUBMMp+AQ==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -5547,12 +5550,12 @@ 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.7.2(@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))(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))): 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)) + mppx: 0.5.11(@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) webauthx: 0.1.1(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 @@ -5561,6 +5564,7 @@ snapshots: '@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)) react: 19.2.5 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.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)) transitivePeerDependencies: - '@modelcontextprotocol/sdk' - '@types/react' @@ -7176,10 +7180,10 @@ snapshots: moo@0.5.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)): + mppx@0.5.11(@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)): dependencies: incur: 0.3.25 - ox: 0.14.10(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.7(typescript@5.9.3)(zod@4.3.6) viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 optionalDependencies: @@ -7255,7 +7259,7 @@ snapshots: outvariant@1.4.0: {} - ox@0.14.10(typescript@5.9.3)(zod@4.3.6): + ox@0.14.17(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -7270,7 +7274,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.17(typescript@5.9.3)(zod@4.3.6): + ox@0.14.18(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 @@ -7285,7 +7289,7 @@ snapshots: transitivePeerDependencies: - zod - ox@0.14.18(typescript@5.9.3)(zod@4.3.6): + ox@0.14.7(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 '@noble/ciphers': 1.3.0 From 64291e2d086550714b75348bef3f940f3880b0c2 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Fri, 24 Apr 2026 08:27:58 -0700 Subject: [PATCH 09/10] fix: resolve TypeScript errors from accounts v0.7 upgrade --- src/components/guides/AccountsSignIn.tsx | 2 +- src/wagmi.config.ts | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/guides/AccountsSignIn.tsx b/src/components/guides/AccountsSignIn.tsx index 5c0e9682..b870d15a 100644 --- a/src/components/guides/AccountsSignIn.tsx +++ b/src/components/guides/AccountsSignIn.tsx @@ -37,5 +37,5 @@ export function AccountsSignIn() { function useTempoWalletConnector() { const connectors = useConnectors() - return connectors.find((c) => c.id === 'xyz.tempo') + return connectors.find((c: { id: string }) => c.id === 'xyz.tempo') } diff --git a/src/wagmi.config.ts b/src/wagmi.config.ts index d9dffbfd..8c2a667b 100644 --- a/src/wagmi.config.ts +++ b/src/wagmi.config.ts @@ -51,11 +51,12 @@ export function getConfig(options: getConfig.Options = {}) { chains: [chain], connectors: [ ...(import.meta.env.VITE_E2E === 'true' - ? [ - webAuthnAccounts({ - rdns: 'webAuthn', - }), - ] + ? [ + webAuthnAccounts({ + keyManager: KeyManager.http('https://keys.tempo.xyz'), + rpId, + }), + ] : [ tempoWallet({ authorizeAccessKey: () => ({ @@ -124,7 +125,7 @@ export function useTempoWalletConnector() { const connectors = useConnectors() return React.useMemo( // biome-ignore lint/style/noNonNullAssertion: _ - () => connectors.find((connector) => connector.id === 'xyz.tempo')!, + () => connectors.find((c: { id: string }) => c.id === 'xyz.tempo')!, [connectors], ) } @@ -133,7 +134,7 @@ export function useWebAuthnConnector() { const connectors = useConnectors() return React.useMemo( // biome-ignore lint/style/noNonNullAssertion: _ - () => connectors.find((connector) => connector.id === 'webAuthn')!, + () => connectors.find((c: { id: string }) => c.id === 'webAuthn')!, [connectors], ) } From cb559f03e45a1d0a8434aebc9c6fdb69e4c65be1 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Fri, 24 Apr 2026 08:43:48 -0700 Subject: [PATCH 10/10] fix: upgrade wagmi/viem to canary versions compatible with accounts 0.7 --- package.json | 5 +- pnpm-lock.yaml | 216 +++++++++--------- .../guides/VirtualAddressesLiveDemo.tsx | 8 +- src/wagmi.config.ts | 48 ++-- 4 files changed, 138 insertions(+), 139 deletions(-) diff --git a/package.json b/package.json index d145b32c..cbf03bd9 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@tanstack/react-query": "^5.99.0", "@vercel/analytics": "^1.6.1", "@vercel/speed-insights": "^1.3.1", + "@wagmi/core": "0.0.0-canary-20260421205751", "abitype": "^1.2.3", "accounts": "^0.7.1", "cva": "1.0.0-beta.4", @@ -41,9 +42,9 @@ "tailwindcss": "^4.2.2", "unplugin-auto-import": "^21.0.0", "unplugin-icons": "^23.0.1", - "viem": "2.48.0", + "viem": "^2.48.4", "vocs": "https://pkg.pr.new/wevm/vocs@2fb25c2", - "wagmi": "^3.6.1", + "wagmi": "0.0.0-canary-20260421205751", "waku": "1.0.0-alpha.4", "zod": "^4.3.6" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc3f242d..3fbeca99 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,12 +39,15 @@ importers: '@vercel/speed-insights': specifier: ^1.3.1 version: 1.3.1(react@19.2.5) + '@wagmi/core': + specifier: 0.0.0-canary-20260421205751 + version: 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(typescript@5.9.3)(zod@4.3.6)) abitype: specifier: ^1.2.3 version: 1.2.3(typescript@5.9.3)(zod@4.3.6) accounts: specifier: ^0.7.1 - version: 0.7.2(@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))(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))) + version: 0.7.2(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@0.0.0-canary-20260421205751)(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.4(typescript@5.9.3)(zod@4.3.6))(wagmi@0.0.0-canary-20260421205751) cva: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(typescript@5.9.3) @@ -91,17 +94,17 @@ importers: specifier: ^23.0.1 version: 23.0.1(@svgr/core@8.1.0(typescript@5.9.3)) viem: - specifier: 2.48.0 - version: 2.48.0(typescript@5.9.3)(zod@4.3.6) + specifier: ^2.48.4 + version: 2.48.4(typescript@5.9.3)(zod@4.3.6) vocs: specifier: https://pkg.pr.new/wevm/vocs@2fb25c2 - 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)) + 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.2)(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.2)(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.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)) + specifier: 0.0.0-canary-20260421205751 + version: 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(viem@2.48.4(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) + 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.2)(tsx@4.21.0)(yaml@2.8.3) zod: specifier: ^4.3.6 version: 4.3.6 @@ -126,7 +129,7 @@ importers: version: 7.0.0-dev.20260122.3 '@vitejs/plugin-react': specifier: ^5.2.0 - version: 5.2.0(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)) + version: 5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) anser: specifier: ^2.3.5 version: 2.3.5 @@ -144,10 +147,10 @@ importers: version: 1.6.0(react@19.2.5) vite: specifier: ^7.3.2 - version: 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) + version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) vite-plugin-mkcert: specifier: ^1.17.12 - version: 1.17.12(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)) + version: 1.17.12(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) packages: @@ -1533,16 +1536,17 @@ packages: react-server-dom-webpack: optional: true - '@wagmi/connectors@8.0.1': - resolution: {integrity: sha512-Rga0EDdcdUBlKtlUUPdBPAIlaFIkO8q0xcNObN/Q/CloM1zaruSFht1q3IaJKrytIDkncQa9uhHU6/imzysvpQ==} + '@wagmi/connectors@0.0.0-canary-20260421205751': + resolution: {integrity: sha512-jxZAMcSExry1+7X/B9nUbkw22x5bB/4mcNGKamkUx5HoXqftpQnf1ikKX2MizgkDni2Mr4P+j/NOlK+5d/qZgQ==} peerDependencies: '@base-org/account': ^2.5.1 '@coinbase/wallet-sdk': ^4.3.6 '@metamask/connect-evm': ~0.9.0 '@safe-global/safe-apps-provider': ~0.18.6 '@safe-global/safe-apps-sdk': ^9.1.0 - '@wagmi/core': 3.4.2 + '@wagmi/core': 0.0.0-canary-20260421205751 '@walletconnect/ethereum-provider': ^2.21.1 + accounts: ~0.6.7 porto: ~0.2.35 typescript: '>=5.7.3' viem: 2.x @@ -1559,22 +1563,24 @@ packages: optional: true '@walletconnect/ethereum-provider': optional: true + accounts: + optional: true porto: optional: true typescript: optional: true - '@wagmi/core@3.4.2': - resolution: {integrity: sha512-01i0ILBe74G8eairY2AIKC4Atrd00xw7EckZ5luU1ARl/6789UH79wXHwJDkHyktXtjn6QoSoBRW2brtlS8SWg==} + '@wagmi/core@0.0.0-canary-20260421205751': + resolution: {integrity: sha512-ZKjCkCBY2TcbNFyhl0G/0QNIhPcBDwb1tiVEb3cq3Nq7ig0hHy3YOjL+bREJwUMfzEglqiNRQ/L+OhwCfGNb0Q==} peerDependencies: '@tanstack/query-core': '>=5.0.0' - ox: '>=0.11.1' + accounts: ~0.6.7 typescript: '>=5.7.3' viem: 2.x peerDependenciesMeta: '@tanstack/query-core': optional: true - ox: + accounts: optional: true typescript: optional: true @@ -3141,14 +3147,6 @@ packages: outvariant@1.4.0: resolution: {integrity: sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw==} - ox@0.14.17: - resolution: {integrity: sha512-jOzNb2Wlfzsr8z/GoCtd1bf6OSRuWuysvbhnHGD+7fV1WRbcBR6B0RYoe3xWnUedF7zp4l5APmS7CzAhUok/lA==} - peerDependencies: - typescript: '>=5.4.0' - peerDependenciesMeta: - typescript: - optional: true - ox@0.14.20: resolution: {integrity: sha512-rby38C3nDn8eQkf29Zgw4hkCZJ64Qqi0zRPWL8ENUQ7JVuoITqrVtwWQgM/He19SCMUEc7hS/Sjw0jIOSLJhOw==} peerDependencies: @@ -3610,6 +3608,10 @@ packages: resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} engines: {node: '>=6'} + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + tar@7.5.13: resolution: {integrity: sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==} engines: {node: '>=18'} @@ -3630,8 +3632,8 @@ packages: uglify-js: optional: true - terser@5.46.1: - resolution: {integrity: sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==} + terser@5.46.2: + resolution: {integrity: sha512-uxfo9fPcSgLDYob/w1FuL0c99MWiJDnv+5qXSQc5+Ki5NjVNsYi66INnMFBjf6uFz6OnX12piJQPF4IpjJTNTw==} engines: {node: '>=10'} hasBin: true @@ -3839,8 +3841,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - viem@2.48.0: - resolution: {integrity: sha512-0uLzTAUNKPpY9Cf3OBCPdwClXx9CEHAkoVYnxMPdHt7cRI1DobMso+pHZvU7itD+hFwE4htmp9QfP+5lb+kn0g==} + viem@2.48.4: + resolution: {integrity: sha512-mReP/rgY2P+WeeRSG4sUvccCLKfyAW1C73Y3KkobAqgzYmVna9qyUMNE44xIUkDtfvRuC33r24UhF4baBYovsg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -3953,8 +3955,8 @@ packages: w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} - wagmi@3.6.1: - resolution: {integrity: sha512-GhOm/1FIhsendD+VmBknX+zCxYZCcysbraj/A7L7Lszm8+HgTdHj7eF6DrknKVG12NTXYdmM4vni+jHHrdBuaQ==} + wagmi@0.0.0-canary-20260421205751: + resolution: {integrity: sha512-y2TJVluIRMgFSwGMv77WfiLe66ya0kbuxBmlJAIgptqqdzidSQXxB/x0NqDh0gxqvZR/0Sa0H2GpXbVM7+atMA==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' @@ -3983,8 +3985,8 @@ packages: webauthx@0.1.1: resolution: {integrity: sha512-3jiskZl0jiTUoO8r3ySUYItdXNDBpfzxnxPx7XM0giF2dIY7S4KqHVbH04Qglz98nP8RaSV1/+3eDCx1s3WDiQ==} - webpack-sources@3.3.4: - resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==} + webpack-sources@3.4.0: + resolution: {integrity: sha512-gHwIe1cgBvvfLeu1Yz/dcFpmHfKDVxxyqI+kzqmuxZED81z2ChxpyqPaWcNqigPywhaEke7AjSGga+kxY55gjQ==} engines: {node: '>=10.13.0'} webpack-virtual-modules@0.6.2: @@ -5086,12 +5088,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.2.2 '@tailwindcss/oxide-win32-x64-msvc': 4.2.2 - '@tailwindcss/vite@4.2.2(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))': + '@tailwindcss/vite@4.2.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@tailwindcss/node': 4.2.2 '@tailwindcss/oxide': 4.2.2 tailwindcss: 4.2.2 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) '@takumi-rs/core-darwin-arm64@0.62.8': optional: true @@ -5393,7 +5395,7 @@ snapshots: optionalDependencies: react: 19.2.5 - '@vitejs/plugin-react@5.1.2(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))': + '@vitejs/plugin-react@5.1.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) @@ -5401,11 +5403,11 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.53 '@types/babel__core': 7.20.5 react-refresh: 0.18.0 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@5.2.0(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))': + '@vitejs/plugin-react@5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) @@ -5413,11 +5415,11 @@ snapshots: '@rolldown/pluginutils': 1.0.0-rc.3 '@types/babel__core': 7.20.5 react-refresh: 0.18.0 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-rsc@0.5.23(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)(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))': + '@vitejs/plugin-rsc@0.5.23(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)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.13 es-module-lexer: 2.0.0 @@ -5428,27 +5430,44 @@ snapshots: srvx: 0.11.15 strip-literal: 3.1.0 turbo-stream: 3.2.0 - 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) - vitefu: 1.1.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)) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + vitefu: 1.1.3(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) 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.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/connectors@0.0.0-canary-20260421205751(@wagmi/core@0.0.0-canary-20260421205751)(accounts@0.7.2)(typescript@5.9.3)(viem@2.48.4(typescript@5.9.3)(zod@4.3.6))': + dependencies: + '@wagmi/core': 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(typescript@5.9.3)(zod@4.3.6)) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) + optionalDependencies: + accounts: 0.7.2(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@0.0.0-canary-20260421205751)(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.4(typescript@5.9.3)(zod@4.3.6))(wagmi@0.0.0-canary-20260421205751) + typescript: 5.9.3 + + '@wagmi/core@0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(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.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) + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.9.3) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) + zustand: 5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.4.0(react@19.2.5)) optionalDependencies: + '@tanstack/query-core': 5.99.0 + accounts: 0.7.2(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@0.0.0-canary-20260421205751)(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.4(typescript@5.9.3)(zod@4.3.6))(wagmi@0.0.0-canary-20260421205751) typescript: 5.9.3 + transitivePeerDependencies: + - '@types/react' + - immer + - react + - use-sync-external-store - '@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))': + '@wagmi/core@0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(typescript@5.9.3)(zod@4.3.6))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.9.3) - viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) 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.20(typescript@5.9.3)(zod@4.3.6) + accounts: 0.7.2(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@0.0.0-canary-20260421205751)(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.4(typescript@5.9.3)(zod@4.3.6))(wagmi@0.0.0-canary-20260421205751) typescript: 5.9.3 transitivePeerDependencies: - '@types/react' @@ -5546,21 +5565,21 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - accounts@0.7.2(@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))(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))): + accounts@0.7.2(@modelcontextprotocol/sdk@1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6))(@types/react@19.2.14)(@wagmi/core@0.0.0-canary-20260421205751)(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.4(typescript@5.9.3)(zod@4.3.6))(wagmi@0.0.0-canary-20260421205751): dependencies: hono: 4.12.12 idb-keyval: 6.2.2 mipd: 0.0.7(typescript@5.9.3) - mppx: 0.5.11(@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)) + mppx: 0.5.11(@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.4(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.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)) + '@wagmi/core': 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(typescript@5.9.3)(zod@4.3.6)) react: 19.2.5 - 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)) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) + wagmi: 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(viem@2.48.4(typescript@5.9.3)(zod@4.3.6)) transitivePeerDependencies: - '@modelcontextprotocol/sdk' - '@types/react' @@ -7170,11 +7189,11 @@ snapshots: moo@0.5.3: {} - mppx@0.5.11(@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)): + mppx@0.5.11(@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.4(typescript@5.9.3)(zod@4.3.6)): dependencies: incur: 0.3.25 ox: 0.14.7(typescript@5.9.3)(zod@4.3.6) - viem: 2.48.0(typescript@5.9.3)(zod@4.3.6) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) zod: 4.3.6 optionalDependencies: '@modelcontextprotocol/sdk': 1.29.0(@cfworker/json-schema@4.1.1)(zod@4.3.6) @@ -7249,21 +7268,6 @@ snapshots: outvariant@1.4.0: {} - ox@0.14.17(typescript@5.9.3)(zod@4.3.6): - dependencies: - '@adraffy/ens-normalize': 1.11.1 - '@noble/ciphers': 1.3.0 - '@noble/curves': 1.9.1 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.2.3(typescript@5.9.3)(zod@4.3.6) - eventemitter3: 5.0.1 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - zod - ox@0.14.20(typescript@5.9.3)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 @@ -7481,7 +7485,7 @@ snapshots: react: 19.2.5 react-dom: 19.2.5(react@19.2.5) webpack: 5.104.1 - webpack-sources: 3.3.4 + webpack-sources: 3.4.0 react@19.2.5: {} @@ -7872,6 +7876,8 @@ snapshots: tapable@2.3.2: {} + tapable@2.3.3: {} + tar@7.5.13: dependencies: '@isaacs/fs-minipass': 4.0.1 @@ -7885,10 +7891,10 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 - terser: 5.46.1 + terser: 5.46.2 webpack: 5.104.1 - terser@5.46.1: + terser@5.46.2: dependencies: '@jridgewell/source-map': 0.3.11 acorn: 8.16.0 @@ -8100,7 +8106,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - viem@2.48.0(typescript@5.9.3)(zod@4.3.6): + viem@2.48.4(typescript@5.9.3)(zod@4.3.6): dependencies: '@noble/curves': 1.9.1 '@noble/hashes': 1.8.0 @@ -8108,7 +8114,7 @@ snapshots: '@scure/bip39': 1.6.0 abitype: 1.2.3(typescript@5.9.3)(zod@4.3.6) isows: 1.0.7(ws@8.18.3) - ox: 0.14.17(typescript@5.9.3)(zod@4.3.6) + ox: 0.14.20(typescript@5.9.3)(zod@4.3.6) ws: 8.18.3 optionalDependencies: typescript: 5.9.3 @@ -8119,19 +8125,19 @@ snapshots: vite-plugin-arraybuffer@0.1.4: {} - vite-plugin-mkcert@1.17.12(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)): + vite-plugin-mkcert@1.17.12(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): dependencies: debug: 4.4.3 picocolors: 1.1.1 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - supports-color - vite-plugin-wasm@3.6.0(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)): + vite-plugin-wasm@3.6.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): dependencies: - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.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): + vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3): dependencies: esbuild: 0.27.7 fdir: 6.5.0(picomatch@4.0.4) @@ -8144,15 +8150,15 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.32.0 - terser: 5.46.1 + terser: 5.46.2 tsx: 4.21.0 yaml: 2.8.3 - vitefu@1.1.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)): + vitefu@1.1.3(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): optionalDependencies: - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) - vocs@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)): + vocs@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.2)(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.2)(tsx@4.21.0)(yaml@2.8.3)): dependencies: '@base-ui/react': 1.3.0(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) '@codesandbox/sandpack-react': 2.20.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) @@ -8172,11 +8178,11 @@ snapshots: '@shikijs/types': 3.23.0 '@svgr/core': 8.1.0(typescript@5.9.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.9.3)) - '@tailwindcss/vite': 4.2.2(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)) + '@tailwindcss/vite': 4.2.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) '@takumi-rs/image-response': 0.62.8 '@takumi-rs/wasm': 0.62.8 - '@vitejs/plugin-react': 5.1.2(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)) - '@vitejs/plugin-rsc': 0.5.23(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)(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)) + '@vitejs/plugin-react': 5.1.2(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + '@vitejs/plugin-rsc': 0.5.23(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)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) cac: 6.7.14 cva: class-variance-authority@0.7.1 debug: 4.4.3 @@ -8222,13 +8228,13 @@ snapshots: urlpattern-polyfill: 10.1.0 vfile: 6.0.3 vite-plugin-arraybuffer: 0.1.4 - vite-plugin-wasm: 3.6.0(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)) + vite-plugin-wasm: 3.6.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) yaml: 2.8.3 zod: 4.3.6 optionalDependencies: mermaid: 11.14.0 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(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.2)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - '@cfworker/json-schema' - '@remix-run/react' @@ -8266,14 +8272,14 @@ 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.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)): + wagmi@0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@tanstack/react-query@5.99.0(react@19.2.5))(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(viem@2.48.4(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.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)) + '@wagmi/connectors': 0.0.0-canary-20260421205751(@wagmi/core@0.0.0-canary-20260421205751)(accounts@0.7.2)(typescript@5.9.3)(viem@2.48.4(typescript@5.9.3)(zod@4.3.6)) + '@wagmi/core': 0.0.0-canary-20260421205751(@tanstack/query-core@5.99.0)(@types/react@19.2.14)(accounts@0.7.2)(react@19.2.5)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(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) + viem: 2.48.4(typescript@5.9.3)(zod@4.3.6) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -8285,15 +8291,15 @@ snapshots: - '@tanstack/query-core' - '@types/react' - '@walletconnect/ethereum-provider' + - accounts - immer - - ox - porto - 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): + 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.2)(tsx@4.21.0)(yaml@2.8.3): dependencies: '@hono/node-server': 1.19.13(hono@4.12.12) - '@vitejs/plugin-react': 5.2.0(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)) - '@vitejs/plugin-rsc': 0.5.23(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)(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)) + '@vitejs/plugin-react': 5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + '@vitejs/plugin-rsc': 0.5.23(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)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) dotenv: 17.4.1 hono: 4.12.12 magic-string: 0.30.21 @@ -8302,7 +8308,7 @@ snapshots: 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) rsc-html-stream: 0.0.7 - 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) + vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) transitivePeerDependencies: - '@types/node' - jiti @@ -8331,7 +8337,7 @@ snapshots: - typescript - zod - webpack-sources@3.3.4: {} + webpack-sources@3.4.0: {} webpack-virtual-modules@0.6.2: {} @@ -8358,10 +8364,10 @@ snapshots: mime-types: 2.1.35 neo-async: 2.6.2 schema-utils: 4.3.3 - tapable: 2.3.2 + tapable: 2.3.3 terser-webpack-plugin: 5.4.0(webpack@5.104.1) watchpack: 2.5.1 - webpack-sources: 3.3.4 + webpack-sources: 3.4.0 transitivePeerDependencies: - '@swc/core' - esbuild @@ -8389,6 +8395,12 @@ snapshots: zod@4.3.6: {} + zustand@5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.4.0(react@19.2.5)): + optionalDependencies: + '@types/react': 19.2.14 + react: 19.2.5 + use-sync-external-store: 1.4.0(react@19.2.5) + 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: '@types/react': 19.2.14 diff --git a/src/components/guides/VirtualAddressesLiveDemo.tsx b/src/components/guides/VirtualAddressesLiveDemo.tsx index fff6a53a..024ff0f3 100644 --- a/src/components/guides/VirtualAddressesLiveDemo.tsx +++ b/src/components/guides/VirtualAddressesLiveDemo.tsx @@ -121,13 +121,7 @@ function PasskeyLogin() { className="font-normal text-[14px] -tracking-[2%]" onClick={async () => { await disconnect.disconnectAsync().catch(() => {}) - connect.connect({ - connector, - capabilities: { - label: 'Tempo Docs', - type: 'sign-up', - }, - }) + connect.connect({ connector }) }} type="button" > diff --git a/src/wagmi.config.ts b/src/wagmi.config.ts index 8c2a667b..01aed794 100644 --- a/src/wagmi.config.ts +++ b/src/wagmi.config.ts @@ -1,6 +1,5 @@ import { QueryClient } from '@tanstack/react-query' import { Expiry } from 'accounts' -import { tempoWallet, webAuthn as webAuthnAccounts } from 'accounts/wagmi' import * as React from 'react' import { parseUnits } from 'viem' import { tempoDevnet, tempoLocalnet, tempoModerato } from 'viem/chains' @@ -14,7 +13,7 @@ import { useConnectors, webSocket, } from 'wagmi' -import { KeyManager, webAuthn } from 'wagmi/tempo' +import { tempoWallet, webAuthn } from 'wagmi/tempo' import { alphaUsd, betaUsd, pathUsd, thetaUsd } from './components/guides/tokens' import { feeToken, moderatoZones } from './lib/private-zones.ts' @@ -52,33 +51,26 @@ export function getConfig(options: getConfig.Options = {}) { connectors: [ ...(import.meta.env.VITE_E2E === 'true' ? [ - webAuthnAccounts({ - keyManager: KeyManager.http('https://keys.tempo.xyz'), - rpId, - }), + webAuthn(), ] - : [ - tempoWallet({ - authorizeAccessKey: () => ({ - expiry: Expiry.days(1), - limits: [ - { token: pathUsd, limit: parseUnits('500', 6) }, - { token: alphaUsd, limit: parseUnits('500', 6) }, - { token: betaUsd, limit: parseUnits('500', 6) }, - { token: thetaUsd, limit: parseUnits('500', 6) }, - ], - }), - feePayer: { - precedence: 'user-first', - url: 'https://sponsor.moderato.tempo.xyz', - }, - }), - webAuthn({ - grantAccessKey: true, - keyManager: KeyManager.http('https://keys.tempo.xyz'), - rpId, - }), - ]), + : [ + tempoWallet({ + authorizeAccessKey: () => ({ + expiry: Expiry.days(1), + limits: [ + { token: pathUsd, limit: parseUnits('500', 6) }, + { token: alphaUsd, limit: parseUnits('500', 6) }, + { token: betaUsd, limit: parseUnits('500', 6) }, + { token: thetaUsd, limit: parseUnits('500', 6) }, + ], + }), + feePayer: { + precedence: 'user-first', + url: 'https://sponsor.moderato.tempo.xyz', + }, + }), + webAuthn(), + ]), ], multiInjectedProviderDiscovery, storage: createStorage({