@dodoex/api
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

API

DODO Service API

HOW TO USE

import { SwapWidgetApi } from '@dodoex/api';
import { SwapWidget } from '@dodoex/widgets';

const dodoService = new SwapWidgetApi();
const apikey = ""
const projectId = "";

export default function Swap() {
  React.useEffect(() => {
    if (projectId && apiKey) {
      const dodoService = new SwapWidgetApi();
      dodoService
        .getConfigSwapWidgetProps(projectId, apiKey)
        .then(({ swapWidgetProps }) => {
          setConfig(swapWidgetProps);
        });
    }
  }, [projectId, apiKey]);

  return <SwapWidget {...config} apikey={apiKey} />;
}

/@dodoex/api/

    Package Sidebar

    Install

    npm i @dodoex/api

    Weekly Downloads

    2

    Version

    0.0.1

    License

    GPL-3.0-or-later

    Unpacked Size

    54.7 kB

    Total Files

    13

    Last publish

    Collaborators

    • dodo-dev