From 4072471a60606aa5ffaff47bcb0c0941097a42d4 Mon Sep 17 00:00:00 2001 From: droak Date: Tue, 16 Jul 2024 17:50:19 +0900 Subject: [PATCH] add missing readmes --- packages/network/README.md | 34 +++++++++++++++++++++++++- packages/node/README.md | 49 ++++++++++++++++++++++++++++++++++++++ packages/object/README.md | 18 +++++++++++++- 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/packages/network/README.md b/packages/network/README.md index 425ba0e1..5963c4f1 100644 --- a/packages/network/README.md +++ b/packages/network/README.md @@ -1 +1,33 @@ -# Topology Node +# Topology Network Stack + +This package contains the network middleware to abstract libp2p for the Topology Protocol. + +To do so, we define a `TopologyNetworkNode` where we can pass the configs that we want and it "magically" configures libp2p and gives connectivity to the Topology Network. + +## Usage + +This package is intended to be used as a dependency for the Topology Protocol. However, you can use it as a standalone package. For that, you can install it using: + +```bash +# yarn +yarn add @topology-foundation/network + +# npm +npm install @topology-foundation/network +``` + +### Build + +To build the package, you can run: + +```bash +yarn build +``` + +### Tests + +To run the tests, you can run: + +```bash +yarn test +``` diff --git a/packages/node/README.md b/packages/node/README.md index 425ba0e1..87d9f51e 100644 --- a/packages/node/README.md +++ b/packages/node/README.md @@ -1 +1,50 @@ # Topology Node + +This package provides the implementation of a Topology Node, which is a node in a network that can be connected to other nodes and exchange messages with them. The Topology Node is the entrypoint for interacting with the Topology Protocol in the Topology Network. + +## Usage + +Topology Node can be used using the CLI or integrated into an existing application. + +### CLI + +The CLI provides a simple way to start a Topology Node and connect it to other nodes in the network. It can be installed globally using: + +```bash +# yarn +yarn global add @topology-foundation/node + +# npm +npm install -g @topology-foundation/node +``` + +> This part is a lie, the cli is being developed. + +For more information on what are the commands available, run: + +```bash +topology-node --help +``` + +### Integration + +To integrate the Topology Node into an existing application, you can install it using: + +```bash +# yarn +yarn add @topology-foundation/node + +# npm +npm install @topology-foundation/node +``` + +Then, you can import the Topology Node class and create a new instance: + +```javascript +import { TopologyNode } from '@topology-foundation/node'; + +const node = new TopologyNode(); + +// Start the node +node.start(); +``` diff --git a/packages/object/README.md b/packages/object/README.md index 425ba0e1..6f196dbf 100644 --- a/packages/object/README.md +++ b/packages/object/README.md @@ -1 +1,17 @@ -# Topology Node +# Conflict-free Replicated Objects (CROs) + +This package provides a simple implementation of Conflict-free Replicated Objects (CROs) as defined in the Topology Protocol. CROs are a type of composable object that can be replicated across multiple nodes in a network, and can be updated concurrently by multiple clients without the need for coordination. + +## Usage + +This package is intended to implement a basic abstract class that can be extended for the creation of custom CROs. Basic operations for synchronization are provided, but the implementation of the actual object behavior is left to the app developer. + +For starting, you can install it using: + +```bash +# yarn +yarn add @topology-foundation/object + +# npm +npm install @topology-foundation/object +```