0.3.29 • Published 3 years ago

ml-bootstrap v0.3.29

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

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 git@github.com: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/oss-lab-bootstrap@0.1.0 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
  • integrate with pisp work
  • dynamic settlement account id
  • bootstrap only one participant by name
  • allow a hub to specify more than one currency
0.3.29

3 years ago

0.3.28

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.17

3 years ago

0.3.20

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago