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

@sky-mavis/1more-sdk

v0.0.1

Published

SDK for game partners to integrate with the OneMore platform via iframe communication

Readme

@sky-mavis/1more-sdk

SDK for game partners to integrate their games with the OneMore platform. This SDK handles the iframe communication between partner games and the main platform website using Penpal for secure, promise-based RPC.

Installation

npm install @sky-mavis/1more-sdk
# or
yarn add @sky-mavis/1more-sdk

Quick Start

import { init, endRound } from '@sky-mavis/1more-sdk';

// Initialize SDK when your game loads
const { parent, destroy } = await init({
  // Optional: add extra allowed origins for local development
  allowedOrigins: ['http://localhost:3000'],
  onRoundStart: (data) => {
    // Called when parent starts a new round
    console.log('Round started!');
    console.log('Token:', data.token);
    console.log('Session ID:', data.sessionId);
    console.log('Round ID:', data.roundId);
    console.log('Target Score:', data.targetScore);

    // Store token for API calls
    window.arcadeToken = data.token;
    sessionStorage.setItem('arcadeToken', data.token);
  },
});

// When game round ends, call parent.endRound()
await parent.endRound();

// Or use the standalone function:
await endRound();

API

init(config)

Initializes the SDK and establishes a connection with the parent platform.

const { parent, destroy } = await init({
  allowedOrigins: ['http://localhost:3000'], // optional
  timeout: 10000, // optional, default 10 seconds
  onRoundStart: (data) => {
    // Handle round start
    console.log(data.token, data.sessionId, data.roundId, data.targetScore);
  },
});

Parameters:

  • config.allowedOrigins - Additional allowed origins (default origin is always included)
  • config.timeout - Connection timeout in milliseconds (default: 10000)
  • config.onRoundStart - Callback fired when the parent starts a new round

Returns: Promise<IInitResult>

  • parent - Proxy object to call methods on the parent platform
  • destroy() - Function to clean up the connection

parent.endRound()

Notifies the parent platform that the game round has ended.

await parent.endRound();

endRound() (standalone)

Convenience function that can be called from anywhere after init().

import { endRound } from '@sky-mavis/1more-sdk';

// Anywhere in your game code:
await endRound();

Types

Game (Child) Types

interface IInitConfig {
  allowedOrigins?: string[];
  timeout?: number;
  onRoundStart: (data: IRoundStartData) => void;
}

interface IInitResult {
  parent: IParentMethods;
  destroy: () => void;
}

Shared Types

interface IRoundStartData {
  token: string;
  sessionId: string;
  roundId: string;
  targetScore: number;
  [key: string]: unknown;
}

interface IGameMethods {
  startRound: (data: IRoundStartData) => void | Promise<void>;
}

interface IParentMethods {
  endRound: () => void | Promise<void>;
}

Example: Phaser Integration

import Phaser from 'phaser';
import { init, endRound } from '@sky-mavis/1more-sdk';

declare global {
  interface Window {
    arcadeToken?: string;
  }
}

async function main() {
  // Initialize SDK before starting game
  await init({
    onRoundStart: (data) => {
      window.arcadeToken = data.token;
      sessionStorage.setItem('arcadeToken', data.token);
      console.log('Round started:', data.roundId);
    },
  });

  // Start Phaser game
  new Phaser.Game(gameConfig);
}

// Call in your game over scene
export async function notifyGameFinished() {
  await endRound();
}

main();

Communication Flow

┌─────────────────┐                    ┌─────────────────┐
│ OneMore Platform│                    │   Partner Game  │
│    (Parent)     │                    │    (Iframe)     │
└────────┬────────┘                    └────────┬────────┘
         │                                      │
         │         1. Load iframe               │
         │ ─────────────────────────────────────>
         │                                      │
         │     2. Penpal connection established │
         │ <═══════════════════════════════════>
         │                                      │
         │  3. parent calls game.startRound()   │
         │       (token, sessionId, roundId,    │
         │        targetScore)                  │
         │ ─────────────────────────────────────>
         │                                      │
         │         ... game plays ...           │
         │                                      │
         │   4. game calls parent.endRound()    │
         │ <─────────────────────────────────────
         │                                      │

Security

The SDK validates incoming connections:

  • Origin - Only accepts connections from configured allowedOrigins
  • Source - Only communicates with window.parent

Default allowed origin: https://main.new-arcade.axieinfinity.services

License

MIT