npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mojito-inc/loyalty

v1.0.0

Published

<p align="center"> <a href="https://getmojito.com/loyalty"> <img src="./Mojito_wordmark_black.png" alt="Mojito Logo" width="100" /> </a> </p>

Readme

Mojito Loyalty Platform SDK

Overview

The Mojito Loyalty Platform SDK is a development toolkit designed to integrate a loyalty platform with the SUI blockchain using Move smart contracts. This SDK provides a modular framework that facilitates:

  • User authentication
  • LeaderBoard Details
  • Claim Process
  • Mission and Reward Related Details
  • Wallet Module
  • Redemption and reward distribution

Accessing the SDK

To access this SDK, you need to create an API key by logging into the Loyalty Admin Portal at Mojito Loyalty. Navigate to the API section to generate your API Key, which is required for authentication when using this SDK.

Build Process

1. Setup Development Environment

Ensure you have Node.js and npm installed, then install dependencies:

npm install

2. SDK Folder Structure

The SDK follows a structured folder layout:

sui-sdk/
├── src/
│   ├── auth/
│   ├── modules/
│   ├── utils/
│   ├── index.ts
│   └── constants.ts 
├── package.json
├── tsconfig.json
└── README.md

3. Publishing the SDK

To build and publish the SDK, run:

npm run build
npm publish

Usage

Installing the SDK

npm install @mojito-inc/loyalty

Authentication

Set API Key

const sdk = new LoyaltyClient('environment');
sdk.auth.setApiKey('API Key');

Generate JWT Token

const sdk = new LoyaltyClient('environment');
sdk.auth.generateJWT('wallet-address', 'signature', 'chain', 'message', sdk.auth);

Set JWT Token

const sdk = new LoyaltyClient('environment');
sdk.auth.setJWT('JWT Token');

Claims Management

Initiate a Claim

const sdk = new LoyaltyClient('environment');
sdk.auth.setApiKey('API Key');
let response = await sdk.claim.initiateClaim('mission-id', 'user-unique-address', sdk.auth);

Fetch Claim Status

const sdk = new LoyaltyClient('environment');
sdk.auth.setApiKey('API Key');
let response = await sdk.admin.getClaimStatus('tenant-slug', 'mission-id', 'user-unique-address', 'claim-id', sdk.auth);

Redeem Process

Initiate a Redeem Reward

const sdk = new LoyaltyClient('environment');
sdk.auth.setApiKey('API Key');
let response = await sdk.redeemption.initiateReward('reward-id', 'user-unique-address','wallet-address', sdk.auth);

Missions and Rewards

Fetch Mission by Id

const sdk = new LoyaltyClient('environment');
let response = await sdk.admin.getMissions('mission-id', sdk.auth);

Fetch Rewards by Id

const sdk = new LoyaltyClient('environment');
let response = await sdk.admin.getRewards('reward-id', sdk.auth);

References