Sep31ReceiveAssetInfo

data class Sep31ReceiveAssetInfo(val sep12Info: Sep31Sep12TypesInfo, val minAmount: Double? = null, val maxAmount: Double? = null, val feeFixed: Double? = null, val feePercent: Double? = null, val senderSep12Type: String? = null, val receiverSep12Type: String? = null, val fields: Map<String, Any?>? = null, val quotesSupported: Boolean? = null, val quotesRequired: Boolean? = null, val fundingMethods: List<String>? = null)

Per-asset configuration advertised by a Receiving Anchor in GET /info.

Bundles transaction limits, fee configuration, SEP-12 customer type requirements, SEP-38 quote availability, and supported funding methods for one Stellar asset the anchor accepts for cross-border payments.

Numeric configuration fields (minAmount, maxAmount, feeFixed, feePercent) are parsed via doubleOrNull so the SDK tolerates anchors that emit either JSON numbers (100) or quoted strings ("100"). These are anchor configuration values (limits and percentages), not transaction amounts; floating-point representation is acceptable for them. Transaction amount fields elsewhere in the SDK remain String? to preserve decimal precision.

Memo-type and funding-method strings are kept verbatim. The SDK does not validate them against any allow-list because the SEP-31 spec is expected to introduce new values over time.

Usage

val info = sep31Service.info(jwt = jwt)
val usdc = info.receiveAssets["USDC"] ?: error("Anchor does not accept USDC")
println("Limits: ${usdc.minAmount} - ${usdc.maxAmount}")
println("Fee: fixed=${usdc.feeFixed}, percent=${usdc.feePercent}")
println("Quotes required: ${usdc.quotesRequired}")
println("Funding methods: ${usdc.fundingMethods}")

See also

Constructors

Link copied to clipboard
constructor(sep12Info: Sep31Sep12TypesInfo, minAmount: Double? = null, maxAmount: Double? = null, feeFixed: Double? = null, feePercent: Double? = null, senderSep12Type: String? = null, receiverSep12Type: String? = null, fields: Map<String, Any?>? = null, quotesSupported: Boolean? = null, quotesRequired: Boolean? = null, fundingMethods: List<String>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Fixed fee component charged by the anchor; null when the fee model does not decompose into fixed + percent.

Link copied to clipboard

Percentage fee component charged by the anchor (in percentage points); null when the fee model does not decompose into fixed + percent.

Link copied to clipboard
val fields: Map<String, Any?>?

Deprecated per-transaction field requirements. Migrate to SEP-12 PUT /customer instead.

Link copied to clipboard

Methods the anchor supports for delivering the off-chain asset (for example SEPA, SWIFT). null when the anchor does not advertise any.

Link copied to clipboard

Maximum amount the anchor accepts; null when unlimited.

Link copied to clipboard

Minimum amount the anchor accepts; null when unlimited.

Link copied to clipboard

true if the anchor requires a SEP-38 quote_id for off-chain delivery.

Link copied to clipboard

true if the anchor optionally accepts a SEP-38 quote_id for off-chain delivery.

Link copied to clipboard

Deprecated single receiver SEP-12 type identifier. Use Sep31Sep12TypesInfo.receiverTypes instead.

Link copied to clipboard

Deprecated single sender SEP-12 type identifier. Use Sep31Sep12TypesInfo.senderTypes instead.

Link copied to clipboard

SEP-12 customer type requirements for sender and receiver. Defaults to empty sender/receiver maps when the anchor omits the per-asset sep12 object — anchors that require no KYC may leave it out entirely. Note: the SEP-31 spec marks the wire sep12 field "(Deprecated, optional)", but the spec prose still recommends sep12.sender.types / sep12.receiver.types over the older flat senderSep12Type / receiverSep12Type fields, and SEP-12 defers customer-type discovery back to the calling protocol with no alternative. The SDK therefore treats this field as canonical (not @Deprecated) despite the schema marker.