Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.1",
"cva": "1.0.0-beta.4",
"mermaid": "^11.14.0",
"monaco-editor": "^0.55.1",
Expand All @@ -41,9 +41,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": "^3.6.4",
"waku": "1.0.0-alpha.4",
"zod": "^4.3.6"
},
Expand Down
145 changes: 71 additions & 74 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/components/guides/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ export function ReceiptHash({ hash }: { hash: string }) {
export function ExplorerAccountLink({
address,
inline = false,
}: { address: string; inline?: boolean }) {
}: {
address: string
inline?: boolean
}) {
const { trackExternalLinkClick } = usePostHogTracking()
const url = `${getExplorerHost()}/address/${address}`

Expand Down Expand Up @@ -459,7 +462,7 @@ export function Step(
<div className="flex items-center gap-3.5">
<div
className={cx(
'shrink-0 flex size-7 items-center justify-center rounded-full text-center text-[13px] text-black tabular-nums opacity-40 group-data-[completed=true]:opacity-100 dark:text-white',
'flex size-7 shrink-0 items-center justify-center rounded-full text-center text-[13px] text-black tabular-nums opacity-40 group-data-[completed=true]:opacity-100 dark:text-white',
completed ? 'bg-green3' : 'bg-gray4',
)}
>
Expand Down
22 changes: 2 additions & 20 deletions src/components/guides/EmbedPasskeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export function SignInButtons() {
const hydrated = useHydrated()
const connector = useWebAuthnConnector()
const busy = connect.isPending || disconnect.isPending
const isE2E = import.meta.env.VITE_E2E === 'true'

if (!hydrated || !connector)
return (
Expand All @@ -70,14 +69,7 @@ export function SignInButtons() {
await disconnect.disconnectAsync().catch(() => {})
connect.connect({
connector,
...(isE2E
? ({ capabilities: { method: 'register', name: 'Tempo Docs' } } as const)
: {
capabilities: {
label: 'Tempo Docs',
type: 'sign-up',
} as never,
}),
capabilities: { method: 'register', name: 'Tempo Docs' },
})
}}
type="button"
Expand All @@ -88,17 +80,7 @@ export function SignInButtons() {
variant="default"
onClick={async () => {
await disconnect.disconnectAsync().catch(() => {})
connect.connect(
isE2E
? { connector }
: {
connector,
capabilities: {
label: 'Tempo Docs',
type: 'sign-in',
} as never,
},
)
connect.connect({ connector, capabilities: { method: 'login' } })
}}
type="button"
>
Expand Down
13 changes: 7 additions & 6 deletions src/components/guides/VirtualAddressesLiveDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ function PasskeyLogin() {
connect.connect({
connector,
capabilities: {
label: 'Tempo Docs',
type: 'sign-up',
method: 'register',
name: 'Tempo Docs',
},
})
}}
Expand Down Expand Up @@ -661,7 +661,9 @@ export function VirtualAddressesLiveDemo() {
<span className="break-all font-mono text-[12px] text-primary">
{registration.virtualAddress}
</span>
{hasExplorerLink && <ExplorerAccountLink address={registration.virtualAddress} inline />}
{hasExplorerLink && (
<ExplorerAccountLink address={registration.virtualAddress} inline />
)}
</span>
</div>
<div>
Expand Down Expand Up @@ -700,9 +702,8 @@ export function VirtualAddressesLiveDemo() {
<div className="space-y-1">
<span className="text-primary">Transfer events in this receipt</span>
<div>
Treat the <span className="font-mono text-primary">sender → virtual</span>{' '}
and <span className="font-mono text-primary">virtual → master</span> pair as
one
Treat the <span className="font-mono text-primary">sender → virtual</span> and{' '}
<span className="font-mono text-primary">virtual → master</span> pair as one
logical deposit to the registered wallet. Other transfer logs in the receipt,
like fees, are separate.
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/accounts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ Get started with Wagmi by following the [official guide](https://wagmi.sh/react/

### Configure

After you have set up Wagmi, you can set up the Tempo Accounts SDK by using a Connector from `accounts/wagmi`.
After you have set up Wagmi, you can configure the Tempo Accounts SDK with `tempoWallet` from `wagmi/connectors` or `webAuthn` from `wagmi/tempo`.

:::code-group
```tsx twoslash [Tempo Wallet]
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi' // [!code hl]
import { tempoWallet } from 'wagmi/connectors' // [!code hl]

export const wagmiConfig = createConfig({
chains: [tempo],
Expand All @@ -110,7 +110,7 @@ export const wagmiConfig = createConfig({
```tsx twoslash [Domain-bound Passkeys]
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi' // [!code hl]
import { webAuthn } from 'wagmi/tempo' // [!code hl]

export const wagmiConfig = createConfig({
chains: [tempo],
Expand Down
14 changes: 7 additions & 7 deletions src/pages/accounts/wagmi/tempoWallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Creates a Wagmi connector backed by the Tempo Wallet dialog adapter.
```ts
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand All @@ -39,7 +39,7 @@ import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { parseUnits } from 'viem'
import { Expiry } from 'accounts'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -69,7 +69,7 @@ Dialog to use for the embed app.
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { Dialog } from 'accounts'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand All @@ -96,7 +96,7 @@ Fee payer configuration for interacting with a service running [`Handler.relay`]
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand All @@ -119,7 +119,7 @@ URL of the embed app.
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand All @@ -142,7 +142,7 @@ Enable [Machine Payment Protocol](https://mpp.dev) support.
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand All @@ -165,7 +165,7 @@ Use testnet. When `true`, the default chain will be the first testnet chain in `
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down
14 changes: 7 additions & 7 deletions src/pages/accounts/wagmi/webAuthn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Creates a Wagmi connector backed by the WebAuthn adapter.
```ts
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -45,7 +45,7 @@ Cannot be used with `ceremony`.
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand All @@ -70,7 +70,7 @@ import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { parseUnits } from 'viem'
import { Expiry } from 'accounts'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -109,7 +109,7 @@ Cannot be used with `authUrl`.
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { WebAuthnCeremony } from 'accounts'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand All @@ -136,7 +136,7 @@ Fee payer configuration for interacting with a service running [`Handler.relay`]
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand All @@ -160,7 +160,7 @@ Enable [Machine Payment Protocol](https://mpp.dev) support.
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand All @@ -184,7 +184,7 @@ Use testnet. When `true`, the default chain will be the first testnet chain in `
```ts twoslash
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { webAuthn } from 'accounts/wagmi'
import { webAuthn } from 'wagmi/tempo'

export const config = createConfig({
chains: [tempo],
Expand Down
4 changes: 2 additions & 2 deletions src/pages/guide/_template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function Component() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -76,7 +76,7 @@ export function Component() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down
8 changes: 4 additions & 4 deletions src/pages/guide/issuance/create-a-stablecoin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function AddFunds() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -131,7 +131,7 @@ export function CreateStablecoin() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -197,7 +197,7 @@ export function CreateStablecoin() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -263,7 +263,7 @@ export function CreateStablecoin() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down
6 changes: 3 additions & 3 deletions src/pages/guide/issuance/distribute-rewards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function OptInToRewards() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -143,7 +143,7 @@ export function StartReward() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down Expand Up @@ -194,7 +194,7 @@ export function ClaimReward() {
// @noErrors
import { createConfig, http } from 'wagmi'
import { tempo } from 'viem/chains'
import { tempoWallet } from 'accounts/wagmi'
import { tempoWallet } from 'wagmi/connectors'

export const config = createConfig({
chains: [tempo],
Expand Down
Loading
Loading