deposit

Initiates a programmatic deposit.

A deposit occurs when a user sends an external asset (fiat via bank transfer, crypto from another blockchain, etc.) to an anchor, and the anchor sends an equivalent amount of the corresponding Stellar asset to the user's account.

Return

Sep06DepositResponse with deposit instructions and transaction ID

Parameters

request

Deposit request parameters

Throws

If JWT is invalid or expired

If additional KYC fields are required

If KYC status prevents the transaction

On validation error

On anchor server error

Example:

val response = sep06.deposit(Sep06DepositRequest(
assetCode = "USDC",
account = keyPair.getAccountId(),
jwt = jwtToken,
amount = "100",
claimableBalanceSupported = true
))

println("Transaction ID: ${response.id}")
response.instructions?.forEach { (field, instruction) ->
println("$field: ${instruction.value}")
}