Contents
- 1. Overview
- 2. Quick Start
- 3. Developing or running this Demo
- 4. Deploying
- 5. Flow
- 6. ISO message schema changes
This repo contains "Team Mojaloop's Incredible Submission" for the ISO20022 Hackathon
Go to http://sim.hackathon2.moja-lab.live/mobilesimulator to see a live demo.
The solution demonstrates a cross-border scenario for peer to peer transfer use-case, from a sender in an ISO20022 based (SWIFT) Scheme to a receiver in a Mojaloop scheme.
Ensure the following is added to your hosts file"
127.0.0.1 hackathon2.moja-lab.live ttk.hackathon2.moja-lab.live ttk-backend.hackathon2.moja-lab.live sim.hackathon2.moja-lab.live gds.hackathon2.moja-lab.live actlog.hackathon2.moja-lab.live senderbank.hackathon2.moja-lab.live mojabank.hackathon2.moja-lab.live
git clone git@github.com:mojaloop/ml-iso-hackathon.git
cd ml-iso-hackathon
docker-compose up
# now go to: [ todo ] in your browser to see it running!
- Senders App
- Senders Bank (ISO (SWIFT) Scheme)
- Moja Bank (Cross-border adaptation)
- Moja Mobile Money System (Mojaloop Scheme)
- Receivers App
- Mojaloop Testing Toolkit (TTK) caters for #1,#5 and #4 the App UI for both Sender and Receiver apps while also aggregating events / notification messages for visualization using the UI (logs, events, messages)
This Mono-repo is managed by Lerna, but we have abstracted all Lerna specific commands where possible.
Most standard NPM commands will work normally, except for install command. The usual build
, lint
, start
commands can be run from both the project root and inside each of the module folders. Check the package.json for avaialable scripts.
See more information in the next section.
Ensure you run the following command at the project root:
$ npm install
This will install:
- mono-repo tools,
- run the bootstrap to symbolically link project modules, and
- run install for each of the project modules
NOTE:
Do not runnpm install
directly in a modules folder. This will break the symbolic links created by the mono-repo tools (lerna).
Instead, runnpm install
from the project root!
$ npm run build
$ cd ./modules/<MODULE_NAME>
$ npm run build
$ npm start
NOTE:
npm run watch
is supported at root or for each module.
$ npm start
Note: If run at root, all executable applications will be started.
With debug log level
$ LOG_LEVEL=debug npm start
It is also possible to start a specific module:
$ npm run start:example
Refer to the main package.json for what applications can be started individually.
Check for lint errors:
$ npm run lint
Auto-Fix lint errors:
$ npm run lint:fix
Note: If run at root, all modules will be linted.
Test:
$ npm run test:unit
Note: If run at root, all modules will be tested.
Check for any outdated dependencies:
$ npm run dep:check
Update all dependencies to latest versions:
$ npm run dep:update
Note: If run at root, all modules dependencies will be either be checked or updated.
Clean all build files:
$ npm run clean:dist
Clean all dependencies:
$ npm run clean:npm
We deploy the application with docker-compose
on an AWS ec2 instance.
We use terraform to automate the creation of the instance and required bits and pieces (security groups, dns records etc.).
See ./infra
for more information.
The sequence of steps for this cross border scenario is depicated below as a sequence diagram
While we generally expect to use standard ISO messages, we have made two changes:
- All the Mojaloop Ids are expected to be UUIDs. We have therefore changed the data types on the ID fields which are exchanged between the two systems to UUIDv4Identifier.
- As explained here, Mojaloop uses a cryptographic lock using the ILP protocol.
2.1 This allows participants to be confident that the eventual payee has been credited with the funds transferred.
2.2 This cryptographic lock and its key need to be passed back in the appropriate messages to the originating FI (Lake City Bank)
2.3 The form of the lock and key is an encoded version of a 256-bit signature (43 characters.)
2.4 We therefore define the following data types:
2.4.1 A BinaryString32 simple type which uses a regular expression to specialise the string type.
2.4.2 An ILPData type which contains either a Condition or a Fulfilment, both of whose type is BinaryString32.
Copies of the modified schemas are included in our submission (example messages are provided in api/example-messages folder and xsds are in xsd folder).