Approvals and rejections in Ripple Custody have a corresponding intent type. They are invoked with the intents action.
The following example approves an intent:
var domain = harmonize.domains().get(domainId).orElseThrow();
harmonize.intents(domain.getId())
.approve(intentData.getIntentId(),
Expire.hours(1))
.waitForSucceed(Timeout.minutes(1));
Intents.IntentEntity intent = harmonize.intents(domain.getId()).get(intentData.getIntentId()).orElseThrow();The following example rejects an intent:
var domain = harmonize.domains().get(domainId).orElseThrow();
harmonize.intents(domain.getId()).reject(
intentData.getIntentId(),
"Test reject",
Expire.hours(1)).waitForSucceed(Timeout.minutes(1));
Intents.IntentEntity intent = harmonize.intents(domain.getId()).get(intentData.getIntentId()).orElseThrow();