Package io.keyko.nevermined.api
Interface ConditionsAPI
-
- All Known Implementing Classes:
ConditionsImpl
public interface ConditionsAPI
Exposes the Public API related with the management of ConditionStatusMap
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
grantAccess(String agreementId, DID did, String grantee)
Grant access to an address using the parity secret store.boolean
grantServiceExecution(String agreementId, DID did, String grantee)
Grant compute to an address using the parity secret store.boolean
lockReward(String agreementId, BigInteger amount)
Lock the amount of token that are going to be paid for the asset.boolean
refundReward(String agreementId, BigInteger amount)
Refund the payment to the consumer.boolean
releaseReward(String agreementId, BigInteger amount)
Release the payment to the provider address.
-
-
-
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 idamount
- 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 iddid
- the didgrantee
- 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 iddid
- the didgrantee
- 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
-
-