async login(enrollmentID, enrollmentSecret) {
        const identity = await this.testIdentity(enrollmentID, enrollmentSecret);
        if (!this.businessNetworkIdentifier) {
            return new EmbeddedSecurityContext(this, identity);
        }
        let chaincodeUUID = EmbeddedConnection.getBusinessNetwork(this.businessNetworkIdentifier, this.connectionProfile);
        if (!chaincodeUUID) {
            throw new Error(`No chaincode ID found for business network '${this.businessNetworkIdentifier}'`);
        }
        const result = new EmbeddedSecurityContext(this, identity);
        result.setChaincodeID(chaincodeUUID);
        return result;
    }
/**
     * Login as a participant on the business network.
     * @param {string} enrollmentID The enrollment ID of the participant.
     * @param {string} enrollmentSecret The enrollment secret of the participant.
     * @return {Promise} A promise that is resolved with a {@link SecurityContext}
     * object representing the logged in participant, or rejected with a login error.
     */
Login as a participant on the business network.
@param {string} enrollmentID The enrollment ID of the participant.
@param {string} enrollmentSecret The enrollment secret of the participant.
@return {Promise} A promise that is resolved with a  SecurityContext
object representing the logged in participant, or rejected with a login error.
Login as a participant on the business network . @param { string } enrollmentID The enrollment ID of the participant . @param { string } enrollmentSecret The enrollment secret of the participant . @return { Promise } A promise that is resolved with a SecurityContext object representing the logged in participant or rejected with a login error .
async login(enrollmentID, enrollmentSecret) {
        const identity = await this.testIdentity(enrollmentID, enrollmentSecret);
        if (!this.businessNetworkIdentifier) {
            return new EmbeddedSecurityContext(this, identity);
        }
        let chaincodeUUID = EmbeddedConnection.getBusinessNetwork(this.businessNetworkIdentifier, this.connectionProfile);
        if (!chaincodeUUID) {
            throw new Error(`No chaincode ID found for business network '${this.businessNetworkIdentifier}'`);
        }
        const result = new EmbeddedSecurityContext(this, identity);
        result.setChaincodeID(chaincodeUUID);
        return result;
    }
async login ( enrollmentID , enrollmentSecret ) { const identity = await this . testIdentity ( enrollmentID , enrollmentSecret ) ; if ( ! this . businessNetworkIdentifier ) { return new EmbeddedSecurityContext ( this , identity ) ; } let chaincodeUUID = EmbeddedConnection . getBusinessNetwork ( this . businessNetworkIdentifier , this . connectionProfile ) ; if ( ! chaincodeUUID ) { throw new Error ( ` ${ this . businessNetworkIdentifier } ` ) ; } const result = new EmbeddedSecurityContext ( this , identity ) ; result . setChaincodeID ( chaincodeUUID ) ; return result ; }
Login as a participant on the business network.
Login as a participant on the business network .