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

@egym/capacitor-nfc-pass-wallet

v0.3.0

Published

Capacitor plugin for NFC pass wallet integration

Readme

@egym/capacitor-nfc-pass-wallet

Capacitor plugin for EGYM NFC pass wallet integration on iOS and Android.

This package bundles its native implementations, so partner apps do not need separate iOS or Android wrapper libraries for the wallet flows exposed here.

Installation

npm install @egym/capacitor-nfc-pass-wallet
npx cap sync

Import

import { CapacitorNFCPassWallet } from "@egym/capacitor-nfc-pass-wallet";

API

The plugin exposes three methods:

  • savePassToWallet
  • readPassFromWallet
  • isWalletAvailable

isWalletAvailable() and readPassFromWallet() both resolve to objects with a boolean result property.

type SavePassToWalletOptions = {
  iosPkPassBase64?: string;
  androidPassJwt?: string;
  saveToGooglePayUrl?: string;
  googlePayJwt?: string;
};

type ReadPassFromWalletOptions = {
  iosPkPassBase64?: string;
};

type WalletAvailabilityResult = {
  result: boolean;
};

type ReadPassFromWalletResult = {
  result: boolean;
};

isWalletAvailable()

Use this before showing wallet actions in the UI.

const availability = await CapacitorNFCPassWallet.isWalletAvailable();

if (availability.result) {
  // show wallet CTA
}

savePassToWallet(options)

On iOS, pass the Base64-encoded .pkpass payload via iosPkPassBase64.

await CapacitorNFCPassWallet.savePassToWallet({
  iosPkPassBase64,
});

On Android, prefer googlePayJwt when available. saveToGooglePayUrl is also supported, and androidPassJwt remains available temporarily for backward compatibility.

await CapacitorNFCPassWallet.savePassToWallet({
  googlePayJwt,
  saveToGooglePayUrl,
  androidPassJwt,
});

Android payload precedence is:

  1. googlePayJwt
  2. saveToGooglePayUrl
  3. androidPassJwt

readPassFromWallet(options)

This is supported on iOS only and returns whether the pass is already present in Apple Wallet.

const passState = await CapacitorNFCPassWallet.readPassFromWallet({
  iosPkPassBase64,
});

if (passState.result) {
  // pass already exists in Apple Wallet
}

On Android, readPassFromWallet() is intentionally unsupported and rejects with NOT_SUPPORTED.

Typical Integration Flow

const availability = await CapacitorNFCPassWallet.isWalletAvailable();

if (!availability.result) {
  return;
}

if (platform === "ios") {
  const existingPass = await CapacitorNFCPassWallet.readPassFromWallet({
    iosPkPassBase64,
  });

  if (!existingPass.result) {
    await CapacitorNFCPassWallet.savePassToWallet({ iosPkPassBase64 });
  }
}

if (platform === "android") {
  await CapacitorNFCPassWallet.savePassToWallet({
    googlePayJwt,
    saveToGooglePayUrl,
    androidPassJwt,
  });
}

Platform Notes

  • iOS availability is based on whether the app can present the Apple Wallet add flow
  • iOS savePassToWallet() presents the native Apple Wallet UI
  • Android savePassToWallet() launches the Google Wallet add flow
  • Android readPassFromWallet() is not supported by Google Wallet APIs

Errors

The plugin can reject with these error codes:

  • UNAVAILABLE
  • INVALID_PAYLOAD
  • NOT_SUPPORTED
  • USER_CANCELED
  • NATIVE_ERROR

Development

For monorepo-level build, validation, and release instructions, see the repository README.