Changes for Bank B

For Bank B, create a new file, called enrollAdmin-BankB.js.

Replicate the preceding code. Only change the following parameters to the corresponding value for Bank B:

  1. Change the connection profile file to connection-bankb.json, like this:
const ccpPath = path.resolve(__dirname, 'connection-bankb.json');
  1. Update the wallet path by running the following line of code (we'll be using a different wallet for the identities of Bank B):
const walletPath = path.join(process.cwd(), 'wallet-BankB');
  1. Update the MSP to the MSP and CA for Bank B, as follows:
const caInfo = ccp.certificateAuthorities['ca.bankb.example.com'];
  1. Update the CA for Bank B, as follows:
const identity = X509WalletMixin.createIdentity('bankbMSP', enrollment.certificate, enrollment.key.toBytes());

Let's run our utilities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.246