API Reference

All APIs will have a prefix to indicate whether it is a cBridge gateway function or a cBridge contract on-chain function.

Get Transfer Configs

Get chains and tokens info supported by cBridge.

pageGateway: GetTransferConfigsForAll

Transfer Flow

When all needed information is ready, make an estimation for this transfer first. Then, submit an on-chain send transaction. Poll getTransferStatus for this transaction until the transfer is complete or needs a refund.

pageGateway: EstimateAmtpageContract: Pool-Based TransferpageGateway: GetTransferStatus

Transfer Refund Flow

When the transfer status is TRANSFER_TO_BE_REFUNDED, cBridge gateway will prepare on-chain refund transaction info automatically within several minutes. Polling getTransferStatus and submit on-chain transaction based on failed transfer type.

pageGateway: GetTransferStatuspageContract: Pool-Based Transfer RefundpageContract: Mint Canonical Token Transfer RefundpageContract: Burn Canonical Token Transfer Refund

Transfer History Query

pageGateway: TransferHistory

Last updated