Skip to main content

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.

Endpointv1 Proof Typev2 Proof Type
EVM proof requestsevm_v1evm_v2
Solana proof requestssvm_v1svm_v2

Standardized Proof Type Naming​

We've standardized proof type identifiers across all API versions:

NameDescription
evm_v1EVM event proofs (v1 generation)
svm_v1Solana event proofs (v1 generation)
evm_v2EVM event proofs (v2 generation)
svm_v2Solana 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 TypeCompatible Contracts
evm_v1, svm_v1V1 Prover Contracts
evm_v2, svm_v2V2 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_v1 or svm_v1 proof types
  • Legacy proof type names (log, global_log, solana) are mapped to new names internally
  • If you were using receiptIndex/logIndex, you must migrate to globalLogIndex

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_requestProofprove_requestRequest proof generation
polymer_queryProofprove_queryQuery proof status
Newexecute_requestAutomated execution
Newexecute_queryQuery 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​

MetricPreviousNewImprovement
Block Time2 seconds100ms20x faster
Proof Generation4-5 seconds< 1 second5x faster
API ResponseVariableConsistent sub-secondPredictable 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
})
});