Create a new OffRampIntegration instance.
API keys for the providers you intend to use, and an
optional testMode flag to route traffic to sandbox URLs.
Compare all providers for a given transaction and return fee/settlement data.
Filters to providers that support both asset and fiatCurrency, then
calculates the fee amount, net amount, and approximate settlement time for
each. Useful for rendering a "best rate" comparison UI.
Gross fiat amount as a decimal string (e.g. '100').
Crypto asset code (e.g. 'XLM', 'USDC').
ISO 4217 fiat currency code (default 'USD').
A partial record mapping each supported provider to a ProviderComparison object. Providers that do not support the asset or currency are omitted.
Decode a CEX deposit memo to extract the target C-address.
Use this on the bridge relayer side when a Stellar payment arrives with a memo to determine which C-address should receive the funds.
The raw memo string from the incoming Stellar payment.
The extracted C-address string, or null if the memo is not a
valid bridge memo (i.e. does not start with "bridge:").
Generate a Stellar memo that encodes a target C-address for CEX routing.
When a user withdraws from a centralized exchange to the bridge's G-address, they must include this memo so the bridge can identify the intended destination C-address.
Memo format: "bridge:<targetCAddress>"
The C-address that should receive the bridged funds.
A memo string in the format "bridge:<targetCAddress>".
Build a widget URL for selling crypto for fiat (off-ramp).
Redirects the user to the selected provider's sell page where they send
params.asset from params.gAddress and receive fiat currency.
Provider, crypto amount, crypto asset, fiat currency, and source G-address.
A fully-formed URL string.
Build a widget URL for purchasing crypto with fiat (on-ramp).
Redirects the user to the selected provider's checkout page where they pay
with a credit card or bank transfer and receive params.asset at
params.cAddress on Stellar.
Provider, fiat amount, fiat currency, crypto asset, and destination C-address.
A fully-formed URL string ready for window.open() or a webview.
Get the static capability configuration for a provider.
Returns supported assets, fiat currencies, countries, amount limits, fee percentage, and test-mode availability. Useful for rendering provider selection UI or filtering by user's country and preferred currency.
The provider to look up.
A ProviderConfig object with the provider's capabilities.
Builds on-ramp and off-ramp widget URLs for multiple fiat-to-crypto (and crypto-to-fiat) providers, and provides CEX deposit memo helpers.
Construct once with your API keys and reuse across the application. All URL-building methods are synchronous — no network call is made.
Supported providers: MoonPay, Transak, Ramp Network, Banxa.
Example