Package io.keyko.nevermined.api
Interface AgreementsAPI
-
- All Known Implementing Classes:
AgreementsImpl
public interface AgreementsAPIExposes the Public API related with the management of Agreements
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancreate(DID did, String agreementId, int index, String consumerAddress)Create a service agreement.org.web3j.tuples.generated.Tuple2<String,String>prepare(DID did, int serviceDefinitionId, Account consumerAccount)Prepare the service agreement.AgreementStatusstatus(String agreementId)Get the status of a service agreement.
-
-
-
Method Detail
-
prepare
org.web3j.tuples.generated.Tuple2<String,String> prepare(DID did, int serviceDefinitionId, Account consumerAccount) throws ServiceAgreementException
Prepare the service agreement.- Parameters:
did- the didserviceDefinitionId- the service definition id of the agreementconsumerAccount- the address of the consumer- Returns:
- Tuple with agreement id and signature.
- Throws:
ServiceAgreementException- Exception
-
create
boolean create(DID did, String agreementId, int index, String consumerAddress) throws ServiceAgreementException
Create a service agreement.- Parameters:
did- the didagreementId- the agreement idindex- the service definition id of the agreementconsumerAddress- the address of the consumer- Returns:
- a flag a true if the creation of the agreement was successful.
- Throws:
ServiceAgreementException- Exception
-
status
AgreementStatus status(String agreementId) throws ServiceAgreementException
Get the status of a service agreement.- Parameters:
agreementId- id of the agreement- Returns:
- AgreementStatus with condition status of each of the agreement's conditions.
- Throws:
ServiceAgreementException- Exception
-
-