Polymer API v2.0
We're introducing Prove API v2 with a new proof generation system and standardized proof type naming.
π§ New v2 API Endpointβ
Base URL: https://api.polymer.zone/v2/
The v2 endpoint uses our next-generation proof generation system with improved performance and reliability.
| Endpoint | v1 Proof Type | v2 Proof Type |
|---|---|---|
| EVM proof requests | evm_v1 | evm_v2 |
| Solana proof requests | svm_v1 | svm_v2 |
Standardized Proof Type Namingβ
We've standardized proof type identifiers across all API versions:
| Name | Description |
|---|---|
evm_v1 | EVM event proofs (v1 generation) |
svm_v1 | Solana event proofs (v1 generation) |
evm_v2 | EVM event proofs (v2 generation) |
svm_v2 | Solana event proofs (v2 generation) |
Enhanced Response Formatβ
v2 responses include a proofType field indicating which proof generation version was used:
{
"status": "complete",
"jobID": 12345,
"proofType": "evm_v2",
"proof": "0x...",
"proofRequest": { ... },
"createdAt": 1708300800,
"updatedAt": 1708300801
}
β οΈ Breaking Changesβ
V2 Proofs Require V2 Contractsβ
V2 proofs (evm_v2, svm_v2) are only compatible with the new V2 prover contracts. They will not work with V1 contracts. If you are using V1 contracts, continue using the /v1/ endpoint which generates V1 proofs.
| Proof Type | Compatible Contracts |
|---|---|
evm_v1, svm_v1 | V1 Prover Contracts |
evm_v2, svm_v2 | V2 Prover Contracts only |
Removed: Receipt Index / Log Index Request Formatβ
Support for the legacy request format using receiptIndex and logIndex has been removed. All EVM proof requests must now use globalLogIndex:
// β No longer supported
{
"srcChainId": 10,
"srcBlockNumber": 123456,
"receiptIndex": 0,
"logIndex": 2
}
// β
Use globalLogIndex instead
{
"srcChainId": 10,
"srcBlockNumber": 123456,
"globalLogIndex": 5
}
The globalLogIndex is the absolute index of the log within the entire block, not relative to a specific transaction receipt.
π οΈ Migration Guideβ
For Existing Usersβ
- v0/v1 endpoints continue to work unchanged - no migration required
- v0/v1 requests automatically use
evm_v1orsvm_v1proof types - Legacy proof type names (
log,global_log,solana) are mapped to new names internally - If you were using
receiptIndex/logIndex, you must migrate toglobalLogIndex
For New Integrationsβ
Use the v2 endpoint to take advantage of the latest proof generation:
const response = await fetch('https://api.polymer.zone/v2/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: "2.0",
method: "prove_request",
params: [{ srcChainId: 10, srcBlockNumber: 123456, globalLogIndex: 0 }]
})
});
Polymer API v1.0
We're excited to announce major enhancements to Polymer's proving infrastructure that deliver sub-second proof latencies and introduce automated transaction execution capabilities.
π§ API Method Updates & Versioningβ
New v1 API Endpointsβ
We've introduced proper API versioning with improved method naming and enhanced functionality:
Base URL: https://api.polymer.zone/v1/
| Legacy (v0) | New (v1) | Purpose |
|---|---|---|
polymer_requestProof | prove_request | Request proof generation |
polymer_queryProof | prove_query | Query proof status |
| New | execute_request | Automated execution |
| New | execute_query | Query execution status |
Enhanced Response Formatβ
v1 responses now include the original proofRequest object for better traceability and debugging, making integration more developer-friendly.
Migration Note: Legacy v0 endpoints remain fully supported during the transition period.
β‘ Dramatic Latency Improvementsβ
We've completely overhauled our backend infrastructure and optimized interactions with the Polymer chain:
- Enhanced API Backend:Β Streamlined interactions between API Backend and Polymer chain.
- Upgraded Cosmos SDK: Latest SDK version enables significantly faster block times
Performance Gainsβ
| Metric | Previous | New | Improvement |
|---|---|---|---|
| Block Time | 2 seconds | 100ms | 20x faster |
| Proof Generation | 4-5 seconds | < 1 second | 5x faster |
| API Response | Variable | Consistent sub-second | Predictable performance |
Result: Proof requests that previously took 4-5 seconds now complete in under 1 second.
π― Execute API (Beta Release)β
Based on strong developer demand for simplified and automated transaction submission, we're beta-releasing our Execute API that combines proof generation with automated on-chain execution.
Key Capabilitiesβ
- Ultra-Fast Submission: Transactions land on destination chains in under 300ms
- Universal Compatibility: Any EVM chain, any contract (non-EVM support coming soon)
- Integrated Workflow: Proof generation + execution in a single API call
- End-to-End Speed: Complete cross-chain execution in 1-1.5 seconds
Workflow Comparisonβ
// Traditional Approach: ~10+ seconds
1. Request proof (4-5s)
2. Poll for completion
3. Manual transaction submission (5-10s)
// New Execute API: ~1.5 seconds
1. execute_request (includes proof + transaction)
2. execute_query (poll until complete)
Why This Mattersβ
This represents a massive leap forward compared to traditional cross-chain systems:
- Traditional bridges: ~2 minutes
- Existing solutions: 30+ seconds
- Polymer Execute API: 1-1.5 seconds end-to-end
π οΈ Getting Startedβ
For Existing Usersβ
Continue using v0 endpoints - no immediate changes required, youβll see all the benefits of proof latency. We recommend migrating to v1 for enhanced features like execute API.
For New Integrationsβ
Start with v1 endpoints for the best experience:
// Proof-only workflow
const response = await fetch('https://api.polymer.zone/v1/', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: "2.0",
method: "prove_request",
params: [{ srcChainId: 10, srcBlockNumber: 123456, globalLogIndex: 0 }]
})
});
// Proof + Execute workflow (Beta)
const executeResponse = await fetch('https://api.polymer.zone/v1/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: "2.0",
method: "execute_request",
params: [executeEnvelope] // Proof + execution parameters
})
});