LogoLogo
  • JuliaOS Documentation Hub
  • About JuliaOS
    • Mission & Vision
    • Features and Capabilities
    • Roadmap
    • Tokenomics
  • Ecosystem
    • Overview
  • Partners
    • Heurist
    • Fetch.ai
    • Soulgraph
    • cheqd.io
    • Aethir
    • Anyone
    • TensorLabs
    • Hashpower
  • Technology
    • Overview
    • Open Source
      • Modular Framework
      • CLI Mode
    • AI Platform
      • Dashboard
      • Agent Management
      • Swarm Management
      • Marketplace
      • Mining
    • LLM
    • Launchpad
    • Robotics & IOT
      • SwarmIOT
      • Modular AI with Robotics
        • J3OS MiniLLM
          • 🔧 Use Cases
  • Technical
    • Overview
    • Developer Hub
      • Getting Started
        • Installation Guide
          • Github Guide
        • Basic Concepts
        • Quick Start Guide
          • Handling secrets
        • Examples and Use
          • Example: Using the Trading Functionality
          • Example: Using the Benchmarking Feature
          • Example: Multi-Agent Swarm Coordination
          • Example: Using the Python Wrapper for LLM Integration
          • Example: Using Cross-Chain Bridges
          • Example: Creating and Running a Swarm Optimization
          • Page 4
      • Best Practices
        • Performance Tuning
        • Agent/Swarm Design Patterns
        • Best Practices & Patterns
        • Security Best Practices
      • CLI
        • JuliaOS CLI Interface
        • Agent Management (CLI)
        • CLI Configuration
        • Cross-Chain Hub (CLI)
        • Swarm Management (CLI)
        • CLI Troubleshooting
        • Wallet Management (CLI)
      • Framework SDK
        • Modules
          • Bridge
          • Agents Module
          • Dex
          • Swarms Module
          • Wallet
        • Python Wrapper
          • LangChain Integration
          • Python Wrapper
      • Contributing Guide
      • Extending JuliaOS
      • Development Setup & Conventions
      • Testing & Debugging
      • Troubleshooting
    • Architecture
      • High Level JuliaOS
      • CLI <-> Backend Communication
      • Data Storage Architecture
      • Framework Internals
      • Architecture Deep Dive
        • Architectual Notes
    • Concepts
      • Core Features & Concepts
      • Agents
        • Agent Skills & Specializations
      • Swarms
      • Neural Networks
      • Blockchains & Chains
      • Bridges (Cross-Chain)
      • Integrations
        • Google ADK
        • LLMs
        • Price Feed
        • DEX Integration
      • Storage
      • Trading Capabilities
      • Use Cases
      • Wallets
      • Portfolio Optimization
  • Research
    • JuliaOS Research
  • API Documentation
    • API Reference
      • API Reference: Julia Backend Commands
      • API Reference: CLI Commands
      • API Reference: Node.js API
      • API Reference: Python API
      • API Reference
  • Community
    • Community & Support
  • FAQ
    • General
    • Technical
    • Community
Powered by GitBook
On this page
  • Bridges (Cross-Chain)
  • Concept
  • Supported Bridges in JuliaOS
  • How it Works in JuliaOS
  • Using Bridges
Export as PDF
  1. Technical
  2. Developer Hub
  3. Framework SDK
  4. Modules

Bridge

// This is a duplicate of features/bridges.md. Please keep only one copy in the future.

Bridges (Cross-Chain)

JuliaOS provides modules for facilitating communication and asset transfers between different blockchain networks. This is crucial for agents or strategies that operate across multiple ecosystems (e.g., arbitrage between Ethereum and Solana).

Concept

A cross-chain bridge allows users or applications to lock an asset on one chain and receive a representation of that asset (a wrapped token) or a different asset on another chain. This typically involves:

  • Source Chain Contract: Where the original asset is locked or burned.

  • Target Chain Contract: Where the wrapped asset is minted or the corresponding asset is released.

  • Messaging/Verification Layer: A mechanism to securely communicate the lock/burn event from the source chain to the target chain (e.g., relayers, oracle networks, light clients, guardian networks like Wormhole's).

Supported Bridges in JuliaOS

JuliaOS integrates with specific bridge protocols, primarily handled by the Node.js/TypeScript packages in /packages/bridges/:

  • Relay Bridge:

    • A custom-built bridge likely relying on a centralized or semi-centralized relayer service.

    • Monitors events on source/target chains and submits corresponding transactions.

    • Currently supports Base Sepolia and Solana (as per README).

    • Pros: Simpler implementation, potentially faster for specific chain pairs.

    • Cons: Relies on the relayer's availability and security; less decentralized.

    • Use Case: Testing, development, specific trusted environments.

  • Wormhole Bridge:

    • Integrates with the established Wormhole protocol.

    • Uses a network of Guardians to observe events and produce signed attestations (VAAs - Verified Action Approvals).

    • Supports a wide range of chains (Ethereum, Solana, BSC, Polygon, Avalanche, Arbitrum, Optimism, Base, Fantom, etc.).

    • Pros: High security (VAA verification), wide chain support, decentralized guardian network.

    • Cons: More complex flow (requires fetching VAA, submitting it on target chain), potentially higher latency than a direct relay.

    • Use Case: Production applications requiring robust security and broad interoperability.

How it Works in JuliaOS

  1. Initiation: A user (via CLI) or application (via JS/TS/Python API) requests a cross-chain transfer, specifying source/target chains, token, amount, and addresses.

  2. Backend Call: The request is typically routed to the Julia backend via the Bridge.jl module (e.g., bridges.wormhole.transfer command).

  3. Bridge Package Execution: The Julia backend likely delegates the core bridge logic to the corresponding Node.js package (@juliaos/bridges/wormhole or @juliaos/bridges/relay - assumed names).

    • The Node.js package interacts with the source chain contract to lock/burn assets.

    • It then waits for the necessary confirmation/attestation (e.g., waits for relayer action, or waits for Wormhole VAA).

    • For Wormhole, it may provide functions to fetch the VAA.

  4. Completion:

    • Relay: The relayer submits the transaction on the target chain.

    • Wormhole: The user/application needs to fetch the VAA (using a bridge function) and submit it to the Wormhole contract on the target chain to release/mint assets.

  5. Status Tracking: Functions are provided to check the status of the transfer (e.g., getStatus, getVAA).

Using Bridges

  • CLI: The Cross-Chain (CLI) guide details user interaction.

  • Programmatic (JS/TS): Use the specific bridge classes (RelayBridge, WormholeBridge) from the @juliaos/bridges package. See Node.js API.

  • Programmatic (Python): Functionality might be exposed via the JuliaOS client, potentially calling backend bridge commands.

See also: Adding New Bridges

PreviousModulesNextAgents Module