Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
name: E2E Tests (${{ matrix.shard }}/${{ strategy.job-total }})
runs-on: ubuntu-latest
timeout-minutes: 15
continue-on-error: true
permissions:
contents: read
strategy:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"tempo.ts": "^0.14.0",
"unplugin-auto-import": "^21.0.0",
"unplugin-icons": "^23.0.1",
"viem": "^2.44.4",
"viem": "^2.47.5",
"vocs": "https://pkg.pr.new/vocs@8b55a2c",
"wagmi": "3.4.1",
"wagmi": "^3.5.0",
"waku": "1.0.0-alpha.4",
"zod": "^4.3.5"
},
Expand Down
5 changes: 4 additions & 1 deletion src/snippets/tempo-tx-properties.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,10 @@ transactions thereafter can be signed by the access key.
})

// 3. Sign over key authorization with account.
const keyAuthorization = await account.signKeyAuthorization(accessKey)
const keyAuthorization = await client.accessKey.signAuthorization({
account,
accessKey,
})

// 4. Attach key authorization to (next) transaction.
const receipt = await client.sendTransactionSync({
Expand Down
18 changes: 10 additions & 8 deletions src/wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import { KeyManager, webAuthn } from 'wagmi/tempo'

const feeToken = '0x20c0000000000000000000000000000000000001'

const chain =
import.meta.env.VITE_TEMPO_ENV === 'localnet'
? tempoLocalnet.extend({ feeToken })
: import.meta.env.VITE_TEMPO_ENV === 'devnet'
? tempoDevnet.extend({ feeToken })
: tempoModerato.extend({ feeToken })

const rpId = (() => {
const hostname = globalThis.location?.hostname
if (!hostname) return undefined
Expand All @@ -19,16 +26,11 @@ export function getConfig(options: getConfig.Options = {}) {
batch: {
multicall: false,
},
chains: [
import.meta.env.VITE_TEMPO_ENV === 'localnet'
? tempoLocalnet.extend({ feeToken })
: import.meta.env.VITE_TEMPO_ENV === 'devnet'
? tempoDevnet.extend({ feeToken })
: tempoModerato.extend({ feeToken }),
],
chains: [chain],
connectors: [
webAuthn({
grantAccessKey: true,
// chainId is needed for key authorization signing since the node enforces chain_id != 0
grantAccessKey: { chainId: BigInt(chain.id) } as any,
keyManager: KeyManager.http('https://keys.tempo.xyz'),
rpId,
}),
Expand Down
Loading