DepositResponse

public struct DepositResponse : Decodable, Sendable

Response returned when initiating a deposit transaction.

This response is returned by GET /deposit and GET /deposit-exchange requests in SEP-6. It provides instructions for how to complete the deposit, including where to send the off-chain funds and any additional information needed.

The wallet should use the transaction ID to query the GET /transaction endpoint to check the status of the deposit.

See SEP-6 Deposit

  • how

    (Deprecated, use instructions instead) Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent.

    Declaration

    Swift

    public let how: String
  • (optional) JSON object containing the SEP-9 financial account fields that describe how to complete the off-chain deposit. If the anchor cannot provide this information in the response, the wallet should query the /transaction endpoint to get this asynchonously.

    Declaration

    Swift

    public let instructions: [String : DepositInstruction]?
  • id

    (optional) The anchor’s ID for this deposit. The wallet will use this ID to query the /transaction endpoint to check status of the request.

    Declaration

    Swift

    public let id: String?
  • eta

    (optional) Estimate of how long the deposit will take to credit in seconds.

    Declaration

    Swift

    public let eta: Int?
  • (optional) Minimum amount of an asset that a user can deposit.

    Declaration

    Swift

    public let minAmount: Double?
  • (optional) Maximum amount of asset that a user can deposit.

    Declaration

    Swift

    public let maxAmount: Double?
  • (optional) Fixed fee (if any). In units of the deposited asset.

    Declaration

    Swift

    public let feeFixed: Double?
  • (optional) Percentage fee (if any). In units of percentage points.

    Declaration

    Swift

    public let feePercent: Double?
  • (optional) Any additional data needed as an input for this deposit, example: Bank Name

    Declaration

    Swift

    public let extraInfo: ExtraInfo?
  • Initializer - creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder containing the data