Documentation Index
Fetch the complete documentation index at: https://docs.myaza.co/llms.txt
Use this file to discover all available pages before exploring further.
The Myaza bridge lets you move tokens between supported chains in a single API call. Under the hood it uses the Wormhole protocol.
When to Use the Bridge
- A customer pays on Solana but your treasury is on Polygon
- You need to consolidate funds from multiple chains
- You want to move liquidity between chains for operational reasons
Bridge Flow
1. GET /bridge/chains ← confirm both chains are supported
2. POST /bridge/transfer ← initiate the bridge
3. GET /bridge/transfer/{id} ← poll until status = "completed"
Example: Ethereum → Solana
const MYAZA_API = "https://secureapi.gridlog.io/api/v1";
const headers = {
"X-API-Key": process.env.MYAZA_API_KEY,
"Content-Type": "application/json",
};
async function bridgeToSolana(amount) {
// Step 1: Start the bridge transfer
const transfer = await fetch(`${MYAZA_API}/bridge/transfer`, {
method: "POST",
headers,
body: JSON.stringify({
fromChain: "ethereum",
toChain: "solana",
tokenSymbol: "USDC",
amount,
fromAddress: process.env.ETH_WALLET_ADDRESS,
fromPrivateKey: decrypt(process.env.ETH_WALLET_KEY),
toAddress: process.env.SOL_WALLET_ADDRESS,
}),
}).then((r) => r.json());
console.log("Bridge initiated:", transfer.transferId);
// Step 2: Poll until complete (typically 15-30 min)
return pollBridgeStatus(transfer.transferId);
}
async function pollBridgeStatus(transferId) {
while (true) {
const status = await fetch(`${MYAZA_API}/bridge/transfer/${transferId}`, {
headers: { "X-API-Key": process.env.MYAZA_API_KEY },
}).then((r) => r.json());
console.log("Bridge status:", status.status);
if (status.status === "completed") {
console.log("Bridge complete! Destination tx:", status.destinationTxHash);
return status;
}
if (status.status === "failed") {
throw new Error(`Bridge failed for transfer ${transferId}`);
}
// Wait 60 seconds between checks
await new Promise((resolve) => setTimeout(resolve, 60_000));
}
}
Supported Token Routes
| Token | From | To |
|---|
| USDC | ethereum, polygon, solana, base | ethereum, polygon, solana, base |
| USDT | ethereum, polygon | ethereum, polygon |
| ETH | ethereum | polygon, base, arbitrum |
Bridge routes are subject to Wormhole liquidity availability. Always check
Get Supported Chains before initiating a
transfer.
Fees
Bridge transfers incur:
- Source chain gas fee (paid in native token)
- Wormhole protocol fee (varies by route)
- Destination chain gas fee (for the VAA redemption)
The API does not currently expose a bridge fee estimate endpoint — check the Wormhole docs for indicative costs.