author_pendingExtrinsics - Bridge Hub RPC Method
Get pending extrinsics in the transaction pool on Bridge Hub. Monitor mempool activity, verify transaction submission, and analyze network congestion.
Bridge Hub RPC endpoint: endpoint URLs, plans and pricing.
Returns all pending extrinsics currently in the transaction pool on Bridge Hub. These are signed extrinsics that have been submitted but not yet included in a finalized block.
Why Bridge Hub? Build on Polkadot's trustless bridging parachain with $75M+ TVL via Snowbridge to Ethereum with on-chain BEEFY/Beacon light clients (no multisigs), 100+ ERC-20 tokens supported, 24+ parachain integrations, and 1-2 minute transfer times.
When to Use This Method
author_pendingExtrinsics is essential for cross-chain developers, bridge operators, and teams requiring trustless Ethereum-Polkadot transfers:
- Transaction Confirmation -- Verify whether a submitted extrinsic is still pending or has been included in a block on Bridge Hub
- Mempool Monitoring -- Monitor the transaction pool size and activity for trustless ETH and ERC-20 bridging, cross-chain messaging, and parachain-to-Ethereum asset transfers
- Network Congestion Analysis -- Gauge current network load by inspecting the number and type of pending extrinsics
- Validator Tooling -- Build block authoring tools that inspect the ready queue before producing blocks
Best Practices
- Response can be large on congested networks -- filter by sender address client-side
- Not available on all node configurations (some providers disable author namespace)
- Use for mempool inspection and transaction congestion diagnosis
- Pending extrinsics are not guaranteed to be included -- monitor with confirmation polling
{
"jsonrpc": "2.0",
"method": "author_pendingExtrinsics",
"params": [],
"id": 1
}Code Examples
curl -X POST https://bridge-hub-polkadot-rpc.n.dwellir.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "author_pendingExtrinsics",
"params": [],
"id": 1
}'Common Use Cases
1. Transaction Pool Monitor
Continuously monitor the Bridge Hub transaction pool and alert on unusual activity:
import { ApiPromise, WsProvider } from '@polkadot/api';
async function monitorPool(api, interval = 6000) {
let previousCount = 0;
setInterval(async () => {
const pending = await api.rpc.author.pendingExtrinsics();
const count = pending.length;
if (count !== previousCount) {
console.log(`Pool size changed: ${previousCount} -> ${count}`);
if (count > 100) {
console.warn('High pool activity detected!');
}
}
// Analyze pending extrinsic types
const byPallet = {};
pending.forEach((ext) => {
const key = `${ext.method.section}.${ext.method.method}`;
byPallet[key] = (byPallet[key] || 0) + 1;
});
if (Object.keys(byPallet).length > 0) {
console.log('Pending by type:', byPallet);
}
previousCount = count;
}, interval);
}2. Verify Transaction Submission
Check that a submitted extrinsic appears in the pool:
async function verifyInPool(api, txHash) {
const pending = await api.rpc.author.pendingExtrinsics();
const found = pending.find((ext) => ext.hash.toHex() === txHash);
if (found) {
console.log(`Transaction ${txHash} is in the pool`);
console.log(` Call: ${found.method.section}.${found.method.method}`);
return true;
}
console.log(`Transaction ${txHash} not found in pool (may already be included)`);
return false;
}3. Pool Congestion Analysis
Analyze network congestion to decide on tip amounts:
async function analyzeCongestion(api) {
const pending = await api.rpc.author.pendingExtrinsics();
const tips = pending.map((ext) => ext.tip.toBigInt());
const totalTips = tips.reduce((sum, tip) => sum + tip, 0n);
const avgTip = tips.length > 0 ? totalTips / BigInt(tips.length) : 0n;
const maxTip = tips.length > 0 ? tips.reduce((a, b) => (a > b ? a : b), 0n) : 0n;
return {
poolSize: pending.length,
averageTip: avgTip.toString(),
maxTip: maxTip.toString(),
congested: pending.length > 50
};
}Error Handling
Common errors and solutions:
| Error Code | Description | Solution |
|---|---|---|
| -32603 | Internal error | Node may be starting up -- retry after delay |
| -32005 | Rate limit exceeded | Reduce polling frequency; the pool changes only each block |
| Connection refused | Node unreachable | Verify the RPC endpoint URL and that the node is running |
| Empty array | No pending extrinsics | Normal when the pool is idle -- not an error |
Related Methods
author_submitExtrinsic-- Submit a signed extrinsic to the transaction poolpayment_queryInfo-- Estimate fees for an extrinsic before submissionsystem_chain-- Get the chain namechain_getBlock-- Get a finalized block to see which extrinsics were included
author_submitExtrinsic
Submit a signed extrinsic to Bridge Hub for inclusion in a block. Broadcast transactions for token transfers, staking operations, governance votes, and smart contract calls.
author_submitAndWatchExtrinsic
Submit an extrinsic and subscribe to lifecycle status updates on Bridge Hub. Track transactions from pool admission through finalization with real-time WebSocket events for trustless ETH and ERC-20 bridging, cross-chain messaging, and parachain-to-Ethereum asset transfers.