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

            [icecap.schema :refer [check-plan]]
            [icecap.handlers.core :as h]
            [icecap.crypto :as crypto]
            [icecap.store.api :refer [create! retrieve delete!]]
            [taoensso.timbre :refer [info spy]]
            [manifold.deferred :as md]
            [manifold.stream :as ms]))

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