Rename testClient/main.go into testClient/rest/test-rest-endpoints.go and add
testClient/mcp/test-mcp-endpoints.go which tests the /mcp Streamable HTTP
endpoint via an x402-aware MCP client. Update the test-endpoints workflow to
run the MCP tests first, and decode/print the 402 challenge when a paid REST
retry is rejected.
- testClient/main.go:139: Changed JSON field from 'actor' to 'author' to match GetPostRequest schema
- The handler expects 'author' field, test client was sending 'actor' causing validation error
The test client now registers both 'exact' and 'upto' EVM payment schemes
for the test network (eip155:84532 / Base Sepolia) to match the server's
scheme registration. This allows the x402 HTTP client wrapper to
automatically handle 402 Payment Required responses by selecting and
paying with a supported scheme, then retrying the request.
callEndpoint now returns error for any HTTP status >= 400 except 402,
which is the expected status for payable endpoints. Previously 500
errors were treated as success, masking server errors like
'no scheme server for exact on eip155:84532'.
- testClient: add ensureFundedWallet() with USDC/ETH balance checks and faucet requests
- fund-wallet.sh: update faucet format for Coinbase CDP API
- start-test-server.sh: use Coinbase facilitator URL, add payment endpoint verification
- test-endpoints.yaml: fund test wallet before server, pass RPC/Faucet URLs to test client