Cycle Network Docs
  • 🙌Welcome
    • 📖Genesis of Cycle Network
    • 🌀What is Cycle Network
    • 😃Benefits of Cycle Bridgeless
      • 🧑‍🤝‍🧑For End User
      • 👨‍đŸ”ŦFor Developer
  • âš™ī¸Quick Start
    • đŸŦConnect to Cycle
      • Connect to Cycle Mainnet
        • â›ĩCycle Sailboat
      • Connect to Cycle Testnet
        • đŸĒŧCycle JellyFish
        • đŸĻ‘Cycle CuttleFish (Archived)
        • ⭐Cycle StarFish (Archived)
        • đŸ’ĩTestnet Tokens
      • Operator Guideline
    • 🔄Transfer within Cycle
    • 👉How to roll in tokens
    • 👈How to roll out tokens
    • ✋Claim assets on destination chain
  • đŸ› ī¸Technical Introduction
    • Overview
    • Technical Background
      • ZK-Rollup
      • Sequencer
      • Zero-knowledge hardware acceleration
      • Fully Homomorphic Encryption
    • Module Explanation
      • Omni State Channel Indexer (OSCI)
      • Decentralized Aggregate Sequencer
      • Zero-knowledge hardware acceleration
      • Fully Homomorphic Encryption
  • đŸ•šī¸Cycle-CORE-SDK
    • Introduction
    • Getting Started
    • Onchain Transaction
    • Query Service
  • 💡Case Study
    • 🐷Piggy Bank
    • 🎮TapUp
    • â¤ī¸â€đŸ”ĨBridgeless All Chain Trading
    • 🤑Bridgeless All Chain AI Application
  • đŸĸResources
    • Website
    • Medium
    • White Paper
    • GitHub
  • 😇Community and support
    • 📞Contact Us
    • đŸĩTwitter
    • 🤖Telegram
    • 💰Campaign
Powered by GitBook
On this page
  • Bridge Service
  • 1.getBridge
  • 2.getMerkleProof
  • 3.getBridgeByTransaction
  • 4.getBridges
  • 5.getSenderBridges
  • 6.getSenderBridgesNotClaimed
  • 7.getCrossChainBridges
  • 8.getCrossChainBridgeByRollIn
  • 9.batchGetCrossChainBridges
  1. Cycle-CORE-SDK

Query Service

Bridge Service

The BridgeService class provides methods to interact with the Cycle network's bridge functionality, allowing users to manage deposits, claims, and cross-chain transactions.

1.getBridge

Gets a specific bridge deposit.

netId: network_id where the rollup initiated

depositCnt: the nonce of deposit on a certain chain

Standard AxiosResponse

sdk.bridgeService.getBridge(netId: number, depositCnt: string): Promise<AxiosResponse>;

2.getMerkleProof

Retrieves the Merkle proof for a specific deposit.

netId: network_id where the rollup initiated

depositCnt: the nonce of deposit on a certain chain

destNetwork: network_id where corresponding to the rollup destination chain

Standard AxiosResponse

sdk.bridgeService.getMerkleProof(netId: number, depositCnt: string, destNetwork: number): Promise<AxiosResponse>;

3.getBridgeByTransaction

Gets a bridge deposit by its transaction hash.

netId: network_id where the rollup initiated

txHash: the rollup txHash

Standard AxiosResponse

sdk.bridgeService.getBridgeByTransaction(netId: number, txHash: string): Promise<AxiosResponse>;

4.getBridges

Retrieves bridge deposits for a specific user address.

userAddr: the direct caller address of the bridge contract

offset: the start position of rollup list

limit: the return count of rollup

Standard AxiosResponse

sdk.bridgeService.getBridges(userAddr: string, offset: number = 0, limit: number = 10): Promise<AxiosResponse>;

5.getSenderBridges

Retrieves all bridge deposits for a specific sender address.

senderAddr: the sender of the rollup tx

offset: the start position of rollup list

limit: the return count of rollup

Standard AxiosResponse

sdk.bridgeService.getSenderBridges(senderAddr: string, offset: number = 0, limit: number = 10): Promise<AxiosResponse>;

6.getSenderBridgesNotClaimed

Retrieves all bridge deposits to be claimed for a specific sender address.

senderAddr: the sender of the rollup tx

offset: the start position of rollup list

limit: the return count of rollup

Standard AxiosResponse

sdk.bridgeService.getSenderBridgesNotClaimed(senderAddr: string, offset: number = 0, limit: number = 10): Promise<AxiosResponse>;

7.getCrossChainBridges

Gets cross-chain bridge transactions for a specific user address.

rollinTx: the rollin tx on the initiate chain

networkId: the initiate chain network_id

Standard AxiosResponse

sdk.bridgeService.getCrossChainBridges(senderAddr: string, offset: number = 0, limit: number = 10): Promise<AxiosResponse>;

8.getCrossChainBridgeByRollIn

Retrieves a cross-chain bridge transaction by its roll-in transaction hash.

rollinTx: the rollin tx on the initiate chain

networkId: the initiate chain network_id

Standard AxiosResponse

sdk.bridgeService.getCrossChainBridgeByRollIn(rollinTx: string, networkId: number): Promise<AxiosResponse>;

9.batchGetCrossChainBridges

Gets multiple cross-chain bridge transactions in a single batch request.

rollinRequests: the array of the rollin request params you want to query

Standard AxiosResponse

sdk.bridgeService.batchGetCrossChainBridges(rollInRequests: Array<{ rollin_tx: string; network_id: number }>): Promise<AxiosResponse>;
PreviousOnchain TransactionNextPiggy Bank

Last updated 9 months ago

đŸ•šī¸