   "Revokes a capability."
   [cap {:keys [store kdf]}]
   (let [{index :index} (crypto/derive kdf cap)]
-    (md/chain (delete! store index) (constantly {}))))
+    (md/chain (store/delete! store index) (constantly {}))))

  "Executes a capability."
  [cap {:keys [store kdf scheme]}]
  (let [{:keys [index cap-key]} (crypto/derive kdf cap)]
    (md/chain (retrieve store index)
              (fn [blob]
                (->> (crypto/decrypt scheme cap-key blob)
                     (nippy/thaw)

      (let [cap (crypto/make-cap)
            {:keys [index cap-key]} (crypto/derive kdf cap)
            blob (crypto/encrypt scheme cap-key (nippy/freeze plan))]
        (md/chain (store/create! store index blob)
                  (constantly {:cap cap})))
      (md/success-deferred {:error error}))))

