For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

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

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

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

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

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

Last updated