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:
- Change the connection profile file to connection-bankb.json, like this:
const ccpPath = path.resolve(__dirname, 'connection-bankb.json');
- 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');
- Update the MSP to the MSP and CA for Bank B, as follows:
const caInfo = ccp.certificateAuthorities['ca.bankb.example.com'];
- Update the CA for Bank B, as follows:
const identity = X509WalletMixin.createIdentity('bankbMSP', enrollment.certificate, enrollment.key.toBytes());
Let's run our utilities.