Skip to main content
Applications (such as wallet providers and exchanges) can integrate and interact with the xReserve solution and/or USDCx via API. There are three options for supporting USDCx on the Canton Network:
  1. Transfer & hold USDCx - Since USDCx is a token standard CIP-56 compliant asset then as such any wallet that supports the token standard will have built in support for transfers and holding. See the Token Standard section below.
  2. Support xReserve deposits and withdrawals - Custom API integration is required for applications to support xReserve deposits and withdrawals to and from their parties using the xReserve UI. Instructions for doing this are included in the section Supporting xReserve Deposits and Withdrawals below.
  3. Integrating the xReserve UI (Ethereum) into the wallet - To enable a full end-to-end experience for the user, a wallet can integrate against Ethereum directly for deposits on top of integrating point 2. To provide an example for doing this, the xReserve UI as well as open-sourced example scripts are available for reference. This demonstrates the two Ethereum transactions that must be submitted to an Ethereum node:
    • Approve a USDC spending allowance.
    • Call depositToRemote to deposit USDC into the xReserve contract.

Supporting xReserve Deposits and Withdrawals

The required dar file can be found here. There are 3 choices (API calls) a wallet will need to implement in order to fully support the xReserve:

Onboarding

To use the xReserve a party will first need to onboard to the bridge using the below: Example API call:

Mint

Once a user deposits USDC into ethereum a DepositAttestation is created on the Canton network. In order for the recipient party to claim those funds they will need to call a choice to mint from the DepositAttestation:
#utility-bridge-v0:Utility.Bridge.V0.Attestation.Deposit:DepositAttestation
Example API call:

Withdraw

To withdraw from the Canton Network to Ethereum a user must burn the USDCx on Canton. Specifying the:
  • destination domain id: Currently only Ethereum is supported (domain id of 0).
  • Amount: In Decimal to a max 6 decimal precision.
  • Destination recipient: a valid Ethereum address.
  • An optional reference. Empty Text field if not provided.
In addition the wallet will need to provide:
  • The available Holding contract Ids
  • A UUID as the requestId
Example API call:

Extracting Contract IDs and Disclosed Contracts

The utilities backend provides a Burn Mint Factory API Endpoint. Endpoint:
Example request body:
When you call the Burn Mint factory endpoint, the response contains the contract IDs and disclosed contracts you need for both minting and withdrawing. Note that these values can be cached to reduce api calls as these values change infrequently. As an example for extracting the required contexts and contracts from the response:

MainNet Environment Variables

TestNet Environment Variables

Supporting Token Standard actions (Holdings & Transfers) for USDCx

USDCx is a standard Registry Utility token — please refer to Utilities documentation for API examples, specifically of interest would be the following sections: