From dc5827e2b22ef6ca287a6b8eb3051f2ec266d76e Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Mon, 29 Jul 2024 16:06:05 +0300 Subject: [PATCH] wip --- hbs2-cli/lib/HBS2/CLI/Run/LWWRef.hs | 31 ----------------------------- 1 file changed, 31 deletions(-) diff --git a/hbs2-cli/lib/HBS2/CLI/Run/LWWRef.hs b/hbs2-cli/lib/HBS2/CLI/Run/LWWRef.hs index b7b4b208..779d97bb 100644 --- a/hbs2-cli/lib/HBS2/CLI/Run/LWWRef.hs +++ b/hbs2-cli/lib/HBS2/CLI/Run/LWWRef.hs @@ -9,10 +9,8 @@ import HBS2.Storage import HBS2.Peer.CLI.Detect import HBS2.Peer.RPC.Client.Unix import HBS2.Peer.RPC.API.Peer -import HBS2.Peer.RPC.API.RefLog import HBS2.Peer.RPC.API.LWWRef -import HBS2.Peer.Proto hiding (request) import HBS2.Peer.Proto.LWWRef import HBS2.Base58 import HBS2.Net.Auth.Credentials @@ -22,16 +20,6 @@ import HBS2.Data.Types.SignedBox import HBS2.KeyMan.Keys.Direct import HBS2.KeyMan.App.Types -import Codec.Serialise -import Data.Coerce -import Data.Either -import Data.ByteString qualified as BS -import Data.ByteString.Char8 qualified as BS8 -import Data.ByteString (ByteString) -import Data.ByteString.Lazy.Char8 qualified as LBS8 -import Data.ByteString.Lazy qualified as LBS -import Data.Text.Encoding qualified as TE -import Data.Text qualified as Text import Control.Monad.Trans.Cont pattern HashLike:: forall {c} . HashRef -> Syntax c @@ -125,22 +113,3 @@ lwwRefEntries = do _ -> throwIO (BadFormException @C nil) - -- (sk,pk) <- liftIO $ runKeymanClient do - -- creds <- loadCredentials puk >>= orThrowUser "can't load credentials" - -- pure ( view peerSignSk creds, view peerSignPk creds ) - - -- seq <- case seq' of - -- Just v -> pure v - -- Nothing -> do - -- let ref = LWWRefKey puk - -- callService @RpcLWWRefGet caller ref >>= \case - -- Left e -> err (viaShow e) >> exitFailure - -- Right Nothing -> err ("not found value for" <+> pretty ref) >> exitFailure - -- Right (Just r) -> pure $ succ (lwwSeq r) - - -- let box = makeSignedBox pk sk (LWWRef seq val Nothing) - -- callService @RpcLWWRefUpdate caller box >>= \case - -- Left e -> err (viaShow e) >> exitFailure - -- Right r -> print $ pretty r - -