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.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
Get the active contracts as of the offset
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 a off-ledger Token Standard API has been implemented.Use the Token Standard API to get the contextual information
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