Skip to content

Before you can transact with a new Hedera account, you need to send funds from an existing account to the account alias of the new Hedera account.

Hedera account identifiers

Hedera accounts are identified using one of the following identifiers:

  • Hedera account alias: An alias assigned to a newly created account before it is registered in Hedera.
  • Hedera account ID: The identification number of the registered wallet in Hedera, not to be confused with the Ripple Custody account ID.

Not all Hedera wallets support sending funds to new accounts whose address is still in the alias format. For Ripple Custody accounts, any Hedera account with an address in account ID format can send funds to other Ripple Custody Hedera accounts whose address is in either the account alias or the account ID format.

For more information about the properties of accounts in Hedera, see the Hedera developer documentation.

When you create a new account on the Hedera ledger. Ripple Custody creates an off-chain account and assigns the account a Hedera account alias as its address.

A call to the Retrieve account address operation returns the following:

{
  "id": "25aa54e1-3232-4d19-8594-07edc133f2dc",
  "address": "0.0.CIQCE5CRZTWEXMITWP2UYUBYRGJSWM2ZBUIQEUZL6V6SIQYJMF4H5UY", // Hedera account alias
  "keyPath": null,
  "createdAt": "2023-03-09T13:02:19.297Z",
  "scope": "External"
}

Initialize the account

Prerequisites

To initialize your Hedera account, you need the following:

PrerequisiteAdditional information
An account on a Hedera ledger from which to initiate the transactionsView account details
Enough funds in the account to cover the transaction fees and the amountCheck account balances
The account alias of the account to initializeThis is retrieved in the same way as the account address: Retrieve account address
If this is a multi-ledger account, the ledger IDList ledgers
The following new IDs, in a standard UUID format:
  • A transaction order ID
  • An intent ID

Create the transaction order

System change process

All new requests to change the system state follow the same process. To familiarize yourself with this process first, see Manage intents and approvals.

To create the transaction order:

  1. Prepare the request body in the standard intent proposal format, with a payload block similar to the example shown in Payload example. For more information, see User-signed proposal request body.

  2. Call the Perform a dry run for an intent operation, with the request field excluded. For more information, see Dry run intents.

    This step is optional, but highly recommended. A dry run can reveal errors or unintended consequences of the intent, as well as estimate the fees incurred by the transaction.

    You can repeat this step more than once to obtain the required result.

  3. Sign the request body and call the Propose an intent operation. For more information, see Propose an intent to create an entity.

  4. Check the update. For more information, see Check updates.

When the transaction order is successfully approved, Ripple Custody does the following:

  • Creates a transaction, to broadcast the automatic token association on the blockchain.
  • Creates one or more transfers, to represent the separate amounts associated with the transaction, such as the cryptocurrency amount and the fees.

Payload example

This example funds the account with 10000000 tinybar (or 1 HBAR):

{
    "payload": {
        "id": "d28a2cce-af3d-4a4e-b589-c8d61fd824b8",
        "accountId": "5ff7cb0b-ac4e-4e9d-85bc-bd4b027740ce",
        "ledgerId": "hedera-testnet-january-2023",
        "parameters": {
            "operation": {
                "outputs": [
                    {
                        "destination": {
                            "address": "0.0.CIQCE5CRZTWEXMITWP2UYUBYRGJSWM2ZBUIQEUZL6V6SIQYJMF4H5UY",
                            "type": "Address"
                        },
                        "amount": "10000000"
                    }
                ],
                "type": "Transfer"
            },
            "feeStrategy": {
                "priority": "Low",
                "type": "Priority"
            },
            "maximumFee": "200",
            "type": "Hedera"
        },
        "description": "Hedera account initialization",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

Fields of the payload block to note are as follows:

FieldDescription
accountIdInternal account ID of an existing Hedera account in Ripple Custody.
parameters.operation.outputs.destinationDetails of the new account:
  • type is Address.
  • address is the account alias of the new Hedera account.
parameters.operation.outputs.amountAmount to fund, in tinybar.
parameters.operation.typeTransfer
parameters.feeStrategyFee strategy field included in the transaction order payload. For Hedera, fees are retrieved directly from the chain and customers cannot prioritize the transaction. For more information, see Fee strategy and maximum fee.
parameters.maximumFeeThe maximum fee, in tinybar. For more information, see Fee strategy and maximum fee.
parameters.typeLedger type, in this case Hedera.
typev0_CreateTransactionOrder

When the transaction order is successfully approved, Ripple Custody does the following:

  • Creates a transaction, to broadcast the details and register the account on the blockchain.
  • Creates one or more transfers, to represent the separate amounts associated with the transaction, such as the cryptocurrency amount and the fees.
  • Updates the address to the Hedera account ID:
{
  "id": "4392f3a9-bdb4-4042-8fea-62c7c4152bbf",
  "address": "0.0.3364987", // Hedera account ID
  "keyPath": null,
  "createdAt": "2023-03-09T13:02:19.648Z",
  "scope": "External"
}