diff --git a/civkit-cli.md b/civkit-cli.md new file mode 100644 index 0000000..9e17c2e --- /dev/null +++ b/civkit-cli.md @@ -0,0 +1,65 @@ +# CivKit CLI Functionalities + +This document outlines the functionalities of the CivKit CLI, detailing the user actions and the corresponding backend processes for each command. + +## Functionalities + +### **ping** (Send a ping message) +- **User Action**: A button labeled "Ping" that, when clicked, sends a ping request. +- **Backend Process**: The backend receives the ping request and responds, possibly with a pong message or a status update. + +### **shutdown** (Shutdown the connected CivKit node) +- **User Action**: A "Shutdown" button that, when clicked, initiates the shutdown process. +- **Backend Process**: The backend safely shuts down the connected CivKit node. + +### **publishtextnote** (Send a demo NIP-01 EVENT kind 1) +- **User Action**: A text input field and a submit button for users to send a text note. +- **Backend Process**: The backend publishes the text note to all connected clients. + +### **listclients** (List information about connected clients) +- **User Action**: A "List Clients" button that displays the connected clients. +- **Backend Process**: The backend retrieves and sends a list of all connected clients. + +### **listsubscriptions** (List information about subscriptions) +- **User Action**: A button or section in the UI to view current subscriptions. +- **Backend Process**: The backend provides a list of current subscriptions. + +### **connectpeer** (Connect to a BOLT8 peer) +- **User Action**: An interface for entering peer details and a button to initiate connection. +- **Backend Process**: The backend attempts to connect to the specified BOLT8 peer. + +### **disconnectclient** (Disconnect from a client) +- **User Action**: Options in the client list to disconnect from a specific client. +- **Backend Process**: The backend disconnects from the selected client. + +### **publishnotice** (Send a demo NIP-01 NOTICE) +- **User Action**: A form to create and send a notice. +- **Backend Process**: The backend publishes the notice to all connected clients. + +### **publishoffer** (Send BOLT12 offers) +- **User Action**: A UI for creating and sending BOLT12 offers. +- **Backend Process**: The backend sends the created offers to all connected clients. + +### **publishinvoice** +- **User Action**: A feature to create and publish invoices. +- **Backend Process**: The backend handles the publishing of the invoice. + +### **list-db-events** (List DB entries) +- **User Action**: A "List Database Events" button or section. +- **Backend Process**: The backend retrieves and displays database event entries. + +### **list-db-clients** (List DB clients entries) +- **User Action**: A feature to view a list of database clients. +- **Backend Process**: The backend provides a list of clients from the database. + +### **check-chain-state** (Check chain state) +- **User Action**: A button or feature to check the current state of the chain. +- **Backend Process**: The backend checks and returns the current state of the chain. + +### **generate-tx-inclusion-proof** (Generate a merkle block for the target txid) +- **User Action**: An interface for inputting a transaction ID and requesting its inclusion proof. +- **Backend Process**: The backend generates and returns the merkle block for the given transaction ID. + +### **help** (Print help message) +- **User Action**: A "Help" button or section in the UI. +- **Backend Process**: The backend provides help information or documentation for the commands. diff --git a/civkit-sample.md b/civkit-sample.md new file mode 100644 index 0000000..c22808f --- /dev/null +++ b/civkit-sample.md @@ -0,0 +1,49 @@ +# CivKit Application Functionalities + +This document outlines the key functionalities of the CivKit application, detailing both the user actions and the corresponding backend processes. + +## Functionalities + +### **sendtextnote** (Send a text note to the relay) +- **User Action**: Users can input a text message in a text field and submit it. +- **Backend Process**: The message is sent to a specified relay in the backend. + +### **setmetadata** (Set the client's metadata) +- **User Action**: Users fill out a form with metadata details, which could include settings or preferences. +- **Backend Process**: The submitted metadata is used to update the client's profile or settings in the backend. + +### **recommendserver** (Recommend a server to the relay) +- **User Action**: Users select or input a server recommendation, possibly from a list or a text input. +- **Backend Process**: The recommendation is sent to the relay for processing or storage. + +### **sendmarketorder** (Send a market order to the relay) +- **User Action**: Users complete a form to create a market order, specifying details like order type, quantity, price, etc. +- **Backend Process**: The market order is processed and sent to the appropriate market or exchange relay. + +### **opensubscription** (Open a subscription to the relay) +- **User Action**: Users choose to subscribe to a service or feed, possibly through a toggle or button. +- **Backend Process**: A subscription is initiated in the backend, enabling the user to receive updates or data feeds. + +### **closesubscription** (Close a subscription to the relay) +- **User Action**: Users can opt to end a subscription, likely through a similar interface used to open it. +- **Backend Process**: The user’s subscription is terminated in the backend. + +### **submitcredentialproof** (Submit a credential proof to the relay) +- **User Action**: Users might need to upload or enter credential information for verification purposes. +- **Backend Process**: The provided credentials are verified and authenticated by the backend. + +### **addservice** (Register manually a service) +- **User Action**: Users input details of a new service they wish to register, typically through a detailed form. +- **Backend Process**: The service details are processed and the service is registered in the backend system. + +### **shutdown** (Shutdown the REPL) +- **User Action**: This could be a simple button to safely shut down a session or service. +- **Backend Process**: The backend processes the shutdown command, terminating the session or service safely. + +### **verifyinclusionproof** (Verify inclusion proof) +- **User Action**: Users might need to input or upload data for inclusion proof verification. +- **Backend Process**: The backend verifies the inclusion proof against stored data or a blockchain. + +### **help** +- **User Action**: Users can request help or instructions, likely through a help button or command. +- **Backend Process**: The backend provides the relevant help information or documentation.