UNPKG

@fabric-es/fabric-cqrs

Version:

Hyperledger Fabric middleware for event sourcing and cqrs pattern

26 lines 1.1 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); require('../env'); const operator_1 = require("@fabric-es/operator"); const fabric_network_1 = require("fabric-network"); const rimraf_1 = __importDefault(require("rimraf")); rimraf_1.default(`${process.env.WALLET}/${process.env.ORG_ADMIN_ID}`, async () => { console.log(`${process.env.WALLET}/${process.env.ORG_ADMIN_ID} is removed`); await operator_1.enrollAdmin({ caName: process.env.CA_NAME, enrollmentID: process.env.ORG_ADMIN_ID, enrollmentSecret: process.env.ORG_ADMIN_SECRET, mspId: process.env.MSPID, connectionProfile: process.env.CONNECTION_PROFILE, wallet: await fabric_network_1.Wallets.newFileSystemWallet(process.env.WALLET), }) .then((result) => console.log(result)) .catch((error) => { console.error(error); process.exit(1); }); }); //# sourceMappingURL=enrollAdmin.js.map