@routexcc/chain-polygon
v1.0.3
Published
Polygon chain adapter for Routex
Maintainers
Readme
@routexcc/chain-polygon
Polygon chain adapter for Routex — the multi-chain settlement cost router for the x402 payment protocol.
Install
npm install @routexcc/core @routexcc/chain-polygonUsage
import { createPolygonAdapter } from '@routexcc/chain-polygon';
import { createPublicClient, http } from 'viem';
import { polygon } from 'viem/chains';
const client = createPublicClient({
chain: polygon,
transport: http('https://polygon-mainnet.g.alchemy.com/v2/YOUR_KEY'),
});
const adapter = createPolygonAdapter(client);Details
- Technology: viem (EVM), shares
EvmAdapterbase class with@routexcc/chain-base - Finality: ~2000ms
- Chain IDs: 137 (mainnet), 80002 (Amoy testnet)
- Signing: EIP-712 typed data with chain-specific domain separator
Exports
createPolygonAdapter(client, options?)— factory function- Re-exports
EvmAdapterfrom@routexcc/chain-base
Non-Custodial
The adapter calls signer.sign() or signer.signTypedData() to construct payment payloads. It never accesses .privateKey, .secretKey, or .mnemonic.
Documentation
See the full documentation for routing strategies, configuration, and security model.
License
MIT
