bridge
Cross-chain token transfers using Wormhole and CCTP
What this skill does
# Bridge - Complete API Reference
Transfer tokens across chains using Wormhole and Circle CCTP protocols.
## Supported Chains
| Chain | Wormhole | CCTP (USDC) |
|-------|----------|-------------|
| Solana | Yes | Yes |
| Ethereum | Yes | Yes |
| Polygon | Yes | Yes |
| Arbitrum | Yes | Yes |
| Optimism | Yes | Yes |
| Avalanche | Yes | Yes |
| Base | Yes | Yes |
---
## Chat Commands
### Quote
```
/bridge quote 100 USDC sol to eth # Quote 100 USDC Solana → Ethereum
/bridge quote 1000 USDC arb to base # Quote Arbitrum → Base
/bridge quote 50 USDC eth to sol # Quote Ethereum → Solana
```
### Execute Transfer
```
/bridge send 100 USDC sol to eth # Send 100 USDC Solana → Ethereum
/bridge send 1000 USDC arb to base # Send Arbitrum → Base
/bridge send 50 USDC eth to sol --address <dest> # To specific address
```
### Redeem (Claim)
```
/bridge redeem <tx-hash> # Claim transferred tokens
/bridge pending # List pending redemptions
```
### Status
```
/bridge status <tx-hash> # Check transfer status
/bridge history # View transfer history
```
---
## TypeScript API Reference
### Wormhole Bridge
```typescript
import { executeWormholeBridge, executeWormholeRedeem } from 'clodds/bridge/wormhole';
// Get quote
const quote = await getWormholeQuote({
sourceChain: 'solana',
destChain: 'ethereum',
token: 'USDC',
amount: 100,
});
console.log(`Transfer 100 USDC: Solana → Ethereum`);
console.log(`Fee: $${quote.fee}`);
console.log(`Est. time: ${quote.estimatedTime} seconds`);
// Execute transfer
const transfer = await executeWormholeBridge({
sourceChain: 'solana',
destChain: 'ethereum',
token: 'USDC',
amount: 100,
// Source wallet
sourcePrivateKey: process.env.SOLANA_PRIVATE_KEY,
// Destination address (optional, defaults to your address)
destAddress: '0x1234...',
});
console.log(`Transfer initiated: ${transfer.txHash}`);
console.log(`VAA: ${transfer.vaa}`);
console.log(`Status: ${transfer.status}`);
// Redeem on destination chain
const redeem = await executeWormholeRedeem({
destChain: 'ethereum',
vaa: transfer.vaa,
destPrivateKey: process.env.EVM_PRIVATE_KEY,
});
console.log(`Redeemed: ${redeem.txHash}`);
console.log(`Amount received: ${redeem.amount} USDC`);
```
### CCTP (Circle) Bridge
```typescript
import { executeCCTPBridge, redeemCCTP } from 'clodds/bridge/cctp';
// CCTP is optimized for USDC transfers
const transfer = await executeCCTPBridge({
sourceChain: 'arbitrum',
destChain: 'base',
amount: 1000, // USDC
sourcePrivateKey: process.env.EVM_PRIVATE_KEY,
destAddress: '0x1234...',
});
console.log(`CCTP transfer: ${transfer.txHash}`);
console.log(`Message: ${transfer.messageHash}`);
// Wait for attestation (usually ~15 minutes)
await waitForAttestation(transfer.messageHash);
// Redeem
const redeem = await redeemCCTP({
destChain: 'base',
messageHash: transfer.messageHash,
destPrivateKey: process.env.EVM_PRIVATE_KEY,
});
```
### Check Status
```typescript
import { getTransferStatus } from 'clodds/bridge';
const status = await getTransferStatus(txHash);
console.log(`Status: ${status.status}`);
// 'pending' | 'confirming' | 'attesting' | 'redeemable' | 'completed' | 'failed'
console.log(`Source confirmations: ${status.sourceConfirmations}`);
console.log(`VAA status: ${status.vaaStatus}`);
console.log(`Redeemed: ${status.redeemed}`);
if (status.status === 'redeemable') {
console.log(`Ready to redeem! VAA: ${status.vaa}`);
}
```
### Get Pending Redemptions
```typescript
import { getPendingRedemptions } from 'clodds/bridge';
const pending = await getPendingRedemptions({
chains: ['ethereum', 'solana', 'arbitrum'],
address: myAddress,
});
for (const p of pending) {
console.log(`${p.sourceChain} → ${p.destChain}`);
console.log(` Amount: ${p.amount} ${p.token}`);
console.log(` Status: ${p.status}`);
console.log(` Age: ${p.age} minutes`);
}
```
---
## Transfer Flow
### Wormhole
1. **Lock tokens** on source chain
2. **Wait for confirmations** (varies by chain)
3. **Guardian attestation** (VAA generation)
4. **Redeem** on destination chain
### CCTP
1. **Burn USDC** on source chain
2. **Wait for attestation** (~15 min)
3. **Mint USDC** on destination chain
---
## Fees & Times
| Route | Fee | Time |
|-------|-----|------|
| Solana → Ethereum | ~$5 | 15-20 min |
| Ethereum → Solana | ~$20 | 15-20 min |
| Arbitrum → Base (CCTP) | ~$0.50 | 15-20 min |
| Polygon → Arbitrum | ~$1 | 15-20 min |
---
## Best Practices
1. **Use CCTP for USDC** - Faster and cheaper
2. **Check gas prices** - High gas can increase costs
3. **Save VAA/message hash** - Needed for redemption
4. **Monitor pending transfers** - Don't forget to redeem
5. **Start with small amounts** - Test before large transfers
6. **Verify destination address** - Double-check before sending
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.