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

mojaloop-simulator

v15.5.2

Published

A canonical test example implementation of the parties, transfers and quotes resources of the Mojaloop FSP Interoperability API

Readme

mojaloop simulator

Git Commit Git Releases Docker pulls CircleCI

The code in this repo, along with the Mojaloop SDK Example Scheme Adapter, intends to simulate an exemplary FSP. It is a generic simulator, an implementation of the FSPIOP spec. It is intended to be used both locally, by prospective scheme participants to validate their FSPIOP implementations, and hosted in a cloud to validate a switch implementation. The objective of these use cases is to ease DFSP backend development and integration with the Mojaloop switch.

It is also intended to be used by the Scheme implementing Mojaloop itself to validate prospective participants' implementations before inclusion in the scheme. To these ends, it intends to behave as a stand-alone implementation of the Mojaloop switch, or as a participant in a Mojaloop scheme.

This simulator has two interfaces; the FSPIOP interface for FSP simulation (which is exposed via the Mojaloop SDK Scheme Adapter); and the configuration and control interface (aka Test API). The Test API allows a user to configure the simulator as well as to initiate FSP behaviours, such as quote requests, in order to exercise another FSPIOP implementation.

A diagram showing the logical architecture of the simulator in a test scenario can be found here

Use

Deploy with Helm and init containers (optional)

Three init containers,

are provided for optional use and may make an automated deployment via Helm chart easier than otherwise. Please see the example config.

Pre-requisites

  1. docker
  2. docker-compose

Build

From the ./src directory:

docker-compose build

Run (Local)

From the ./src directory:

docker-compose up

Configure

A sample simulator configuration is given in the file .env. A sample scheme adapter configuration is given in the file scheme-adapter.env.

Configuration of parties and test execution steps is via...TODO

APIs

The simulator exposes a Mojaloop API endpoint. An openapi specification can be found here: ./src/simulator/api.yaml.

The simulator Test API specification can be found here: ./src/test-api/api.yaml.

Test API

The test API enables a user to trigger outgoing requests (from the simulator to another Mojaloop API enabled peer) via the /scenarios endpoint.

Finding container IP addresses

$ docker ps
CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS               NAMES
1598270a6a8d        mojaloop-simulator-backend                      "/bin/sh -c 'node /s…"   7 minutes ago       Up 7 minutes        3000-3001/tcp       src_sim_1
61d2e85d6432        modusbox/mojaloop-sdk-scheme-adapter:latest   "node /src/index.js"     7 minutes ago       Up 7 minutes        3000/tcp            src_scheme-adapter_1
1839f939f79e        redis:5.0.4-alpine                            "docker-entrypoint.s…"   7 minutes ago       Up 7 minutes        6379/tcp            src_redis_1
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' src_sim_1
172.20.0.4

Example request

An example request that triggers and confirms an outgoing money transfer using Curl is provided below:

CONTAINER_NAME=$(docker ps -f ancestor=mojaloop-simulator-backend --format '{{.Names}}')
SIMULATOR_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$CONTAINER_NAME")
curl -X POST \
  "http://$SIMULATOR_IP:3003/scenarios" \
  -H 'Content-Type: application/json' \
  -d '[
    {
        "name": "scenario1",
        "operation": "postTransfers",
        "body": {
            "from": {
                "displayName": "James Bush",
                "idType": "MSISDN",
                "idValue": "44123456789"
            },
            "to": {
                "idType": "MSISDN",
                "idValue": "44987654321"
            },
            "amountType": "SEND",
            "currency": "USD",
            "amount": "100",
            "transactionType": "TRANSFER",
            "note": "test payment",
            "homeTransactionId": "123ABC"
        }
    },
    {
        "name": "scenario2",
        "operation": "putTransfers",
        "params": {
            "transferId": "{{scenario1.result.transferId}}"
        },
        "body": {
            "acceptQuote": true
        }
    }
]'

Mutual TLS

Create secrets

Use the script in ./scripts/mutualtls.sh. Secrets will be generated in ./src/secrets

Developing

Build tools

Dirty build, tagged with '-local' (will build clean if you don't have uncommitted local changes):

make

Clean build:

make build_clean

Specifically versioned build (dirty if you have local changes):

make build_clean VER=whatever-you-like

Push to docker hub repo

make push

Run locally

docker-compose up

Unit Tests

npm run test:unit

Integration Tests

docker-compose up -d

# wait until mojaloop-simulator is up and running
npm run test:integration