FINS Blockchain System API - Implementation Template

(0 reviews)

home

This API implementation template is a component of MuleSoft Accelerators, which accelerate the implementation of essential integration use cases.

The solution includes pre-built APIs, connectors, and integration templates that help unlock business-critical data from external systems and guide you in adopting best practices synthesized from thousands of customer implementations. Use these assets as is or extend them to meet your company’s unique needs.


Overview

This integration template implements the FINS Blockchain System API specification. It supports the following functionalities:
- Posting a new message to the default Blockchain instance

Getting started

bulb.png The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications.

Once your workstation has been set up and the application template imported into Anypoint Studio, proceed with the Prerequisites section.

Prerequisites

This implementation template has the following dependencies:

  • Configuring Multichain instance

Please review the use cases described on the MuleSoft Accelerator for Financial Services solution pages for more information about dependencies on other APIs and services.

MultiChain Configuration

These are setup instructions for configuring MultiChain instance.

MultiChain Container Setup

  1. Build docker multichain image by using Dockerfile under scripts directory.
  2. Run docker-run.sh script to create container and configure host to set network ports.
  3. Run docker-exec.sh to create multichain and configure rpc service.

**Use the command below to restart the MultiChain daemon if container is restarted.

sudo docker exec -d multichain_node1 multichaind chain1 -rescan -daemon -server=1 -port=6000 -rpcport=6100 -rpcuser=accelerators -rpcpassword=accelerators -rpcallowip=0.0.0.0/0 -explorersupport=2

MultiChain Configuration

To setup a chain in the container, use the following operations from the Multichain-Configuration postman collection.

  1. Create Debtor Wallet Address : Creates new wallet and returns the ID.
  2. Grant Receive : Grants Receive permissions for mentioned Wallet ID. Use this operation to grant receive permissions to the addresses created above.
  3. Grant Send : Grant Send permission for Debitor address.
  4. Issue Asset : Create Asset for Debitor address. Provide Currency and Value type.
  5. Get Balances : Check Balance for provided Wallet ID.
  6. Send Asset : Send Assets from Debitor Address to Creditor Address.

Deployment

Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml file.

For additional details, please refer to the Application Deployment section of the Getting Started Guide.

Preparation

Ensure the Maven profile CloudHub-FINS-DEV has been properly configured in your settings.xml file. In particular, make sure the common properties for your environment have been provided (e.g., Anypoint Platform client ID and secret).

Required property overrides

At a minimum, the following properties must be customized to reflect the target deployment environment.

Property NameDescription
api.autodiscoveryIDRequired if using API Manager to secure this API
rpc.hostipMultiChain Instance host name
rpc.portMultiChain Instance port
rpc.usernameMultiChain Instance Username
fins.blockchain.passwordMultiChain Instance password

Testing

Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the src/test/resources folder. Update the collection variable(s) after successful import.

Additional resources


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onNov 8, 2023
Asset overview

Asset versions for 1.3.x

Asset versions
VersionActions
1.3.4
1.3.3
1.3.2
1.3.1