Knit API Documentation
CPN Troubleshooting
Common issues and solutions when integrating CPN with Knit's Managed Signing API.
"Failed to sign transaction" from Managed Signing
Cause: Transaction is missing required fields (fees, gas, or nonce).
Solution:
- Ensure the transaction includes EIP-1559 fields (
maxFeePerGas,maxPriorityFeePerGas) or legacy fields (gasPrice) - Include
gaslimit - Include
nonce - Verify RPCs are configured for the target network to enable auto-fill
"POLICY_DENIED" Error
Cause: The signing request violates your policy rules.
Solutions:
| Issue | Fix |
|---|---|
| EIP-712 signing blocked | Set typedData.allow: true in your policy |
| Token not allowed | Add the token address to rules.tokens |
| Spender not allowed | Add the Permit2 address to rules.spenders |
| Raw TX blocked | Set allowRawTx: true (for CPN V1 only) |
| Wrong network | Add the network to rules.chains |
"Invalid typed data" Error
Cause: The EIP-712 typed data format is incorrect.
Solution:
- Use Circle's
messageToBeSignedexactly as provided - Do not modify or camelCase keys in
typesormessage - Ensure the JSON is valid (no comments, trailing commas)
Permit2 Approval Transaction Fails
Cause: Insufficient gas or incorrect parameters.
Solutions:
- Ensure wallet has enough native token (MATIC/ETH) for gas
- Verify the USDC token address is correct for your network
- Verify the Permit2 contract address is correct
- Check that the approval amount is valid
Signature Rejected by Circle
Cause: Signature doesn't match expected format or data.
Solutions:
- Verify you're using the exact
messageToBeSignedfrom Circle - Ensure the signing wallet address matches what Circle expects
- Check that the wallet has completed the Permit2 approval
- Verify the network matches (e.g., both on Polygon)
Request Body Validation Errors
Cause: Invalid JSON or missing required fields.
Solutions:
- JSON request bodies must not include comments
- All required fields must be present
- Use correct data types (strings for addresses, numbers for nonce)
- Ensure
walletIdis the local ID from Knit, not an external ID
Network Mismatch
Cause: Using wrong network identifier.
Supported Production Networks:
MATIC_MAINNET(Polygon)ETHEREUM_MAINNETBSC_MAINNETBASE_MAINNET
Supported Testnet Networks (Sandbox/Dev only):
MATIC_AMOY(Polygon Amoy testnet - commonly used for CPN testing)
Do not use ETH_MAINNET - use ETHEREUM_MAINNET instead.
Auto-Fill Not Working
Cause: RPC not configured for the target network.
Solution:
- Contact Knit support to verify RPC configuration
- Alternatively, provide
txOverrideswith manual gas values - For
broadcast: false, you may need to estimate gas externally
Common Contract Addresses
Contact Circle for the official addresses for your integration. These are for reference only:
| Network | Asset | Type | Address |
|---|---|---|---|
| Polygon | USDC | Token | Verify with Circle |
| Polygon | Permit2 | Contract | Verify with Circle |
| Ethereum | USDC | Token | Verify with Circle |
| Ethereum | Permit2 | Contract | Verify with Circle |
Getting Help
If you continue to experience issues:
- Check the audit logs:
GET /api/v1/managed-signing/audit?requestId=<request-id> - Verify your policy configuration:
GET /api/v1/managed-signing/policies/<policy-id> - Contact Knit support with:
- Request ID
- Error message
- Request payload (sanitized)
- Network and wallet address