open-index/open-npm huggingface dataset:
npm package: @mojaloop/als-consent-oracle
Description: An Account Lookup Service Oracle for consents
Author: Kevin Leyow
Latest version: 1.1.7

# ALS Consent Oracle (Work in Progress)
[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/als-consent-oracle.svg?style=flat)](https://github.com/mojaloop/als-consent-oracle/commits/main)
[![Git Releases](https://img.shields.io/github/release/mojaloop/als-consent-oracle.svg?style=flat)](https://github.com/mojaloop/als-consent-oracle/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/als-consent-oracle.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/als-consent-oracle)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/als-consent-oracle.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/als-consent-oracle)
[![CircleCI](https://circleci.com/gh/mojaloop/als-consent-oracle.svg?style=svg)](https://circleci.com/gh/mojaloop/als-consent-oracle)

## Overview

- [Documentation](./docs/README.md)

## Setup

### Clone repo
```bash
git clone git@github.com:mojaloop/als-consent-oracle.git
```

### Improve local DNS resolver
Add the `127.0.0.1   als-consent-oracle.local` entry in your `/etc/hosts` so the _als-consent-oracle_ is reachable on `http://als-consent-oracle.local:3000`. Elsewhere use `http://localhost:3000`

### Install service dependencies
```bash
cd als-consent-oracle
npm ci
```

### Run local dockerized _als-consent-oracle_
```bash
npm run docker:build
npm run docker:run
```

To check the als-consent-oracle health visit [http://als-consent-oracle.local:3000/health](http://als-consent-oracle.local:3000/health)

### File structure of docker image
```
dist
│
└───config (Mount your default.json config file here)
└───migrations
└───seeds
└───src
└───package.json
logs
node_modules
package-lock.json
package.json (Run package commands with root package.json)
```

### Run locally with database in `docker-compose`

```bash
docker-compose up -d mysql
npm run migrate
npm run start
```


### Updating the OpenApi (Swagger) Spec

We use `multi-file-swagger` to make our swagger files more manageable.

After making changes to the `.yaml` files in `./src/interface/`, update the `swagger.json` file like so:

```bash
    npm run build:openapi
```

> Note: We will likely want to move to swagger 3.0 at some point, and once we do, we will be able to use the [common api snippets](https://github.com/mojaloop/api-snippets) library to factor out common Mojaloop snippets.
> Keep track of [#352 - Update to OpenAPI v3](https://app.zenhub.com/workspaces/pisp-5e8457b05580fb04a7fd4878/issues/mojaloop/mojaloop/352)

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.
npm package: @mojaloop/als-msisdn-oracle-svc
Description: An Account Lookup Service Oracle for MSISDN identifiers
Author: Vijay Kumar
Latest version: 0.0.28

# ALS MSISDN Oracle

Code is based on the [Mojaloop ALS Consent Oracle](https://github.com/mojaloop/als-consent-oracle)

## Setup

### Clone repo
```bash
git clone git@github.com:mojaloop/als-msisdn-oracle-svc.git
```

### Improve local DNS resolver
Add the `127.0.0.1   als-msisdn-oracle-svc.local` entry in your `/etc/hosts` so the _als-msisdn-oracle-svc_ is reachable on `http://als-msisdn-oracle-svc.local:3000`. Elsewhere use `http://localhost:3000`

### Install service dependencies
```bash
cd als-msisdn-oracle-svc
npm ci
```

### Run local dockerized _als-msisdn-oracle-svc_
```bash
npm run docker:build
npm run docker:run
```

To check the als-msisdn-oracle-svc health visit [http://als-msisdn-oracle-svc.local:3000/health](http://als-msisdn-oracle-svc.local:3000/health)

### File structure of docker image
```
dist
│
└───config (Mount your default.json config file here)
└───migrations
└───seeds
└───src
└───package.json
logs
node_modules
package-lock.json
package.json (Run package commands with root package.json)
```

### Run locally with database in `docker-compose`

```bash
docker-compose up -d mysql
npm run migrate
npm run start
```


### Updating the OpenAPI (Swagger) Spec

We use `multi-file-swagger` to make our swagger files more manageable.

After making changes to the `.yaml` files in `./src/interface/`, update the `swagger.json` file like so:

```bash
    npm run build:openapi
```

> Note: We will likely want to move to swagger 3.0 at some point, and once we do, we will be able to use the [common api snippets](https://github.com/mojaloop/api-snippets) library to factor out common Mojaloop snippets.
> Keep track of [#352 - Update to OpenAPI v3](https://app.zenhub.com/workspaces/pisp-5e8457b05580fb04a7fd4878/issues/mojaloop/mojaloop/352)

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.
npm package: @mojaloop/als-static-oracle-svc
Description: An Account Lookup Service Oracle based on static configuration
Author: Vijay Kumar
Latest version: 0.0.30

# ALS Static Oracle

## Setup

### Clone repo
```bash
git clone git@github.com:mojaloop/als-static-oracle-svc.git
```

### Improve local DNS resolver
Add the `127.0.0.1   als-static-oracle-svc.local` entry in your `/etc/hosts` so the _als-static-oracle-svc_ is reachable on `http://als-static-oracle-svc.local:3000`. Elsewhere use `http://localhost:3000`

### Install service dependencies
```bash
cd als-static-oracle-svc
npm ci
```

### Run local dockerized _als-static-oracle-svc_
```bash
npm run docker:build
npm run docker:run
```

To check the als-static-oracle-svc health visit [http://als-static-oracle-svc.local:3000/health](http://als-static-oracle-svc.local:3000/health)


### Run locally

```bash
docker-compose up -d mysql
npm run migrate
npm run start
```


### Updating the OpenAPI (Swagger) Spec

We use `multi-file-swagger` to make our swagger files more manageable.

After making changes to the `.yaml` files in `./src/interface/`, update the `swagger.json` file like so:

```bash
    npm run build:openapi
```

> Note: We will likely want to move to swagger 3.0 at some point, and once we do, we will be able to use the [common api snippets](https://github.com/mojaloop/api-snippets) library to factor out common Mojaloop snippets.
> Keep track of [#352 - Update to OpenAPI v3](https://app.zenhub.com/workspaces/pisp-5e8457b05580fb04a7fd4878/issues/mojaloop/mojaloop/352)

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.
npm package: @mojaloop/auditing-bc-public-types-lib
Description: mojaloop auditing common types
Latest version: 0.5.5

# auditing common types 

[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/auditing-bc.svg?style=flat)](https://github.com/mojaloop/auditing-bc/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/auditing-bc.svg?style=flat)](https://github.com/mojaloop/auditing-bc/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop-poc/auditing-bc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop-poc/auditing-bc)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/auditing-bc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop-poc/auditing-bc)
[![CircleCI](https://circleci.com/gh/mojaloop/auditing-bc.svg?style=svg)](https://circleci.com/gh/mojaloop/auditing-bc)

Mojaloop Auditing Platform Shared Library

## Usage

### Install Node version

More information on how to install NVM: https://github.com/nvm-sh/nvm

```bash
nvm install
nvm use
```

### Install Dependencies

```bash
npm install
```

## Build

```bash
npm run build
```

## Run

```bash
npm run start
```

## Unit Tests

```bash
npm run test:unit
```
npm package: @mojaloop/auth-service
Description: Shared Authorization Service for the Third Party Transaction Verification
Author: lewisdaly
Latest version: 15.2.7

# Auth Service (Work in Progress)
[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/auth-service.svg?style=flat)](https://github.com/mojaloop/auth-service/commits/main)
[![Git Releases](https://img.shields.io/github/release/mojaloop/auth-service.svg?style=flat)](https://github.com/mojaloop/auth-service/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/auth-service.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/auth-service)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/auth-service.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/auth-service)
[![CircleCI](https://circleci.com/gh/mojaloop/auth-service.svg?style=svg)](https://circleci.com/gh/mojaloop/auth-service)

Mojaloop central AuthZ + AuthN service. Currently for FIDO implementation in a Mojaloop switch.

## Overview

- [Documentation](./docs/README.md)

## Setup

### Clone repo
```bash
git clone git@github.com:mojaloop/AuthService.git
```

### Improve local DNS resolver
Add the `127.0.0.1   auth-service.local` entry in your `/etc/hosts` so the _auth-service_ is reachable on `http://auth-service.local:4004`. Elsewhere use `http://localhost:4004`

### Install service dependencies
```bash
cd auth-service
npm ci
```

### Run local dockerized _auth-service_
```bash
npm run docker:build
npm run docker:run
```

To check the auth-service health visit [http://auth-service.local:4004/health](http://auth-service.local:4004/health)

### Run locally with database in `docker-compose` 

```bash
docker-compose up -d mysql
npm run migrate
npm run start
```


### Updating the OpenApi (Swagger) Spec

We use `multi-file-swagger` to make our swagger files more manageable.

After making changes to the `.yaml` files in `./src/interface/`, update the `swagger.json` file like so:

```bash
    npm run build:openapi
```

> Note: We will likely want to move to swagger 3.0 at some point, and once we do, we will be able to use the [common api snippets](https://github.com/mojaloop/api-snippets) library to factor out common Mojaloop snippets.
> Keep track of [#352 - Update to OpenAPI v3](https://app.zenhub.com/workspaces/pisp-5e8457b05580fb04a7fd4878/issues/mojaloop/mojaloop/352)

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.
npm package: @mojaloop/bulk-api-adapter
Description: Mojaloop Bulk API Adapter
Author: ModusBox
Latest version: 17.2.6

# bulk-api-adapter
[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/bulk-api-adapter.svg?style=flat)](https://github.com/mojaloop/bulk-api-adapter/commits/main)
[![Git Releases](https://img.shields.io/github/release/mojaloop/bulk-api-adapter.svg?style=flat)](https://github.com/mojaloop/bulk-api-adapter/releases)
[![Docker pulls](https://img.shields.io/docker/pulls/mojaloop/bulk-api-adapter.svg?style=flat)](https://hub.docker.com/r/mojaloop/bulk-api-adapter)
[![CircleCI](https://circleci.com/gh/mojaloop/bulk-api-adapter.svg?style=svg)](https://app.circleci.com/pipelines/github/mojaloop/bulk-api-adapter)

Bulk Transfers API and notifications.

## API Definition

Swagger API [location](./src/interface/swagger.yaml)

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.

## Container Scans

As part of our CI/CD process, we use anchore-cli to scan our built docker container for vulnerabilities upon release.

If you find your release builds are failing, refer to the [container scanning](https://github.com/mojaloop/ci-config#container-scanning) in our shared Mojaloop CI config repo. There is a good chance you simply need to update the `mojaloop-policy-generator.js` file and re-run the circleci workflow.

For more information on anchore and anchore-cli, refer to:
- [Anchore CLI](https://github.com/anchore/anchore-cli)
- [Circle Orb Registry](https://circleci.com/orbs/registry/orb/anchore/anchore-engine)
npm package: @mojaloop/callback-handler-simulator-svc
Description: High performance callback handler simulator service for Mojaloop
Author: Kevin Leyow
Latest version: 0.1.13

# Callback Handler Simulator

## Environment variables used by handler

| ENV variable name                  | Type    | Description                                                    | Handler | Default                            |
| --------                           | ------- | --------                                                       | ------- | -------                            |
| CBH_FSPIOP_ALS_ENDPOINT_URL        | string  | Endpoint URL for ALS callback                                  | fspiop  | http://account-lookup-service:4002 |
| CBH_FSPIOP_FSP_ID                  | string  | FSP_ID to be used in fspiop-source headers and in ALS callback | fspiop  | perffsp2                           |
| CBH_FSPIOP_CALLBACK_HTTP_KEEPALIVE | boolean | HTTP keepalive for callbacks                                   | fspiop  | true                               |
| CBH_FORKS                          | number  | Number of cluster forks to create                              | *       | 1                                  |
npm package: @mojaloop/central-fraud-sharing
Description: A series of services designed to offer the participants an avenue to share end user and transactional information to help promote overall health of the scheme via fraud prevention.
Latest version: 1.1.0-snapshot.4

# central-fraud-sharing
***
A series of services designed to offer the participants an avenue to share end user and transactional information to help promote overall health of the scheme via fraud prevention.
npm package: @mojaloop/central-services-auth
Description: Authentication module for central services
Author: Dwolla
Latest version: 5.2.1
Deprecated: This library has been deprecated

# central-services-auth
Share authentication and authorization code for central services

Registering this module with hapi with install an authentication scheme with the name `'basic'`

Basic authentication requires validating a username and password combination. The `'basic'` scheme takes the following options:

- `validate` - (required) a user lookup and password validation function with the signature `function(request, username, password, callback)` where:
    - `request` - is the hapi request object of the request which is being authenticated.
    - `username` - the username received from the client.
    - `password` - the password received from the client.
    - `callback` - a callback function with the signature `function(err, isValid, credentials)` where:
        - `err` - an internal error.
        - `isValid` - `true` if both the username was found and the password matched, otherwise `false`.
        - `credentials` - a credentials object passed back to the application in `request.auth.credentials`. Typically, `credentials` are only
          included when `isValid` is `true`, but there are cases when the application needs to know who tried to authenticate even when it fails
          (e.g. with authentication mode `'try'`).

```javascript
const Bcrypt = require('bcrypt');

const users = {
    john: {
        username: 'john',
        password: '$2a$10$iqJSHD.BGr0E2IxQwYgJmeP3NvhPrXAeLSaGCj6IR/XU5QtjVu5Tm',   // 'secret'
        name: 'John Doe',
        id: '2133d32a'
    }
};

const validate = function (request, username, password, callback) {

    const user = users[username];
    if (!user) {
        return callback(null, false);
    }

    Bcrypt.compare(password, user.password, (err, isValid) => {

        callback(err, isValid, { id: user.id, name: user.name });
    });
};

server.register(require('@@mojaloop/central-services-shared'))

server.auth.strategy('simple', 'basic', { validate: validate });
server.route({ method: 'GET', path: '/', config: { auth: 'simple' } });

```
npm package: @mojaloop/central-services-error-handling
Description: Hapi error handling module
Author: ModusBox
Latest version: 13.1.6

# central-services-error-handling

[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/central-services-error-handling.svg?style=flat)](https://github.com/mojaloop/central-services-error-handling/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/central-services-error-handling.svg?style=flat)](https://github.com/mojaloop/central-services-error-handling/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/central-services-error-handling.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/central-services-error-handling)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/central-services-error-handling.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/central-services-error-handling)
[![CircleCI](https://circleci.com/gh/mojaloop/central-services-error-handling.svg?style=svg)](https://circleci.com/gh/mojaloop/central-services-error-handling)

Hapi error handling module

## Auditing Dependencies

We use `audit-ci` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-ci.jsonc` file.

To start a new resolution process, run:

```bash
npm run audit:fix
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

The [audit-ci.jsonc](./audit-ci.jsonc) contains any audit-exceptions that cannot be fixed to ensure that CircleCI will build correctly.

## Automated Releases

As part of our CI/CD process, we use a combination of CircleCI, standard-version
npm package and github-release CircleCI orb to automatically trigger our releases
and image builds. This process essentially mimics a manual tag and release.

On a merge to master, CircleCI is configured to use the mojaloopci github account
to push the latest generated CHANGELOG and package version number.

Once those changes are pushed, CircleCI will pull the updated master, tag and
push a release triggering another subsequent build that also publishes a docker image.

### Potential problems

* There is a case where the merge to master workflow will resolve successfully, triggering
  a release. Then that tagged release workflow subsequently failing due to the image scan,
  audit check, vulnerability check or other "live" checks.

  This will leave master without an associated published build. Fixes that require
  a new merge will essentially cause a skip in version number or require a clean up
  of the master branch to the commit before the CHANGELOG and bump.

  This may be resolved by relying solely on the previous checks of the
  merge to master workflow to assume that our tagged release is of sound quality.
  We are still mulling over this solution since catching bugs/vulnerabilities/etc earlier
  is a boon.

* It is unknown if a race condition might occur with multiple merges with master in
  quick succession, but this is a suspected edge case.
npm package: @mojaloop/deploytest
Description: Basic CI test for the mojaloop project. Warning: this package may be unpublished - do not depend on it!
Author: Bill Hodghead
Latest version: 0.3.9

Deploytest shows a sample repo hooked up to CircleCI and deploying to NPM
This is a basic CI test for the mojaloop project. 
Warning: this package may be unpublished - do not depend on it!
npm package: @mojaloop/dfsp-admin
Description: DFSP Admin
Author: Stamen Peev
Latest version: 0.17.45

# DFSP-Admin

## Summary ##

This service is used as a main interface for the users with admin role. Admin panel provide to the users a way to set transaction rules, process bulk payments, check queues with action notifications and etc. 

## Access

The admin panel is accessible only with admin credentials on [http://localhost:8020](http://localhost:8020 "http://localhost:8020") path where dfsp-admin service is hosted.

***Note***
The are roles associated with the admins in order to upload, verify and process bulk payments. More about bulk payments will follow in this document. 


## Bulk Payment Initiation

In the admin portal there is an interface available where every user (with certain user rights) of the DFSP can login with user number and PIN and initiate a bulk payment.

When initiating a bulk payment the user is able to select an account from which the bulk payments will be send.

L1P is supporting upload of the bulk file with payments from a web interface. The file format should be .csv. The fields in the file will be:

- Sequence Number (row)
- Identifier
- First Name
- Last Name
- Date of birth
- National id
- Amount

## Maker/Checker

There is a maker/checker concept implemented for bulk payments. Maker and Checker are roles that can be assigned to different users. Maker role is going to upload the file with the bulk payments and checker role is going to initiate the bulk payments.

***Note*** 

In order to login in the admin interface with maker role use the following pattern `userIdentifier@role`
Example: 
1. 10121416@maker - for login with maker role
2. 10121416@checker - for login with checker role

## Bulk File Verification

All the fields in the bulk file are mandatory. In case the some of the required fields are not valid the funds will not be disbursed to this user.

## Handling Fees

The discriminatory fees should be recorded in the same way as it is done for a regular transaction - different row in the ledger for each payment. There is possibility to configure different fees per different transaction type, so there could be special set of fee configured for the bulk payments.
The rational behind having the fees recorded as a separate line for each transaction is:

- Calculation and record of the discriminatory fees are done within the DFSP and we do not foresee any performance issues to come from that approach.

- The fees must be recorded as a separate row in the ledger

## Re-sending of Funds in Case a Temporary Error is Detected

Upon sending bulk payments the system is detecting temporary errors and retry sending of funds again to those user.

Temporary errors could be technical such as missing connectivity or some service is down or non technical such as not enough funds in the account, tier limit is hit, etc.

When initiating a bulk payment the system allow entering of the start date when the bulk payments will start and the end date after which the bulk report will be finalized and no more retries to recover from temporary errors will be done.
npm package: @mojaloop/dfsp-directory
Description: DFSP directory service
Author: Kalin Krustev
Latest version: 0.7.30

# DFSP-Directory service

## Summary ##

This service is used to store and manipulate all the data related to the users in the DFSP. When a new user is registered thru the USSD menu it is registered in this service in order all other dfsp-services to be able to refer to him. The data is distributed in the following tables: identifier, identifierType and user.

### For each user are stored the following fields: 
    - His actor ID in the system - actorId;
    - First name - firstName;
    - Last name - lastName;
    - Date of birth- dob;
    - National ID - nationalId;

### For each record in identifier table are stored the following fields:
    - Identifier id - identifierId;
    - Identifier itself - identifier;
    - Actor ID - actorId, which is reference to the user table by actorId;
    - Identifier type code - identifierTypeCode, which is reference to the identifierType table by code;

In the identifierType table are stored all the identifier types, which for the current moment are 'eur' and 'phn'. Each record here has unique code with provided name and description.

## DFSP-directory supported methods ##
    - user add - add new record with user;
    - user fetch - fetch users by some criteria, this may return more than one result;
    - user get - return one particular user details by given unique combination of (identifier & identifierType) or by given actorId which is also unique per each dfsp.
npm package: @mojaloop/dfsp-subscription
Description: DFSP Subscription service
Author: Stamen Peev
Latest version: 0.5.12

# Subscription service API

-----

This service is used for mapping between the users and phone numbers. It is supporting the following **private** API calls:

### Add subscription ###

* **URL**

  `/rpc/subscription/subscription/add`

* **Method**

  `POST`

* **Data Params**

  **Required**

   * `actorId [string] - Actor id`
   * `phoneNumber [string] - Phone number`
 
* **Success Response**

  * **Code:** 200 <br />
    **Content**
       * `subscriptionId [number] - Subscription id`
       * `actorId [string] - Actor id`
       * `phoneNumber [string] - Phone number`


### Get subscription ###

* **URL**

  `/rpc/subscription/subscription/get`

* **Method**

  `POST`

* **Data Params**

  **Optional**

   * `actorId [string] - Actor id`
   * `phoneNumber [string] - Phone number`
 
* **Success Response**

  * **Code:** 200 <br />
    **Content**
       * `actorId [string] - Actor id`
       * `phoneNumber [string] - Phone number`


### Remove subscription ###

* **URL**

  `/rpc/subscription/subscription/remove`

* **Method**

  `POST`

* **Data Params**

  **Optional**

   * `subscriptionId [number] - Subscription id`
 
* **Success Response**

  * **Code:** 200 <br />
    **Content**
       * `subscriptionId [number] - Subscription id`
npm package: @mojaloop/finance-portal-lib
Description: Shared code for finance portal backends.
Latest version: 1.0.0

# finance-portal-lib
[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/finance-portal-lib.svg?style=flat)](https://github.com/mojaloop/finance-portal-lib/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/finance-portal-lib.svg?style=flat)](https://github.com/mojaloop/finance-portal-lib/releases)
[![CircleCI](https://circleci.com/gh/mojaloop/finance-portal-lib.svg?style=svg)](https://circleci.com/gh/mojaloop/finance-portal-lib)
[![NPM](https://nodei.co/npm/@mojaloop/finance-portal-lib.png)](https://nodei.co/npm/@mojaloop/finance-portal-lib/)

Shared code for finance portal utilities.
npm package: @mojaloop/forensic-logging-client
Description: Client for connecting to forensic-logging-sidecar
Author: ModusBox
Latest version: 8.3.0

# forensic-logging-client
A client library used to connect to the forensic-logging-sidecar

## Installation
You must have setup connection to the @mojaloop npm repo on JFrog in order to install.
`npm install @mojaloop/forensic-logging-client`

## Usage
To use the forensic logging client, you only need to require it in the file where you want to use the sidecar.

```
'use strict'

const Client = require('@mojaloop/forensic-logging-client')

function connectAndWrite(message) {
  const sidecar = Client.create({
      host: localhost,
      port: 5678,
      connectTimeout: 30000,
      reconnectInterval: 5000
    })
  }

  sidecar.connect().then(() => {
    sidecar.write(message)
  }).catch(err =>{

  })
}
```

## API

### create(settings)
Creates a new sidecar client.

- `settings` {Object}
  - `host` {String} The hostname or IP address of the Sidecar Client server. Defaults to 'localhost'.
  - `port` {Number} The port for the Sidecar. Defaults to 5678.
  - `connectTimeout` {Number} The time, in milliseconds, to timeout a connection attempt to the Sidecar. Defaults to 30000.
  - `reconnectInterval` {Number} The time, in milliseconds, between connection attempts to the Sidecar. Defaults to 5000.
  
### sidecarClient.connect()
Connects to the sidecar, returns a promise.
The promise will be rejected with an error if it can't connect to the sidecar.

### sidecarClient.write(message)
Writes a message to the sidecar, returns nothing.

- `message` {String} The message to send to the Sidecar.

This method will throw an error if the sidecar has yet to be connected to.
npm package: @mojaloop/inter-scheme-proxy-cache-lib
Description: Common component, that provides scheme proxy caching mapping (ISPC)
Author: Eugen Klymniuk
Latest version: 2.10.0

# @mojaloop/inter-scheme-proxy-cache-lib

`inter-scheme-proxy-cache-lib` is a common component that provides proxy caching mapping.
It helps reliably integrate proxy functionality throughout the all involved services.

## CI/CD

This repository uses the [mojaloop/build](https://github.com/mojaloop/ci-config-orb-build) CircleCI orb for standardized CI/CD workflows, including automated Grype vulnerability scanning for source code security.

## Use cases:
 - Proxy caching. (see [details](https://github.com/infitx-org/uml_diagrams/blob/main/Proxy/Proxy%20pattern%20-%20happy%20path.png))
 - Failure count cache with max failure count per {Id}. (see [details](https://github.com/infitx-org/uml_diagrams/blob/main/Proxy/Proxy%20pattern%20-%20Lazy%20Discovery%20-%20No%20Oracles.png))

## Quick Start

### Installation

```bash
npm install @mojaloop/inter-scheme-proxy-cache-lib
```

### Basic Usage

```typescript
// ESM
import { createProxyCache, STORAGE_TYPES } from '@mojaloop/inter-scheme-proxy-cache-lib';
// CJS
const { createProxyCache } = require('@mojaloop/inter-scheme-proxy-cache-lib');

// Redis Cluster
const proxyCacheCluster = createProxyCache(STORAGE_TYPES.redisCluster, {
  cluster: [
    { host: 'localhost', port: 6379 },
    { host: 'localhost', port: 6380 },
    { host: 'localhost', port: 6381 },
  ],
  // Optional: username, password, etc.
});

// Single Redis instance
const proxyCache = createProxyCache(STORAGE_TYPES.redis, {
  host: 'localhost',
  port: 6379,
  // Optional: username, password, db, etc.
});

await proxyCache.connect();

// Basic DFSP to proxy mapping
await proxyCache.addDfspIdToProxyMapping('dfsp_1', 'proxyAB');
const proxyId = await proxyCache.lookupProxyByDfspId('dfsp_1');
```

---
### API docs
Check [_IProxyCache_](https://mojaloop.github.io/inter-scheme-proxy-cache-lib/interfaces/IProxyCache.html) interface docs to get more details.

Comprehensive and interactive API documentation, based on TypeScript source code of the package,
could be found [**here**](https://mojaloop.github.io/inter-scheme-proxy-cache-lib)

### Configuration

#### Storage Types
The library supports the following storage types:

- `STORAGE_TYPES.redis` - Single Redis instance
- `STORAGE_TYPES.redisCluster` - Redis cluster configuration
- `STORAGE_TYPES.mysql` - MySQL storage (not implemented yet)

#### Environment Variables
| Env Variable Name           | Default Value | Description                        |
|-----------------------------|---------------|------------------------------------|
| PROXY_CACHE_LOG_LEVEL       | `warn`        | The log level for the proxyCache |
| PROXY_CACHE_DEFAULT_TTL_SEC | `20`          | Default cache TTL for sendToProxiesList keys |


### Requirements

- Node.js >= 22.15.0

---
## Development

### Build

Command to transpile Typescript into JS:

```bash
npm run build
```

### Tests

```bash
npm test
```

### Generate Typedoc documentation

```bash
npm run docs
```

## Collaborators

- [Eugen Klymniuk](https://github.com/geka-evk)
npm package: @mojaloop/ml-jws-health-check-svc
Description: Typescript Mojaloop project template
Author: lewisdaly
Latest version: 0.1.3

# Ping pong service

[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/ml-jws-health-check-svc.svg?style=flat)](https://github.com/mojaloop/ml-jws-health-check-svc/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/ml-jws-health-check-svc.svg?style=flat)](https://github.com/mojaloop/ml-jws-health-check-svc/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/ml-jws-health-check-svc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-jws-health-check-svc)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/ml-jws-health-check-svc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-jws-health-check-svc)
[![CircleCI](https://circleci.com/gh/mojaloop/ml-jws-health-check-svc.svg?style=svg)](https://circleci.com/gh/mojaloop/ml-jws-health-check-svc)

This service is responsible for validating the mutual TLS (mTLS) setup,
JSON Web Signature (JWS) functionality, and network connectivity with a Mojaloop hub.

It ensures that the necessary security and communication protocols are correctly
configured and operational, which is critical for secure and reliable interactions
with the Mojaloop ecosystem.

## Contributing

Refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for information on how to contribute, committing changes, releases and snapshots.

## Pre-requisites

### Install dependencies

```bash
npm install
```

## Build

Command to transpile Typescript into JS:

```bash
npm run build
```

Command to LIVE transpile Typescript into JS live when any changes are made to the code-base:

```bash
npm run watch
```

## Run

```bash
npm start
```

## Tests

```bash
npm test
```
npm package: @mojaloop/ml-ory-iam-services
Description: Mojaloop Ory IAM Services - Keto batch auth proxy and Kratos role webhook
Author: Mojaloop Foundation
Latest version: 0.1.1

# Mojaloop Ory IAM Services

This repository contains Ory IAM integration services for Mojaloop:

- **keto-batch-auth** - Proxy for Keto batch authorization checks
- **kratos-role-webhook** - Webhook to inject roles into Kratos identities

## Quick Start

```bash
# Install dependencies
npm install

# Build
npm run build

# Run a service
npm start keto-batch-auth
npm start kratos-role-webhook

# Show help
npm start -- --help
```

## Services

### keto-batch-auth

Proxy service for Keto's batch authorization check API. Returns 200 if any permission is allowed, 403 otherwise.

**Environment Variables:**
| Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | `3000` | Server port |
| `KETO_READ_URL` | `http://keto-read.ory.svc.cluster.local` | Keto read API URL |

**Endpoints:**
- `GET /health` - Health check
- `POST /` - Batch authorization check (proxies to Keto)

### kratos-role-webhook

Webhook service that injects user roles from Keto into Kratos identity traits.

**Environment Variables:**
| Variable | Default | Description |
|----------|---------|-------------|
| `PORT` | `8080` | Server port |
| `KRATOS_ADMIN_URL` | `http://kratos-admin` | Kratos admin API URL |
| `KETO_READ_URL` | `http://keto-read` | Keto read API URL |

**Endpoints:**
- `GET /health` - Health check
- `POST /inject-roles` - Inject roles into identity

## Docker

```bash
# Build
docker build -t mojaloop/ml-ory-iam-services .

# Run keto-batch-auth
docker run -p 3000:3000 mojaloop/ml-ory-iam-services keto-batch-auth

# Run kratos-role-webhook
docker run -p 8080:8080 mojaloop/ml-ory-iam-services kratos-role-webhook
```

## Development

```bash
# Run tests
npm test

# Run linter
npm run lint

# Run in development mode
npm run start:dev keto-batch-auth
```

## Helm Chart

The Helm chart is available at [mojaloop/helm/ory-services](https://github.com/mojaloop/helm/tree/main/ory-services).

## License

Apache-2.0
npm package: @mojaloop/ml-participant-connection-test-svc
Description: Typescript Mojaloop project template
Author: lewisdaly
Latest version: 0.1.17

# Ping pong service

[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/ml-participant-connection-test-svc.svg?style=flat)](https://github.com/mojaloop/ml-participant-connection-test-svc/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/ml-participant-connection-test-svc.svg?style=flat)](https://github.com/mojaloop/ml-participant-connection-test-svc/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/ml-participant-connection-test-svc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-participant-connection-test-svc)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/ml-participant-connection-test-svc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-participant-connection-test-svc)
[![CircleCI](https://circleci.com/gh/mojaloop/ml-participant-connection-test-svc.svg?style=svg)](https://circleci.com/gh/mojaloop/ml-participant-connection-test-svc)

This service is responsible for validating the mutual TLS (mTLS) setup,
JSON Web Signature (JWS) functionality, and network connectivity with a Mojaloop hub.

It ensures that the necessary security and communication protocols are correctly
configured and operational, which is critical for secure and reliable interactions
with the Mojaloop ecosystem.

## Contributing

Refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for information on how to contribute, committing changes, releases and snapshots.

## Pre-requisites

### Install dependencies

```bash
npm install
```

## Build

Command to transpile Typescript into JS:

```bash
npm run build
```

Command to LIVE transpile Typescript into JS live when any changes are made to the code-base:

```bash
npm run watch
```

## Run

```bash
npm start
```

## Tests

```bash
npm test
```
npm package: @mojaloop/ml-schema-validator
Description: Mojaloop library that contains Joi schema validations that align with the Mojaloop API
Author: ModusBox
Latest version: 9.5.0

# ml-schema-validator
[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/ml-schema-validator.svg?style=flat)](https://github.com/mojaloop/ml-schema-validator/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/ml-schema-validator.svg?style=flat)](https://github.com/mojaloop/ml-schema-validator/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop/ml-schema-validator.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-schema-validator)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/ml-schema-validator.svg?style=flat)](https://www.npmjs.com/package/@mojaloop/ml-schema-validator)
[![CircleCI](https://circleci.com/gh/mojaloop/ml-schema-validator.svg?style=svg)](https://circleci.com/gh/mojaloop/ml-schema-validator)

Shared Joi validation code for Mojaloop services

Contents:

- [Usage](#usage)
- [Tests](#tests)

## Usage
The library supports both Joi validation >= version 17.
To use the library you can import it into your project

## Tests

Currently test coverage will automatically pass at 100% because these are just objects, I would always suggest creating a JSON and create a test against the schema if you are contributing. Both positive and negative scenarios 

Running the tests:

    npm run test
    npm run test:unit
    npm run test:coverage
    npm run test:coverage-check
        
Tests include code coverage. See the test/unit/ folder for testing scripts.

## Auditing Dependencies

We use `npm-audit-resolver` along with `npm audit` to check dependencies for vulnerabilities, and keep track of resolved dependencies with an `audit-resolve.json` file.

To start a new resolution process, run:
```bash
npm run audit:resolve
```

You can then check to see if the CI will pass based on the current dependencies with:
```bash
npm run audit:check
```

And commit the changed `audit-resolve.json` to ensure that CircleCI will build correctly.
npm package: @mojaloop/ml-testing-toolkit-shared-lib
Description: Shared library for ml-testing-toolkit re-usable functions
Author: Vijaya Kumar Guthi, ModusBox Inc.
Latest version: 14.3.3

# ml-testing-toolkit-shared-lib
Library for shared code between Mojaloop testing-toolkit backend and frontend

## Auditing Dependencies

We use `npm-audit-resolver` along with `npm audit` to check dependencies for node vulnerabilities, and keep track of resolved dependencies with an `audit-resolve.json` file.

To start a new resolution process, run:

```bash
npm run audit:resolve
```

You can then check to see if the CI will pass based on the current dependencies with:

```bash
npm run audit:check
```

And commit the changed `audit-resolve.json` to ensure that CircleCI will build correctly.

## Container Scans

As part of our CI/CD process, we use anchore-cli to scan our built docker container for vulnerabilities upon release.

If you find your release builds are failing, refer to the [container scanning](https://github.com/mojaloop/ci-config#container-scanning) in our shared Mojaloop CI config repo. There is a good chance you simply need to update the `mojaloop-policy-generator.js` file and re-run the circleci workflow.

For more information on anchore and anchore-cli, refer to:
- [Anchore CLI](https://github.com/anchore/anchore-cli)
- [Circle Orb Registry](https://circleci.com/orbs/registry/orb/anchore/anchore-engine)

## Automated Releases

As part of our CI/CD process, we use a combination of CircleCI, standard-version
npm package and github-release CircleCI orb to automatically trigger our releases
and image builds. This process essentially mimics a manual tag and release.

On a merge to main, CircleCI is configured to use the mojaloopci github account
to push the latest generated CHANGELOG and package version number.

Once those changes are pushed, CircleCI will pull the updated main, tag and
push a release triggering another subsequent build that also publishes a docker image.
npm package: @mojaloop/oracle-shared-library
Description: Shared library to create Oracles
Author: Bank of Tanzania
Latest version: 8.5.0

# Shared-als-oracle


Shared code for Account Lookup Oracles

- [Deployment](#deployment)
- [Environmental_Variables](#Environmental variables)
- [Usage](#usage)
- [Tests](#tests)

## Deployment

TBA

## Environmental_Variables

Currently all is set into the config.

## Usage

Import Shared Oracle Library library:
```javascript
const  sharedOracle  = require('@mojaloop/oracle-shared-library')
```

Instantiate required class:
```javascript
let OracleServer = new sharedOracle.OracleServer()
```

Initialize server method to start oracle with default config:
```JAVASCRIPT
OracleServer.initialize()

```

Usage example with default config:
Note 1: Server will return not Implemented for all methods, use host machine IP and random Port to start service. 

```javascript
const  sharedOracle  = require('@mojaloop/oracle-shared-library')
let OracleServer = new sharedOracle.OracleServer() 
// You may also start null params in OracleServer()
// let OracleServer = new sharedOracle.OracleServer(null,null,null,null,null) 
OracleServer.initialize()
```

Usage example with Inject all functions and custom server config:
```javascript
const  sharedOracle  = require('@mojaloop/oracle-shared-library')

const createFun = (request) => {
    console.log('create got called');
    return 'create got called'
};
const getFun = (request) => {
    console.log('get got called');
    return 'get got called'
};
const updateFun = (request) => {
    console.log('update got called');
    return 'update got called'
};
const deletFunc = (request) => {
console.log('delete got called');
    return 'delete got called'
};

const postBulkFunc = (request) => {
console.log('post bulk got called');
    return 'post bulk got called'
};
const customConfig = {
    port: 3050,
    host: '0.0.0.0',
    cache: [
      {
        name: 'memCache',
        engine: require('catbox-memory'),
        partition: 'cache'
      } ,
    debug: {
      request: ['error'],
      log: ['error']
    }
  }
let OracleServer = new sharedOracle.OracleServer(createFun,getFun,updateFun,deletFunc,postBulkFunc, customConfig)
OracleServer.initialize()
```

Usage example with only account resolution aka get function and custom server config:
Note : Server will start with custom config, get mothod and other methods return unimplemented.
```javascript
const  sharedOracle  = require('@mojaloop/oracle-shared-library')

const getFun = (request) => {
    console.log('get got called');
    return 'get got called'
};

const customConfig = {
    port: 3050,
    host: '0.0.0.0',
    cache: [
      {
        name: 'memCache',
        engine: require('catbox-memory'),
        partition: 'cache'
      } ,
    debug: {
      request: ['error'],
      log: ['error']
    }
  }
let OracleServer = new sharedOracle.OracleServer(null,getFun,null,null,null,customConfig)
OracleServer.initialize()
```

## Tests

Running the tests:

    npm run test:unit
    npm run test:coverage
        
Tests include code coverage via istanbul. See the test/unit/ folder for testing scripts.
npm package: @mojaloop/participant-bc-public-types-lib
Description: mojaloop participants public shared types
Latest version: 0.6.3

# Participants BC - Public Types
Mojaloop vNext Typescript BC Participants Public Types

## Notes

### Install
See notes in root dir of this repository
More information on how to install NVM: https://github.com/nvm-sh/nvm

## Build

```bash
npm run build
```
npm package: @mojaloop/platform-configuration-bc-public-types-lib
Description: Mojaloop Platform Configuration BC public types lib
Latest version: 0.6.3

# Platform Configuration Public Types Lib 

[![Git Commit](https://img.shields.io/github/last-commit/mojaloop/platform-configuration-bc.svg?style=flat)](https://github.com/mojaloop/platform-configuration-bc/commits/master)
[![Git Releases](https://img.shields.io/github/release/mojaloop/platform-configuration-bc.svg?style=flat)](https://github.com/mojaloop/platform-configuration-bc/releases)
[![Npm Version](https://img.shields.io/npm/v/@mojaloop-poc/platform-configuration-bc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop-poc/platform-configuration-bc)
[![NPM Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@mojaloop/platform-configuration-bc.svg?style=flat)](https://www.npmjs.com/package/@mojaloop-poc/platform-configuration-bc)
[![CircleCI](https://circleci.com/gh/mojaloop/platform-configuration-bc.svg?style=svg)](https://circleci.com/gh/mojaloop/platform-configuration-bc)

Mojaloop Platform Configuration public Types Lib