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

3.0.0-beta.4 • 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} />;
}

Readme

Keywords

Package Sidebar

Install

npm i @dodoex/api

Weekly Downloads

17

Version

3.0.0-beta.4

License

GPL-3.0-or-later

Unpacked Size

4.06 MB

Total Files

425

Last publish

Collaborators

  • dodo-dev