I want to archive a contract from ledger from java . I know the key of contract how can I do that?

Deleting a active contract from ledger

If you’re asking how you can submit commands to the ledger from a Java application, then you can use the Ledger API Java bindings.
If the question is how using Ledger API Java bindings you can archive a contract given the contract key, then you can use ExerciseByKeyCommand class with the choice Archive, which is an implicit choice added to every Daml template by the Daml compiler.
Does this help?

1 Like