The Settlements BC is integral to settling Participant transfers using either Deferred Net Settlement or Immediate Gross Settlement methods. It encompasses the following functions:
- Creating settlement windows,
- Identifying and deploying the required settlement method (DNS/IGS),
- Settling, closing, and updating batches,
- Recording all deposits and withdrawals to the appropriate ledger accounts in the Accounts and Balances BC.
The Settlements BC consists of the following packages;
public-types-lib
Public shared types.
README
domain-lib
Domain library types.
README
infrastructure-lib
Infrastructure library.
README
settlements-bc-api-svc
HTTP service for Settlements BC.
README
event-handler-svc
Event handler service for Settlements BC.
README
command-handler-svc
Command handler service for Settlements BC.
README
settlement-model-lib
Settlement library used to determine the settlement model for a settlement transfer.
README
shared-mocks-lib
Mock implementation used for testing.
README
Please follow the instruction in Onboarding Document to setup and run the service locally.
See the README.md file on each services for more Environment Variable Configuration options.
For endpoint documentation, see the API documentation.
For help preparing and executing transfers, see the Transfer Guide
The following documentation provides insight into the Settlements Bounded Context.
- Technical Flows -
../docs/flows
- Settlement Version 2 -
../docs/Settlement Version 2.pptx
- Functional Specification -
../docs/func_spec
- Settlement Operational Implementation - https://docs.mojaloop.io/business-operations-framework-docs/guide/SettlementBC.html#core-settlement-operations
- Reference Architecture - https://mojaloop.github.io/reference-architecture-doc/boundedContexts/settlements/
- MIRO Board - https://miro.com/app/board/o9J_lJyA1TA=/
- Settlement Functionality in MJL - https://docs.google.com/presentation/d/19uy6pO_igmQ9uZRnKyZkXD8a8uyMKQcn/edit#slide=id.p1
- Work Sessions - https://docs.google.com/document/d/1Nm6B_tSR1mOM0LEzxZ9uQnGwXkruBeYB2slgYK1Kflo/edit#heading=h.6w64vxvw6er4
- Admin API - Settlement Models - https://github.com/mojaloop/mojaloop-specification/blob/master/admin-api/admin-api-specification-v1.0.md#api-resource-settlementmodels
Logs are sent to standard output by default.
npm run build
npm run test:unit
npm run test:integration
Requires integration tests pre-requisites
npm run test
After running the unit and/or integration tests:
npm run posttest
You can then consult the html report in:
coverage/lcov-report/index.html