Skip to content

Before you can transact with a new Stellar account, you need to initialize the account from an existing Stellar account.

Prerequisites

To initialize your Stellar account, you need the following:

PrerequisiteAdditional information
An account on a Stellar ledger from which to initiate the transactionView account details
Enough funds in the account to cover the transaction fees and the amountCheck account balances
The address of the account to fundRetrieve account address
The following new IDs, in a standard UUID format:
  • A transaction order ID
  • An intent ID

Initialize an account

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 initialize a Stellar account:

  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 details 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 initializes an account with 10000000 Stroops (1 XLM):

{
    "payload": {
        "id": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
        "accountId": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
        "parameters": {
            "operation": {
                "destination":{
                    "address": "GBDAE3PRVTN4GWYR7O4QW3Y6RFHU564RPFJ5CMYIMG3AYNJFDGW3L7O7",
                    "type": "Address"
                },
                "startingBalance":"10000000",
                "type": "CreateAccount"
            },
            "memo": {
                "value": "Stellar account fund",
                "type": "Text"
            },
            "feeStrategy": {
                "priority": "Low",
                "type": "Priority"
            },
            "maximumFee": "200",
            "type": "Stellar"
        },
        "description": "",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

Fields of the payload block to note are as follows:

FieldDescription
accountIdInternal account ID of an existing Stellar account in Ripple Custody.
operation.destinationDetails of the new account.
operation.startingBalanceAmount to initialize with, in Stroops.
operation.typeCreateAccount
parameters.feeStrategyThe fee strategy to use for the transaction. For more information, see Fee strategy and maximum fee.
parameters.maximumFeeThe maximum fee, in Stroops. For more information, see Fee strategy and maximum fee.
parameters.typeLedger type, in this case Stellar.
typev0_CreateTransactionOrder