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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ml-bootstrap

v0.3.29

Published

Bootstrapper tool for Mojaloop OSS Lab

Downloads

52

Readme

ml-bootstrap

A handy ts based cli tool for seeding and setting up a Mojaloop Hub based on a config file. No need for Postman scripts, or hacky environment files that you copy and paste around.

Look at ./example/default.json5 for an example config file.

How To -- npm/npx

npx ml-bootstrap

How To -- Local Development

  1. Clone this repo:
git clone [email protected]:vessels-tech/ml-bootstrap.git
cd ml-bootstrap
npm install
  1. Create a new config file, take a look at the ./example/ dir for some examples.

The most important parameters are:

  • urls.fspiop - the location of the FSPIOP API (/parties, /participants, /quotes)
  • urls.alsAdmin - The location of the ALS Admin API - used to register parties
  • urls.centralLedgerAdmin - The location of the central-ledger api - used to register DFSP callback endpoints
  • applicationUrls.oracle - This is used to sell the ALS which oracles to talk to
  1. Run the tool!
npm run ml-bootstrap -- -c /path/to/your/config

For example:

$ npm run ml-bootstrap -- -c ./example/default.json5

> @mojaloop/[email protected] ml-bootstrap /home/lew/developer/mojaloop/ml-bootstrap
> ts-node ./src/cli.ts "-c" "./example/default.json5"



  Running: Hub Steps
  Description: Sets up the hub accounts
  |
  - step: setup `HUB_MULTILATERAL_SETTLEMENT` account
executeRequest failed with status: 400
{
  errorInformation: {
    errorCode: '3003',
    errorDescription: 'Add Party information error - Hub account has already been registered.'
  }
}
  - step: setup `HUB_RECONCILIATION` account
executeRequest failed with status: 400
{
  errorInformation: {
    errorCode: '3003',
    errorDescription: 'Add Party information error - Hub account has already been registered.'
  }
}
  - step: setup `SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL`
  - step: setup `NET_DEBIT_CAP_ADJUSTMENT_EMAIL`
  - step: setup `NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL`
  |
  Hub Steps Passed
  Passed with warnings: 
    - setup `HUB_MULTILATERAL_SETTLEMENT` account: Error, Status: 400 Message: {"errorInformation":{"errorCode":"3003","errorDescription":"Add Party information error - Hub account has already been registered."}}
    - setup `HUB_RECONCILIATION` account: Error, Status: 400 Message: {"errorInformation":{"errorCode":"3003","errorDescription":"Add Party information error - Hub account has already been registered."}}

Some other options include:


# set up only the hub, no participants
npm run ml-bootstrap -- hub -c /path/to/your/config

# bootstrap only the participants
npm run ml-bootstrap -- participants -c /path/to/your/config

# bootstrap only the parties (end users)
npm run ml-bootstrap -- parties -c /path/to/your/config

# bootstrap only a single participant by name
npm run ml-bootstrap -- fspid=figmm -c /path/to/your/config

TODO:

  • [ ] decent logging using central-services-logger
  • [ ] auto release and publish to npm
  • [x] integrate with pisp work
  • [x] dynamic settlement account id
  • [x] bootstrap only one participant by name
  • [ ] allow a hub to specify more than one currency