Skip to content

mojaloop/settlements-bc

Repository files navigation

Settlements Bounded Context

Git Commit Git Releases Docker pulls CircleCI

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.

Contents

Packages

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

Running Locally

Please follow the instruction in Onboarding Document to setup and run the service locally.

Configuration

See the README.md file on each services for more Environment Variable Configuration options.

API

For endpoint documentation, see the API documentation.

For help preparing and executing transfers, see the Transfer Guide

Documentation

The following documentation provides insight into the Settlements Bounded Context.

Logging

Logs are sent to standard output by default.

Build

npm run build

Tests

Unit Tests

npm run test:unit

Run Integration Tests

npm run test:integration

Run all tests at once

Requires integration tests pre-requisites

npm run test

Collect coverage (from both unit and integration test types)

After running the unit and/or integration tests:

npm run posttest

You can then consult the html report in:

coverage/lcov-report/index.html