Skip to content
Merged
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
3 changes: 1 addition & 2 deletions website/hooks/x402Discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ export async function fetchAgentRegistration(origin: string): Promise<Erc8004Reg
if (!res.ok) return null;
const file = (await res.json()) as { name?: unknown; image?: unknown; registrations?: unknown };
const first = (Array.isArray(file.registrations) ? file.registrations[0] : undefined) as
| { agentId?: unknown; agentRegistry?: unknown }
| undefined;
{ agentId?: unknown; agentRegistry?: unknown } | undefined;
if (typeof first?.agentId !== "number" || typeof first.agentRegistry !== "string") return null;
return {
agentId: first.agentId,
Expand Down
450 changes: 257 additions & 193 deletions website/package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@tanstack/react-query": "^5.107.1",
"@vitejs/plugin-react": "^6.3.0",
"@walletconnect/ethereum-provider": "^2.26.0",
"@x402/evm": "^2.30.0",
"@x402/fetch": "^2.30.0",
"@x402/evm": "^2.31.0",
"@x402/fetch": "^2.31.0",
"highlight.js": "^11.12.0",
"katex": "^0.19.1",
"react": "^19.3.1",
Expand All @@ -52,15 +52,15 @@
"wagmi": "^3.7.11"
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/js": "^9.39.5",
"@openzeppelin/merkle-tree": "^1.0.8",
"@pandacss/dev": "^2.5.0",
"@pandacss/preset-base": "^2.5.0",
"@pandacss/preset-panda": "^2.5.0",
"@resvg/resvg-js": "^2.6.2",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.8",
"@testing-library/user-event": "^14.6.12",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
Expand All @@ -71,13 +71,13 @@
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^17.14.0",
"jsdom": "^31.0.0",
"postcss": "^8.5.32",
"prettier": "^3.6.2",
"jsdom": "^31.0.1",
"postcss": "^8.5.33",
"prettier": "^3.10.1",
"typescript": "^6.0.3",
"typescript-eslint": "^8.71.0",
"typescript-eslint": "^8.73.0",
"vike": "^0.4.270",
"vite": "^8.3.6",
"vite": "^8.3.8",
"vitest": "^5.0.0"
},
"//overrides": "rehype-katex@7.0.1 still declares katex ^0.16.0 and would otherwise install its own nested copy. KaTeX 0.17 prefixed ~20 internal layout classes with `katex-` (.newline -> .katex-newline, plus .base, .strut, .vbox, .rule, ...), so a nested 0.16 renderer emits markup that the 0.18 katex.min.css imported by components/Post.tsx does not style -- silently, and visibly enough to drop every `\\` line break in display math. `$katex` tracks the dependency above, so future bumps stay consistent by construction.",
Expand Down
2 changes: 1 addition & 1 deletion website/quantum/amo/lecture20.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ transitions are used for different purposes:
/>

Several solutions for scaling up the quantum computing architecture are
under way . *Long ion chains* in linear Paul traps with up to 40
under way . _Long ion chains_ in linear Paul traps with up to 40
ions are the current 'work-horse'. This is the 'simplest' existing
architecture. In such a geometry Shors algorithm was [shown for the
number 15](http://dx.doi.org/10.1126/science.aad9480) with five qubits and entanglement between up to
Expand Down
34 changes: 15 additions & 19 deletions website/test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,14 @@ interface MockAccountData {
chainId?: number;
}

export const mockAccountData = vi.fn(
(): MockAccountData => ({
address: "0x123456789abcdef",
isConnected: false,
status: "disconnected",
isConnecting: false,
isDisconnected: true,
isReconnecting: false,
}),
);
export const mockAccountData = vi.fn((): MockAccountData => ({
address: "0x123456789abcdef",
isConnected: false,
status: "disconnected",
isConnecting: false,
isDisconnected: true,
isReconnecting: false,
}));

// Contract Mocks
// Same reasoning as `MockAccountData` above: `.mockReturnValue()` is called with
Expand All @@ -136,15 +134,13 @@ interface MockReadContractData {
refetch: ReturnType<typeof vi.fn>;
}

export const mockReadContractData = vi.fn(
(): MockReadContractData => ({
data: undefined,
error: null,
isPending: false,
isLoading: false,
refetch: vi.fn(),
}),
);
export const mockReadContractData = vi.fn((): MockReadContractData => ({
data: undefined,
error: null,
isPending: false,
isLoading: false,
refetch: vi.fn(),
}));

export const mockWriteContractData = vi.fn(() => ({
writeContract: vi.fn(),
Expand Down
4 changes: 1 addition & 3 deletions website/tools/bundestakt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ interface RawClaimsResponse {
// the model can explain a failure instead of the whole chat message crashing.

export type BundestaktResult =
| { status: "ok"; [key: string]: unknown }
| { status: "not_found" }
| { status: "fetch_failed"; reason: string };
{ status: "ok"; [key: string]: unknown } | { status: "not_found" } | { status: "fetch_failed"; reason: string };

/** Turns a fetch-time error (thrown by `fetchSitzungen`/`fetchClaims`) into a result. */
export { fetchFailed } from "./failure";
Expand Down
5 changes: 1 addition & 4 deletions website/tools/webFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ export const fetchUrlTool: X402Tool = {
* a url that is not an absolute https one, and a proxy response that is not the envelope.
*/
export type FetchToolResult =
| PageResult
| { status: "invalid_url"; url: string; hint: string }
| { status: "invalid_response" }
| PaymentFailure;
PageResult | { status: "invalid_url"; url: string; hint: string } | { status: "invalid_response" } | PaymentFailure;

/** Turns a fetch-time error (thrown by `fetchViaProxy`) into a result. */
export { fetchFailed } from "./failure";
Expand Down
5 changes: 2 additions & 3 deletions website/utils/x402PaidFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,8 @@ export async function createPaidFetch({
// Dynamic, browser-only: keeps the @x402 runtime out of SSR.
const { x402Client, wrapFetchWithPayment, x402HTTPClient } = await import("@x402/fetch");
const { toClientEvmSigner } = await import("@x402/evm");
const { BatchSettlementEvmScheme, readChannelBalanceAndTotalClaimed } = await import(
"@x402/evm/batch-settlement/client"
);
const { BatchSettlementEvmScheme, readChannelBalanceAndTotalClaimed } =
await import("@x402/evm/batch-settlement/client");

// readContract is documented as "optional" on ClientEvmSigner (only "required for extension
// enrichment" per the SDK's own JSDoc), but batch-settlement's corrective-402 recovery
Expand Down