Skip to main content

Transfer Overview

Stablecoins issued by Brale are compatible with the Canton Token Standard, which specifies an interface which can be used to transfer any tokens that have smart contract Templates that comply in the same manner. This is a 2-step process, in which the transfer is offered by the sender creating a Contract instance which implements the TransferInstruction interface and the recipient exercising the Accept choice on the TrnasferInstruction contract. For transfers to parties also custodied by Brale, this acceptance is performed automatically. For Canton network transfers to parties not custodied by Brale, a User with permission to ActAs the recipient party must use the Ledger API. Support for manually accepting transfers is included in the Canton Utility UI as well as other Token Standard-compliant wallet applications. Offers must be accepted within 72 hours or they will expire and be automatically withdrawn.

Instrument IDs and registrar parties

Token Standard calls identify a token by its instrument ID and its registrar (instrument admin) party. Use the registrar party in the registrars/{party} path of Token Standard API requests, such as the one in Step 2.
Instrument IDs and registrar parties are different on Canton mainnet (canton) and Canton testnet (canton_testnet). Don’t reuse mainnet values on testnet. Requests that use the wrong registrar party fail with a “Registrar … not found” error.

SBC

SBC doesn’t require holder credentials on either network. Any Canton party can hold and receive SBC.

Other Brale-issued tokens

Each Brale-issued token on Canton, such as CSC or 4MGCC, has its own instrument ID. Values also differ between mainnet and testnet. To get the instrument ID and registrar party for another token, contact Brale support and include the token’s value_type and the network (canton or canton_testnet).

Accepting a Transfer via the Ledger and Token Standard APIs

Acceptance can be automated by using the Ledger and Token Standard APIs to retrieve the necessary contextual information and exercise the Accept choice. The below example shows how to accept an offer using the HTTP JSON Ledger API of the recipient’s participant.

Step 1: Retrieve Pending Transfers

First, query your node to list all pending TransferInstructions associated with your party. This allows you to identify the specific transfer you intend to accept. To query for the transfer instructions, it is first necessary to get the current ledger end offset.
Get current ledger end offset
Note the value of offset in the response, which will be used in the request to obtain the TransferInstructions.
Get the active contracts as of the offset
Find the TransferInstruction you want to accept in the response and note its contractId and interfaceId, which will be used in subsequent steps.

Step 2: Get the Contextual Data Needed to Accept the Transfer

In order to exercise the choice to accept the transfer, it is necessary to obtain some contextual information about it that cannot easily be obtained using the ledger, for which an off-ledger Token Standard API has been implemented.
Use the Token Standard API to get the contextual information
Note the choiceContextData and disclosedContracts in the response, which will need to be provided to the accept choice.

Step 3: Accept the Transfer Using the Ledger API

Once all the contextual information is obtained, the Accept choice of the TransferInstruction can be exercised via the ledger API to complete the transfer.
"Use