Interface ConditionsAPI

  • All Known Implementing Classes:
    ConditionsImpl

    public interface ConditionsAPI
    Exposes the Public API related with the management of ConditionStatusMap
    • Method Detail

      • lockReward

        boolean lockReward​(String agreementId,
                           BigInteger amount)
                    throws Exception
        Lock the amount of token that are going to be paid for the asset.
        Parameters:
        agreementId - the agreement id
        amount - the amount to be locked
        Returns:
        a flag if the execution was good
        Throws:
        Exception - Exception
      • grantAccess

        boolean grantAccess​(String agreementId,
                            DID did,
                            String grantee)
                     throws Exception
        Grant access to an address using the parity secret store.
        Parameters:
        agreementId - the agreement id
        did - the did
        grantee - the address that is going to be granted to access the data.
        Returns:
        a flag if the execution was good
        Throws:
        Exception - Exception
      • grantServiceExecution

        boolean grantServiceExecution​(String agreementId,
                                      DID did,
                                      String grantee)
                               throws Exception
        Grant compute to an address using the parity secret store.
        Parameters:
        agreementId - the agreement id
        did - the did
        grantee - the address that is going to be granted to execute the compute service.
        Returns:
        a flag if the execution was good
        Throws:
        Exception - Exception
      • releaseReward

        boolean releaseReward​(String agreementId,
                              BigInteger amount)
                       throws Exception
        Release the payment to the provider address.
        Parameters:
        agreementId - the agreement id.
        amount - the amount to be released.
        Returns:
        a flag if the execution was good
        Throws:
        Exception - Exception
      • refundReward

        boolean refundReward​(String agreementId,
                             BigInteger amount)
                      throws Exception
        Refund the payment to the consumer.
        Parameters:
        agreementId - the agreement id.
        amount - the amount to be refund.
        Returns:
        a flag if the execution was good
        Throws:
        Exception - Exception