Skip to content

Installation ​

SDK can be connected in two ways:

  • as an npm package (ESM/CJS) for Node.js and bundlers
  • as a UMD bundle in the browser via a <script> tag

Node.js ​

Requirement

Supported versions ^18.0.0 || ^20.0.0 || >=22.0.0

bash
npm install @flowlu/miniapp-jssdk
bash
yarn add @flowlu/miniapp-jssdk

Import the library into your project:

ts
import { App, Frame, Toast } from '@flowlu/miniapp-jssdk'
ts
const { App, Frame, Toast } = require('@flowlu/miniapp-jssdk')

UMD ​

Via CDN ​

Include the library directly via CDN — add a <script> tag with the latest version to your HTML file:

html
<script src="https://unpkg.com/@flowlu/miniapp-jssdk@latest/dist/miniapp-jssdk.min.js"></script>

Local import ​

If you prefer to keep the library file in your project, first download the library from the CDN and add it to your project.

Then include the file in your HTML:

html
<script src="/path/to/miniapp-jssdk.min.js"></script>

After including the script, the SDK is available via the global variable FlowluMiniApp:

js
const App = window.FlowluMiniApp;
const Frame = App.Frame;
const Toast = Frame.Toast;

Published under the MIT license.