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

akedly

v1.0.1

Published

Frontend SDK for integrating Akedly OTP service

Readme

Akedly OTP SDK

A simple JavaScript wrapper for the Akedly OTP service. This SDK simplifies creating, activating, and verifying OTP (One-Time Password) transactions via Akedly's API.


📦 Installation

npm install akedly

Or with Yarn:

yarn add akedly

🚀 Usage

1. Initial Setup

import akedly from "akedly";

// Set your credentials (get them from Akedly dashboard)
akedly.setAPIKey("YOUR_API_KEY");
akedly.setPipelineID("YOUR_PIPELINE_ID");

2. Step-by-Step Flow

🔹 Step 1: Create and Activate Transaction (e.g. on user signup or login trigger)

async function initiateOTPFlow() {
  try {
    const transaction = await akedly.createTransaction(
      "[email protected]",
      "+201234567890"
    );

    // You can log the activatedTransaction to your backend to keep track of all transactions until they are verified
    const activatedTransaction = await akedly.activateTransaction(
      transaction.data._id
    );

    // You can store activatedTransaction.data._id to use during verification
    const transactionObjectID = activatedTransaction.data._id;

    console.log("OTP sent. Transaction ID:", transactionObjectID);

    // Now wait for the user to enter the OTP (e.g., via frontend input)
  } catch (error) {
    console.error("OTP initiation error:", error.message);
  }
}

🔹 Step 2: Verify OTP (called when user submits the code)

async function handleOTPSubmit(userEnteredOTP, transactionObjectID) {
  try {
    const result = await akedly.verifyOTP(userEnteredOTP, transactionObjectID);
    console.log("✅ OTP Verified:", result);
  } catch (error) {
    console.error("❌ Verification failed:", error.message);
  }
}

🔧 API Reference

setAPIKey(APIKey: string): void

Sets your Akedly API key. Must be called before other methods.

setPipelineID(pipelineID: string): void

Sets your OTP pipeline ID from the Akedly dashboard.

createTransaction(email: string, phoneNumber: string): Promise<Object>

Creates a new OTP transaction and returns the full transaction object.

activateTransaction(transactionID: string): Promise<Object>

Activates (sends) the OTP for the given transaction.

verifyOTP(otp: string, transactionObjectID?: string): Promise<Object>

Verifies the user’s OTP. If no transactionObjectID is passed, it will use the last activated one.


🛡️ Requirements

  • Node.js >=14
  • An account at Akedly

📝 License

ISC © [Akedly]


💡 Tips

  • This SDK uses axios internally.
  • Works in both Node.js and frontend frameworks like React, Angular, or Vue.
  • Use the returned _id from activateTransaction() as the identifier when verifying the OTP.