Context
Credentials whose VC validity interval has ended no longer need to remain in the authority active credential set.
The contract should provide a bounded pruning operation to remove expired credentials.
Expected behavior
Add a PruneExpiredCredentials execute message.
PruneExpiredCredentials {
limit: Option<u32>,
}
Only the app authority is allowed to call this message.
The message must remove credentials whose valid_until is present and lower than or equal to the current block time.
Credentials without valid_until must not be pruned.
The operation must be bounded by limit.
Events
The execution must emit an event containing:
action = "prune_expired_credentials"
pruned_count
Each pruned credential should also be emitted with its identifier if practical.
Notes
After pruning, removed credentials must no longer be returned by Credential or Credentials.
Context
Credentials whose VC validity interval has ended no longer need to remain in the authority active credential set.
The contract should provide a bounded pruning operation to remove expired credentials.
Expected behavior
Add a
PruneExpiredCredentialsexecute message.Only the app authority is allowed to call this message.
The message must remove credentials whose
valid_untilis present and lower than or equal to the current block time.Credentials without
valid_untilmust not be pruned.The operation must be bounded by
limit.Events
The execution must emit an event containing:
action = "prune_expired_credentials" pruned_countEach pruned credential should also be emitted with its identifier if practical.
Notes
After pruning, removed credentials must no longer be returned by
CredentialorCredentials.