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

apk-hub-sdk

v1.0.1

Published

Official JavaScript/TypeScript SDK, AES-256 Crypto & CLI for APK Hub Android app distribution and OTA updates

Readme

APK Hub SDK (apk-hub-sdk)

npm version License: MIT

Official JavaScript & TypeScript SDK, AES-256 Crypto Utilities, and CLI for APK Hub — the modern Android OTA update and app distribution platform.


📦 Installation

# npm
npm install apk-hub-sdk

# yarn
yarn add apk-hub-sdk

# pnpm
pnpm add apk-hub-sdk

🚀 Features

  • ⚡ Over-The-Air (OTA) Updates: Seamless in-app updates for React Native, Capacitor, and Node.js.
  • 🔐 AES-256-GCM Encryption & Decryption: Secure token storage, payload encryption, and safe API key obfuscation.
  • 🛡️ SHA-256 Hash Integrity: Automatically checks and verifies binary integrity before install.
  • 🚀 CI/CD CLI: Publish and manage releases straight from GitHub Actions / GitLab CI.
  • 📦 Dual-Mode API: Client-side read-only key (pk_live_...) and CI/CD secret key (sk_live_...).

🔒 Encryption & Decryption Usage

import { encrypt, decrypt, encryptJSON, decryptJSON, sha256 } from 'apk-hub-sdk'

const secretPassphrase = 'your-secure-passphrase-or-key'

// 1. String Encryption & Decryption (AES-256-GCM)
const ciphertext = encrypt('sensitive_api_key_or_token', secretPassphrase)
console.log('Encrypted:', ciphertext) // enc_gcm:iv:tag:ciphertext

const plaintext = decrypt(ciphertext, secretPassphrase)
console.log('Decrypted:', plaintext) // sensitive_api_key_or_token

// 2. JSON Object Encryption & Decryption
const payload = { userId: '123', plan: 'enterprise', active: true }
const encryptedObject = encryptJSON(payload, secretPassphrase)

const decryptedObject = decryptJSON<{ userId: string }>(encryptedObject, secretPassphrase)
console.log('User ID:', decryptedObject.userId)

// 3. SHA-256 Hashing
const hash = sha256('file-or-data-content')
console.log('SHA-256:', hash)

📱 React Native OTA Updates

import { ApkHubUpdater } from 'apk-hub-sdk'
import { Alert } from 'react-native'
import DeviceInfo from 'react-native-device-info'

const updater = new ApkHubUpdater({
  packageName: 'com.example.myapp',
  publicKey: 'pk_live_your_public_key',
  currentVersionCode: parseInt(DeviceInfo.getBuildNumber(), 10),
  channel: 'stable',
})

export async function checkForAppUpdates() {
  await updater.checkAndUpdate({
    onUpdateFound: async (info) => {
      return new Promise((resolve) => {
        Alert.alert(
          'Update Available',
          `Version ${info.latestVersion} is available.\n\n${info.releaseNotes}`,
          [
            { text: 'Later', style: 'cancel', onPress: () => resolve(false) },
            { text: 'Update Now', onPress: () => resolve(true) }
          ]
        )
      })
    },
    onProgress: (percent) => {
      console.log(`Download progress: ${percent}%`)
    },
    onReadyToInstall: (filePath) => {
      console.log('Downloaded APK verified and ready at', filePath)
    },
    onError: (err) => {
      console.error('Update failed:', err)
    }
  })
}

🛠️ CI/CD CLI Commands

Run directly with npx:

# 1. Encrypt or Decrypt data
npx apk-hub-sdk encrypt "MySecretValue" --key "passphrase123"
npx apk-hub-sdk decrypt "enc_gcm:..." --key "passphrase123"

# 2. Check for App Updates
npx apk-hub-sdk check com.example.myapp --key pk_live_abc123 --installed 40

# 3. Publish an APK Release (GitHub Actions / GitLab CI)
npx apk-hub-sdk publish ./build/app-release.apk \
  --app app_12345 \
  --key sk_live_your_secret_key \
  --notes "Performance improvements and bug fixes" \
  --channel stable \
  --rollout 100

📄 License

MIT © APK Hub Team