🌉
Celer cBridge
  • 👋Welcome to cBridge
  • Introduction
    • Architectural Benefits
    • State Guardian Network
    • SGN and cBridge
      • The SGN as a cBridge node gateway and Service Level Agreement (SLA) arbitrator
      • The SGN as a Shared Liquidity Pool Manager
    • Fungible Token Bridging Models
    • cBridge Security
  • Tutorial
    • Cross-chain Transfer
    • LP Guide
    • SGN V2 Staking Guide
    • SGN V1 Unbonding Guide
    • Smart Contract as LP
    • Aptos Bridging Guide
    • Ape Chain Bridging Guide
    • Flow Cadence Bridging Guide
    • Flow EVM Bridging Guide
  • Developer
    • Circle Cross-chain USDC Transfer Protocol(CCTP)
    • cBridge SDK
    • cBridge Pool-Based Transfer (xLiquidity)
      • Transfer
      • Transfer Refund
    • cBridge Canonical Mapping Transfer (xAsset)
      • Mint
      • Mint Refund
      • Burn
      • Burn Refund
    • cBridge Transfer Web Widget
    • cBridge Aptos Transfer (xAsset Only)
    • Custom Transfer URL Schemes
    • cBridge APIs for Sui
    • Referral Specific Transfer
    • cBridge Limit Parameters
    • API Reference
      • Gateway: GetTransferConfigsForAll
      • Gateway: EstimateAmt
      • Contract: Pool-Based Transfer
      • Gateway: GetTransferStatus
      • Contract: Pool-Based Transfer Refund
      • Gateway: TransferHistory
      • Contract: Mint Canonical Token(OriginalTokenVault)
      • Contract: Mint Canonical Token(OriginalTokenVaultV2)
      • Contract: Mint Canonical Token Transfer Refund
      • Contract: Burn Canonical Token(PeggedTokenBridge)
      • Contract: Burn Canonical Token (PeggedTokenBridgeV2)
      • Contract: Burn Canonical Token Transfer Refund
      • Gateway: MarkRefRelation
      • Contract: TransferAgent Mint Token Submission
      • Contract: TransferAgent Burn Token Submission
      • Contract: Aptos Vault Mint Token Submission
      • Contract: Aptos PegBridge Burn Token Submission
  • NFT Bridge
    • Introduction
    • NFT Bridge Fee
  • List Your Tokens
    • Simple Listing Process
  • Reference
    • FAQ
    • Audit Reports
    • Contract Addresses
Powered by GitBook
On this page
  • Rest API
  • Make a reference between transfer transaction with your ref code
  • GRPC-Web API
  • Request Parameters
  • TransferId Generation
  • Response
  1. Developer
  2. API Reference

Gateway: MarkRefRelation

Mark the transfer with your ref code after you submit on-chain transaction successfully.

Rest API

Make a reference between transfer transaction with your ref code

POST https://cbridge-prod2.celer.app/v2/partner/markRefRelation

Path Parameters

Name
Type
Description

transfer_id*

String

on-chain transaction transfer id

ref_id

String

your ref code

GRPC-Web API

// import getTransferConfig request message 
import {
  MarkRefRelationRequest
} from "../ts-proto/sgn/gateway/v1/gateway_pb";

// import grpc-web WebClient
import { 
  WebClient 
} from "../ts-proto/sgn/gateway/v1/GatewayServiceClientPb";

const request = new MarkRefRelationRequest();
request.setTransferId(YOUR_TRANSFER_ID);
request.setRefId(YOUR_REF_CODE);

const client = new WebClient(`https://cbridge-prod2.celer.app`, null, null);
const response = await client.markRefRelation(request, null);

Request Parameters

Name
Type
Description

transfer_id

String

Auto-generated transferId

ref_id

String

Your reference code

TransferId Generation

Since there are different types of transfer provided by cBridge, you should use corresponding transfer id generation logic, please refer following links.

The best practice for markRefRelation is notifying cBridge gateway after on-chain transaction has been submitted.

Response

Since this request is notifying cBridge gateway one transfer is related to a ref code, normal response returns an empty body.

PreviousContract: Burn Canonical Token Transfer RefundNextContract: TransferAgent Mint Token Submission

Last updated 2 years ago

Pool-Based Transfer Id Generation
Burn Token Transfer Id Generation
Mint Token Transfer Id Generation