From d45ff21c2caa8cc86620ee26d6be82e83dd7b294 Mon Sep 17 00:00:00 2001 From: MarketMadi <155602595+MarketMadi@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:00:33 +0530 Subject: [PATCH 1/4] Create civkit-cli.md to describer user actions related to cli commands --- civkit-cli.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 civkit-cli.md diff --git a/civkit-cli.md b/civkit-cli.md new file mode 100644 index 0000000..e6f2b50 --- /dev/null +++ b/civkit-cli.md @@ -0,0 +1,60 @@ +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. From 1e9ba09ece8a29d91bc991ba3e8d56759619cc2b Mon Sep 17 00:00:00 2001 From: MarketMadi <155602595+MarketMadi@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:01:08 +0530 Subject: [PATCH 2/4] added civkit-sample user actions to understand more how to integrate --- civkit-sample.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 civkit-sample.md diff --git a/civkit-sample.md b/civkit-sample.md new file mode 100644 index 0000000..09b12dd --- /dev/null +++ b/civkit-sample.md @@ -0,0 +1,44 @@ +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. From 44312390e8adeeddfba9ae8598a13adaa0e60d97 Mon Sep 17 00:00:00 2001 From: MarketMadi <155602595+MarketMadi@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:16:02 +0530 Subject: [PATCH 3/4] better formatting --- civkit-sample.md | 71 ++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/civkit-sample.md b/civkit-sample.md index 09b12dd..c22808f 100644 --- a/civkit-sample.md +++ b/civkit-sample.md @@ -1,44 +1,49 @@ -sendtextnote (Send a text note to the relay): +# CivKit Application Functionalities -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): +This document outlines the key functionalities of the CivKit application, detailing both the user actions and the corresponding backend processes. -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): +## Functionalities -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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: +### **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. -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. +### **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. From fe6823db974128d25280595f04895855847be7d1 Mon Sep 17 00:00:00 2001 From: MarketMadi <155602595+MarketMadi@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:19:28 +0530 Subject: [PATCH 4/4] better formatting --- civkit-cli.md | 95 +++++++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/civkit-cli.md b/civkit-cli.md index e6f2b50..9e17c2e 100644 --- a/civkit-cli.md +++ b/civkit-cli.md @@ -1,60 +1,65 @@ -ping (Send a ping message): +# CivKit CLI Functionalities -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): +This document outlines the functionalities of the CivKit CLI, detailing the user actions and the corresponding backend processes for each command. -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): +## Functionalities -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -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): +### **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. -User Action: A UI for creating and sending BOLT12 offers. -Backend Process: The backend sends the created offers to all connected clients. -publishinvoice: +### **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. -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): +### **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. -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): +### **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. -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): +### **publishinvoice** +- **User Action**: A feature to create and publish invoices. +- **Backend Process**: The backend handles the publishing of the invoice. -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): +### **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. -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): +### **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. -User Action: A "Help" button or section in the UI. -Backend Process: The backend provides help information or documentation for the commands. +### **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.