Raxol.Payments.Xochi.Schemas.DepositRouteRequest (Raxol Payments v0.2.0)

Copy Markdown View Source

A cross-VM deposit-route quote request: a non-EVM origin (Tron) settling to an EVM destination. The origin has no gasless pull, so the quote returns a deposit_address (+ deposit_attestation to verify) instead of EIP-712 typed data to sign.

Serializes to the same /api/intent/quote wire keys as QuoteRequest, but validates the origin fields as Tron base58 and the destination fields as EVM 0x-hex. Only a Tron origin is supported today; other non-EVM origins reject at validate/1.

Summary

Types

t()

@type t() :: %Raxol.Payments.Xochi.Schemas.DepositRouteRequest{
  from_amount: String.t(),
  from_chain_id: pos_integer(),
  from_token: String.t(),
  recipient_address: String.t() | nil,
  settlement_preference: String.t(),
  slippage_bps: non_neg_integer(),
  to_chain_id: pos_integer(),
  to_token: String.t(),
  trust_score: non_neg_integer() | nil,
  wallet: String.t()
}

Functions

to_json(req)

@spec to_json(t()) :: map()

validate(req)

@spec validate(t()) :: :ok | {:error, term()}