org.hyperledger.fabric.sdk.MemberServices Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-java-sdk Show documentation
Show all versions of fabric-java-sdk Show documentation
This is a fork of Hyperledger Fabric fabric-sdk-java
/*
* Copyright 2016 DTCC, Fujitsu Australia Software Technology - All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hyperledger.fabric.sdk;
import org.hyperledger.fabric.sdk.exception.EnrollmentException;
import org.hyperledger.fabric.sdk.exception.RegistrationException;
public interface MemberServices {
/**
* Get the security level
* @return The security level
*/
int getSecurityLevel();
/**
* Set the security level
* @param securityLevel The security level
*/
void setSecurityLevel(int securityLevel);
/**
* Get the hash algorithm
* @return The security level
*/
String getHashAlgorithm();
/**
* Set the hashAlgorithm
* @param hashAlgorithm The security level
*/
void setHashAlgorithm(String hashAlgorithm);
/**
* Register the member and return an enrollment secret.
* @param req Registration request with the following fields: name, role
* @param registrar The identity of the registar (i.e. who is performing the registration)
* @return enrollment secret
*/
String register(RegistrationRequest req, Member registrar) throws RegistrationException;
/**
* Enroll the member and return an opaque member object
* @param req Enrollment request with the following fields: name, enrollmentSecret
*
* @return enrollment details
*/
Enrollment enroll(EnrollmentRequest req) throws EnrollmentException;
/**
* Get an array of transaction certificates (tcerts).
* @param req A GetTCertBatchRequest
*/
void getTCertBatch(GetTCertBatchRequest req);
}