Options
All
  • Public
  • Public/Protected
  • All
Menu

@moonlight-io/asteroid-sdk-js

asteroid-sdk-js

Moonlight Asteroid SDK.

Overview

This is the JavaScript SDK for the Moonlight Asteroid platform. This project aims to be a lightweight library providing programmable interactions with Moonlight ecosystem.

Getting started

Installation

Nodejs

npm install --save-exact @moonlight-io/asteroid-sdk-js

We encourage pinning the version number till asteroid-sdk-js reaches 1.0.0.

Usage

Node.js

const SDK = require('@moonlight-io/asteroid-sdk-js')
const baseUrl = SDK.constants.urls.asteroidDomainUser.baseUrl.stage
const versionRes = await SDK.rest.user.getVersion(baseUrl)
/**
 * Example response:
 * { version: 'v1.5.5_21c5672', uptime: 290938, domain: 'User' }
 */

Generated using TypeDoc