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

@aqua.xyz/games-identity-sdk

v1.0.21

Published

A typescript library using aqua identity authentication.

Readme

@aqua.xyz/games-identity-sdk

A typescript library using aqua identity authentication.

Installation

Using yarn

# Using yarn
$ yarn add @aqua.xyz/games-identity-sdk

# Using npm
$ npm install @aqua.xyz/games-identity-sdk

Example usage

import {
  AquaIdentitySDK,
  Environment,
  EVENTS,
  NFTTypes,
} from "@aqua.xyz/games-identity-sdk";

Production Mode

const aquaIdentity = new AquaIdentitySDK({
  environment: Environment.PRODUCTION,
});
const login = async () => {
  await aquaIdentity.login({ isLandscape: true });
};

const logout = async () => {
  await aquaIdentity.logout();
};

const getWalletAddress = async () => {
  await aquaIdentity.getWalletAddress();
};

const isNFTAwarded = async () => {
  await aquaIdentity.isNFTAwarded({
    nftType: NFTTypes.SKIP, // NFTTypes.SLOWDOWN  ||  NFTTypes.SKIP  || NFTType.REDO
  });
};

const awardNFT = async () => {
  await aquaIdentity.awardNFT({
    nftType: NFTTypes.SLOWDOWN, // NFTTypes.SLOWDOWN  ||  NFTTypes.SKIP  || NFTType.REDO
  });
};

const verifyUserIdentity = async () => {
    await aquaIdentity.verifyUserIdentity({
        walletAddress: YOUR_WALLET_ADDRESS, // Replace YOUR_WALLET_ADDRESS with the wallet address that needs to be verified
        jwtToken: YOUR_TOKEN // Replace YOUR_TOKEN with the jwt token

    })
}

const getOwnedDetailedNFTs = async () => {
    await aquaIdentity.getOwnedDetailedNFTs({
        walletAddress: YOUR_WALLET_ADDRESS // Replace YOUR_WALLET_ADDRESS with your wallet address
    })
}

const getAwardedDetailedNFTs = async () => {
    await aquaIdentity.getAwardedDetailedNFTs({
        walletAddress: YOUR_WALLET_ADDRESS // Replace YOUR_WALLET_ADDRESS with your wallet address
    })
}

// ------- Example usage in game logic to retrieve the list of owned NFTs -------
const nftsList = await retrieveNFTList();

// Response would contain the NFTs the user already owns:
nftsList = [
  NFTTypes.SKIP,
  NFTTypes.REDO,
  NFTTypes.SLOWDOWN
];

// ------- Example usage in game logic to award the SLOWDOWN NFT on first game win -------
if (playerWonFirstGameInLudo) {
  const hasNFTBeenAwarded = await isNFTAwarded({ nftType: NFTTypes.SLOWDOWN });

  if (!hasNFTBeenAwarded) {
    // The "slowdown" NFT is not owned by the current logged in user

    await awardNFT({ nftType: NFTTypes.SLOWDOWN }); // Awarding "slowdown" NFT to the current logged in user
 
    // Game displays awarding message - example: "Congrats, you won the "slowdown" NFT
  } else {
    // Game should not display the awarding message, if the NFT has been already awarded by winning a first match in a different game
  }
}

aquaIdentity.on(EVENTS.AQUA_IDENTITY_MODAL_CLOSE, () => {
  // When this gets triggered, that means that login, getWalletAddress or 
  // logout methods finished the execution
  // It means that everything is stored on aqua.xyz and here is the 
  // place where you may want to manage your local state, update or remove state
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_SUCCESSFULLY_LOG_IN, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "isLoggedIn": true,
  //     "jwtToken":  "sfsaxewgwdsf...",
  //     "walletAddress": "0xewgwt34...",
  //     "profile": {
  //        "username":"John",
  //        "avatar": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0..."
  //     },
  //     "nftList": [
  //         "skip",
  //         "redo",
  //         "slowdown"
  //     ],
  //     "nfts": {
  //        0: 1,
  //        1: 0,
  //        2: 0,
  //      }
  //   }
  //   }
  // }
  console.log("AQUA_IDENTITY_SUCCESSFULLY_LOG_IN", event.data);
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_SUCCESSFULLY_LOG_OUT, () => {
  // Example of response
  // event = { 
  //   "data": {
  //     "isLogout": true
  //   }
  // }
  console.log("SUCCESSFULLY_LOG_OUT");
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_WALLET_ADDRESS, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "isLoggedIn": true,
  //     "jwtToken":  "sfsaxewgwdsf...",
  //     "walletAddress": "0xewgwt34...",
  //     "profile": {
  //        "username":"John",
  //        "avatar": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0..."
  //     },
  //     "nftList": [
  //         "skip",
  //         "redo",
  //         "slowdown"
  //     ],
  //     "nfts": {
  //        0: 1,
  //        1: 0,
  //        2: 0,
  //      }
  //   }
  //   }
  // }
  console.log("SUCCESSFULLY_RETRIEVED_WALLET_ADDRESS", event);
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_VERIFY_USER_IDENTITY, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "valid": true,
  //     "walletAddress": "0xewgwt34...",
  //   }
  // }
  console.log("SUCCESSFULLY_VERIFIED_USER");
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_IS_NFT_AWARDED, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "valid": true
  //   }
  // }
  console.log("SUCCESSFULLY_VALIDATE_NFT_OWNERSHIP", event);
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_AWARD_NFT, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "valid": true
  //   }
  // }
  console.log("SUCCESSFULLY_AWARD_NFT", event);
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_RETRIEVE_NFT_LIST, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "nftList": ['skip']
  //   }
  // }
  console.log("SUCCESSFULLY_AQUA_IDENTITY_RETRIEVE_NFT_LIST", event);
});

aquaIdentity.on(EVENTS.AQUA_IDENTITY_OWNED_NFTS_DETAILS, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "nfts": {
  //        0: 1,
  //        1: 0,
  //        2: 0,
  //      }
  //   }
  // }
  console.log("SUCCESSFULLY_RETRIEVE_OWNED_NFTS_DETAILS", event);
});
aquaIdentity.on(EVENTS.AQUA_IDENTITY_AWARDED_NFTS_DETAILS, (event) => {
  // Example of response
  // event = { 
  //   "data": {
  //     "nfts": {
  //        0: 1,
  //        1: 0,
  //        2: 0,
  //      }
  //   }
  // }
  console.log("SUCCESSFULLY_RETRIEVE_AWARDED_NFTS_DETAILS", event);
});

Environments

Development

For the DEVELOPMENT environment, the local server will run on https://new-prod-aqua.netlify.app:8080/.

Production

For the PRODUCTION environment, the local server will run on https://games.aqua.xyz:8080/.