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

@freddydrodev/intouch

v1.1.2

Published

A modern Node.js library for seamless interaction with the Intouch API. This library provides a simple and intuitive interface to make API calls to Intouch services.

Downloads

11

Readme

Intouch

A modern Node.js library for seamless interaction with the Intouch API. This library provides a simple and intuitive interface to make API calls to Intouch services.

Installation

You can install the library using npm, yarn, or pnpm:

# Using npm
npm install @freddydrodev/intouch

# Using yarn
yarn add @freddydrodev/intouch

# Using pnpm
pnpm add @freddydrodev/intouch

Quick Start

Method 1: Environment Variables (Recommended)

The easiest way to use this library is through environment variables. Create a .env file in your project root:

# Required for all operations
INTOUCH_AGENT_CODE="your_agent_code"
INTOUCH_PARTNER_ID="your_partner_id"
INTOUCH_LOGIN_API="your_login_api"
INTOUCH_PASSWORD_API="your_password_api"

# Required for Cash In operations
INTOUCH_CI_USERNAME="your_username"
INTOUCH_CI_PASSWORD="your_password"

Then initialize the client without parameters:

import { Intouch } from "@freddydrodev/intouch";

// The client will automatically use the environment variables
const intouch = new Intouch();

Method 2: Configuration Object

import { Intouch } from "@freddydrodev/intouch";

// Initialize the client with a configuration object
const intouch = new Intouch({
  agentCode: "your_agent_code",
  partnerId: "your_partner_id",
  loginApi: "your_login_api",
  passwordApi: "your_password_api",
  username: "your_username",
  password: "your_password",
});

Method 3: Individual Parameters

import { Intouch } from "@freddydrodev/intouch";

// Initialize the client with individual parameters
const intouch = new Intouch(
  "your_agent_code",
  "your_partner_id",
  "your_login_api",
  "your_password_api",
  "your_username",
  "your_password"
);

Configuration

Environment Variables (Recommended)

| Variable | Description | Required | | ---------------------- | ---------------------------------- | -------- | | INTOUCH_AGENT_CODE | Your Intouch agent code | Yes | | INTOUCH_PARTNER_ID | Your partner ID | Yes | | INTOUCH_LOGIN_API | API login credentials | Yes | | INTOUCH_PASSWORD_API | API password credentials | Yes | | INTOUCH_CI_USERNAME | Username for digest authentication | Yes | | INTOUCH_CI_PASSWORD | Password for digest authentication | Yes |

Configuration Object Interface

interface IntouchConfig {
  agentCode: string; // Your Intouch agent code
  partnerId: string; // Your partner ID
  loginApi: string; // API login credentials
  passwordApi: string; // API password credentials
  username: string; // Username for digest authentication
  password: string; // Password for digest authentication
}

Features

  • 🔐 Secure authentication handling
  • 💸 Easy payment processing
  • 📱 Mobile money integration
  • 🔄 Automatic retry mechanism
  • 📝 TypeScript support
  • ⚡ Promise-based API
  • 🛡️ Error handling

Usage Examples

Check Balance

// Get your current balance
const balance = await intouch.balance.get();

Cash Out Operations

// Orange Money Cash Out
await intouch.cashout.OM_CI();

// Moov Money Cash Out
await intouch.cashout.MOOV_CI();

// MTN Mobile Money Cash Out
await intouch.cashout.MTN_CI();

// Wave Money Cash Out
await intouch.cashout.WAVE_CI();

Cash In Operations

// Orange Money Cash In
await intouch.cashin.OM_CI();

// Moov Money Cash In
await intouch.cashin.MOOV_CI();

// MTN Mobile Money Cash In
await intouch.cashin.MTN_CI();

// Wave Money Cash In
await intouch.cashin.WAVE_CI();

Requirements

  • Node.js version 16 or higher
  • TypeScript (if using TypeScript)

Development

Prerequisites

  • Node.js (version 16 or higher)
  • npm, yarn, or pnpm

Setup

  1. Clone the repository:
git clone https://github.com/freddydrodev/intouch.git
cd intouch
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install

Building

The library uses tsup for building. To build the library:

npm run build
# or
yarn build
# or
pnpm build

This will:

  • Compile TypeScript to JavaScript
  • Generate type definitions
  • Create both CommonJS and ESM builds
  • Output to the dist directory

Development

To start development with watch mode:

npm run dev
# or
yarn dev
# or
pnpm dev

Testing

npm run test
# or
yarn test
# or
pnpm test

Project Structure

intouch/
├── src/           # Source files
├── dist/          # Build output
├── tests/         # Test files
├── tsup.config.ts # Build configuration
└── tsconfig.json  # TypeScript configuration

Path Aliases

The project uses path aliases for cleaner imports. You can import files using the @ alias:

// Instead of
import { something } from "../../components/something";

// You can use
import { something } from "@/components/something";

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please open an issue on GitHub.