Skip to main content

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​

ParameterType
optionsOnramperOptions

Returns​

Onramper

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' });