Function: createOnramper
createOnramper(
options):Onramper
An Onramper for a swap backend, without building a GSwap client (no signer, no wallet, no pool or stream services): the call for an app that only needs the widget URL.
Parameters
| Parameter | Type |
|---|---|
options | OnramperOptions |
onramper options
Returns
Example
import { createOnramper } from '@gala-chain/gswap-sdk';
const onramper = createOnramper({ dexBackendBaseUrl: 'https://dex-backend-prod1.defi.gala.com' });
const url = await onramper.generateWidgetUrl({ walletAddress, mode: 'buy' });