One command for Claude Code, Cursor, Codex, Windsurf and other agents — installs from the upstream repo (current HEAD; it ships 5 skills — pick debridge-signing when prompted).
Drop the mirrored SKILL.md into your skills directory. Global (all projects):
Or scoped to the current project:
This skill references companion files (9) that stay on GitHub — links in the mirror point there, pinned to the indexed commit. For the full offline bundle use the CLI or Git tab.
The skill is mirrored as plain markdown — tell your agent:
Or have the skills CLI generate a one-shot prompt (pipe it straight into your agent):
Or pull the raw file into a terminal session:
Copy the skill directory with all companion files straight from GitHub:
Skill contents
Transaction Signing
PREREQUISITE: Read ../common/SKILL.md for environment detection, auth, and chain configuration.
Quick Reference
| Want to… | Go to |
|---|---|
| Sign with OWS (recommended) | ows-signing.md |
| Sign with ethers.js or viem | sdk-signer.md |
| Sign with Foundry cast | foundry-cast.md |
| Sign with MetaMask / browser | metamask.md |
| Sign via Privy MCP | privy-mcp.md |
| Set up a wallet from scratch | ../wallets/SKILL.md |
What Needs Signing
deBridge transactions from mcp__debridge__create_tx (cross-chain) or mcp__debridge__transaction_same_chain_swap (same-chain) return up to two transaction objects to sign:
- Token approval tx (if allowance insufficient) — a standard EVM transaction calling
approve()on the token contract. - Bridge/swap tx — an EVM transaction that may include EIP-712 typed data for DLN order creation.
Both are standard {to, data, value, chainId} objects. Sign and broadcast to the source chain RPC.
Signer Routing
Use the Signer value from WALLET_DISCOVERY to select the right reference:
| Signer value | Environment | Read this file |
|---|---|---|
| ows | CLI | ows-signing.md |
| env-privkey | CLI + Node.js | sdk-signer.md |
| env-privkey | CLI + cast | foundry-cast.md |
| foundry-cast | CLI | foundry-cast.md |
| browser-wallet | Browser | metamask.md |
| ethers-viem | CLI / Headless | sdk-signer.md |
| mcp-wallet | Any | privy-mcp.md |
| none | Any | ../wallets/SKILL.md — set up first |
Resolving env-privkey
When Signer = env-privkey, a private key exists but a signing library is still needed. Pick based on what is available:
- Node.js + ethers or viem installed → sdk-signer.md
castavailable → foundry-cast.md- None of the above → install one:
npm install ethersis the fastest path.
Transaction Flow
After mcp__debridge__create_tx or mcp__debridge__transaction_same_chain_swap returns tx data:
Step 0: Preflight Checks
Before signing, the agent MUST verify:
- Native balance for gas + fixFee — Parse
fixFee(wei) andestimatedTransactionFee.totalfrom the response. Check that the wallet’s native balance on the source chain covers both. If insufficient, stop and tell the user how much more they need. - ERC-20 allowance (EVM only, non-native tokens) — If the response does NOT include
approveTx, the agent MUST still check the token’s allowance for the bridge contract (tx.to). Usescripts/erc20-approve.mjsto check and approve if needed. Do NOT assume the MCP always returnsapproveTx— it may not. - SOL rent/fees (Solana source) — Solana bridge txs require ~0.024 SOL for rent deposits + tx fees, on top of the bridge amount. Check SOL balance before signing.
Step 1: Check for Approval
If the response includes an approval transaction (approveTx):
- Sign and send the approval tx first.
- Wait for confirmation (1 block).
- Proceed to Step 2.
If no approveTx but source token is ERC-20, run scripts/erc20-approve.mjs to check/approve (see Step 0).
Step 2: Sign and Send Bridge Transaction
- Take the main tx object (
txfield fromcreate_txresponse). - Sign with the detected signer.
- Broadcast to the source chain RPC.
- Record the transaction hash.
Step 3: Hand Off to Monitoring (cross-chain only)
For cross-chain bridges, pass the tx hash and order ID to ../swap/monitoring.md for order tracking. Same-chain swaps settle in a single transaction — no monitoring needed.
RPC Endpoints
Most signers need an RPC connection to the source chain:
- OWS: for EVM,
ows sign txhandles signing locally — broadcast via RPC separately; for Solana, setSOLANA_RPC_URLor use the default public RPC - ethers/viem: pass RPC URL to provider constructor
- cast: use
--rpc-urlflag - browser wallet: uses the wallet’s connected RPC
- Privy MCP: handles RPC internally — no RPC URL needed from the agent
Use public RPCs or the user’s configured RPC. Prefer user-provided RPCs or environment variables ($ETH_RPC_URL, $RPC_URL) over hardcoded defaults. The balance query skills include public RPCs as fallback defaults — override them when the user has configured RPCs.
For programmatic RPC discovery from Chainlist, read ../common/rpc-discovery.md.
Common Errors
| Error | Cause | Fix |
|---|---|---|
| Insufficient funds for gas | Wallet has no native token | Fund wallet with ETH/native token on source chain |
| Nonce too low | Pending tx or state mismatch | Wait for pending tx or reset nonce |
| Transaction reverted | Approval not confirmed yet | Wait for approval confirmation before bridge tx |
| Invalid signature | Wrong chain ID in signer | Ensure signer chain ID matches source chain |
References
- ows-signing.md — OWS local self-custody signing (EVM, Solana, Tron)
- sdk-signer.md — ethers.js and viem signing
- foundry-cast.md — Foundry cast CLI signing
- metamask.md — Browser wallet signing
- privy-mcp.md — Privy embedded wallet signing via MCP