Interface AgreementsAPI

  • All Known Implementing Classes:
    AgreementsImpl

    public interface AgreementsAPI
    Exposes the Public API related with the management of Agreements
    • 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 did
        serviceDefinitionId - the service definition id of the agreement
        consumerAccount - 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 did
        agreementId - the agreement id
        index - the service definition id of the agreement
        consumerAddress - the address of the consumer
        Returns:
        a flag a true if the creation of the agreement was successful.
        Throws:
        ServiceAgreementException - Exception