BluxBlux

Javascript

Integrate Blux into any JavaScript project using the core SDK.

The @bluxcc/core package is framework-agnostic — use it in any JavaScript or TypeScript project without a framework dependency.

Installation

Install the Blux core SDK using your package manager of choice:

    npm install @bluxcc/core
    pnpm add @bluxcc/core
    yarn add @bluxcc/core

Setup

Call createConfig once at the entry point of your application to initialize Blux. Do not call it more than once. The only required option is appId. Leave out networks and the app uses Mainnet. Leave out appName and Blux uses "App".

    import { createConfig } from "@bluxcc/core";

    createConfig({
      appId: "your-app-id",
    });
    const { createConfig } = require("@bluxcc/core");

    createConfig({
      appId: "your-app-id",
    });
    <script src="https://cdn.jsdelivr.net/npm/@bluxcc/core/dist/index.iife.js"></script>

    <script>
      Blux.createConfig({
        appId: "your-app-id",
      });
    </script>

Use it

After createConfig, open the built-in modals from the blux object.

import { blux } from "@bluxcc/core";

blux.login();

On this page