Skip to main content
BETA
View Zag.js on Github
Join the Discord server

Javascript SDK

The Mirror World SDK for JavaScript implements a TypeScript-compatible client that can be used both in the browser and in Node.js.

Installation

  1. Create a developer account the developer dashboard.
  2. Create project and copy the API Key and clientId for your project.
  3. Install SDK in your project

GitHub

yarn add @mirrorworld/web3.js

Usage

Import the SDK instance to initialize it.

import { MirrorWorld, ClusterEnvironment } from "@mirrorworld/web3.js" const mirrorworld = new MirrorWorld({ apiKey: "YOUR_SECRET_API_KEY", env: ClusterEnvironment.testnet, // Can be ClusterEnvionment.mainnet for mainnet }) async function main() { await mirrorworld.login() await mirrorworld.getTokens() await mirrorworld.getNFTs() } main()

Full API Documentation

You can view the JavaScript API documentation on the JavaScript API Reference page.

Edit this page on GitHub

On this page