CLI command

skarbiec merge

Settle one account kept in several items, the groups health lists under same_account: keep one, move what reaches the others to it, and trash the others.

Invocation#

Shell
skarbiec merge <keep> <drop> [<drop>...]

Purpose#

Settle one account kept in several items, the groups health lists under same_account: keep one, move what reaches the others to it, and trash the others.

Required inputs and options#

  • Requires the item to keep, then one or more items to drop, all live and owner-controlled. POST /v1/operator/items/merge takes keep and drop, a list of ids.

Output and state effects#

  • Checks every item before anything moves. Then, for each dropped item: every grant naming it is retargeted to the kept item as grant retarget does, bearer kept; when all of them moved, the item goes to the trash as delete puts it there, so restore brings it back. One items-merged journal entry names the kept item and the dropped ones. Prints ok, kept and merged: per dropped item, trashed, grants_moved, grants_not_moved (with grant retarget's reason) and readers_not_on_kept, the recipients who could open the dropped item but cannot open the kept one; they are named, not added, and share adds them. ok is false when any dropped item stayed live.

Refusals#

  • Fewer than two ids exits 2 with `usage: merge <keep> <drop> [<drop>...]`, and an item named both ways with `<id> is both kept and dropped; name it once, as the item to keep`. A lifecycle-controlled item, one on a vault that replicates another, or one that does not exist is refused before anything moves. A dropped item whose grant could not be moved is left live, with that grant's reason, rather than trashed under a grant that would name it.