Resources
Error Codes
| Code | Name | Description |
|---|---|---|
200 |
OK | Request successful |
402 |
Payment Required | Missing or invalid x402 payment header |
413 |
Payload Too Large | Code exceeds 100KB limit |
429 |
Too Many Requests | Rate limit exceeded (100 req/min) |
500 |
Server Error | Internal error, refund may be eligible |
Refunds
If you receive a 500 error due to infrastructure failure, you may be eligible for a refund. Contact support with your job ID.
Smart Contract
All attestations are recorded on Base Sepolia:
Contract Details
Network: Base Sepolia
Address: 0x3Faff789460Bf79db94b0034AF7dd779C81e6BA9
Standard: ERC-8004
Explorer: basescan.org
View Attestations
You can query attestations directly from the contract:
Solidity Interface
function getVerifierStats(address verifier)
external view
returns (
uint256 total,
uint256 successful,
uint256 firstAttestation,
uint256 lastAttestation
);
function getLatestAttestation(bytes32 taskHash)
external view
returns (Attestation memory);
Code Examples
Calculate Task Hash (Node.js)
JavaScript
const crypto = require('crypto');
const taskData = JSON.stringify({
taskType: 'code-execution',
code: 'console.log(2 + 2)',
expectedHash: '8e9075af...',
inputData: { expectedOutput: '4' }
});
const hash = crypto
.createHash('sha256')
.update(taskData)
.digest('hex');
console.log('Task hash:', hash);
Send Payment (viem)
TypeScript
import { createWalletClient, http, parseEther } from 'viem';
import { baseSepolia } from 'viem/chains';
const tx = await walletClient.sendTransaction({
to: '0x75E95F6Dfb96d1aF22E2eEaAb3044cDa42b88562',
value: parseEther('0.001')
});
// Use tx hash as X-402-Payment header
console.log('Payment:', tx);
Verify Response (Python)
Python
import requests
headers = {
'Content-Type': 'application/json',
'X-402-Payment': '0x...'
}
data = {
'taskType': 'code-execution',
'code': 'print(2 + 2)',
'expectedHash': '...'
}
response = requests.post(
'https://api.workproof.run/verify',
headers=headers,
json=data
)
result = response.json()
print(f"Result: {result['result']}")
print(f"Attestation: {result['registryTxHash']}")
External Links
Base Sepolia Explorer
View the ValidationRegistry contract and all attestations on-chain.
View on BaseScan →