celer.network DOCS
  • Ultimate Guide to Cross-Chain Asset Transfers and cBridge by Celer Network
  • ✋Welcome to cBridge
  • SGN and cBridge
  • State Guardian Network
  • Architectural Benefits
  • cBridge Security
  • Fungible Token Bridging Models
  • Cross-chain Transfer
  • LP Guide
  • SGN V2 Staking Guide
  • Ape Chain Bridging Guide
  • SGN V1 Unbonding Guide
  • Smart Contract as LP
  • Aptos Bridging Guide
  • cBridge SDK
  • cBridge Pool-Based Transfer (xLiquidity)
  • Flow Bridging Guide
  • cBridge Transfer Web Widget
  • Circle Cross-chain USDC Transfer Protocol(CCTP)
  • cBridge Aptos Transfer (xAsset Only)
  • Custom Transfer URL Schemes
  • cBridge Canonical Mapping Transfer (xAsset)
Powered by GitBook
On this page

cBridge Transfer Web Widget

To make widget integration simple, we provide complete source files which support cBridge transfer.

  1. Compare package.json with your own package.json and inject all needed dependencies

  2. Put files from public, scripts and src folder inside your project where is easy to manage.

  3. Inside the src folder, there is a cBridgeTransferWidget.tsx file. You may import it wherever you want to put and use CBridgeTransferWidget as an element inside your web project.

  4. Copy .env.test to .env. cBridge transfer widget uses values inside .env. If .env is missing or mis-configured, interface error alert will appear.

Run Sample

To give a quick experience about cBridge transfer widget, we create a sample index.js and App.js inside the src file folder.

  1. run npm install or yarn install inside cBridget transfer widget root folder on console

  2. run cp .env.test .env on console (Don't skip, otherwise you will see interface error)

  3. run npm start or yarn start

Import cBridgeTransferWidget

/// Adjust import path according to your project
import { Provider } from "react-redux";
import store from "./redux/store";
import CBridgeTransferWidget from './cBridgeTransferWidget';

/// Put following code where you need
<div>
   <Provider store={store}>
      <CBridgeTransferWidget />
   </Provider> 
</div>

Launch Production Environment

Last updated 2 years ago

PreviousFlow Bridging GuideNextCircle Cross-chain USDC Transfer Protocol(CCTP)

Once your project with transfer widget is ready for production launch, you need to contact us for production chain and token white list which is pre-defined . According to your project requirement, you will have a specific white list. Once you replace existing chains_mainnet.ts with this special white list and copy .env.mainnet to .env, you can do some test on production environment and prepare for production launch.

NextcBridge Aptos Transfer (xAsset Only)

here
PreviousBurn Refund