Before you can transact with a new Stellar account, you need to initialize the account from an existing Stellar account.
To initialize your Stellar account, you need the following:
| Prerequisite | Additional information |
|---|---|
| An account on a Stellar ledger from which to initiate the transaction | View account details |
| Enough funds in the account to cover the transaction fees and the amount | Check account balances |
| The address of the account to fund | Retrieve account address |
The following new IDs, in a standard UUID format:
|
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:
Prepare the request body in the standard intent proposal format, with a
payloadblock similar to the example shown in Payload example. For more information, see User-signed proposal request body.Call the Perform a dry run for an intent operation, with the
requestfield 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.
Sign the request body and call the Propose an intent operation. For more information, see Propose an intent to create an entity.
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.
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:
| Field | Description |
|---|---|
accountId | Internal account ID of an existing Stellar account in Ripple Custody. |
operation.destination | Details of the new account. |
operation.startingBalance | Amount to initialize with, in Stroops. |
operation.type | CreateAccount |
parameters.feeStrategy | The fee strategy to use for the transaction. For more information, see Fee strategy and maximum fee. |
parameters.maximumFee | The maximum fee, in Stroops. For more information, see Fee strategy and maximum fee. |
parameters.type | Ledger type, in this case Stellar. |
type | v0_CreateTransactionOrder |