Skip to content

Commit 6035abb

Browse files
author
Ismail bennis
committed
🔖 updating readme file
1 parent 83cabca commit 6035abb

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SmartGitAnchor
22

33
## Overview
4-
`SmartGitAnchor` is a Node.js package designed for the automated computation and secure transmission of file hashes. It is ideal for integrating into CI/CD pipelines, where ensuring the integrity of files in a repository is crucial. The package generates SHA-256 hashes for files and sends these hashes to a specified API endpoint.
4+
`SmartGitAnchor` is a Node.js package designed for automated computation and secure transmission of file hashes, with a particular focus on blockchain technologies like `Tezos` and `Ethereum`. It's ideal for CI/CD pipelines, especially in blockchain development projects, where verifying the integrity of files against a `Merkle tree` generated hash root is crucial. The package generates SHA-256 hashes, a standard in blockchain hash functions, for files and securely transmits these to a specified API endpoint.
55

66
## How It Works
77
This package works by scanning all files within a specified directory, computing their SHA-256 hashes, and then sending these hashes in a JSON payload to a designated secure API endpoint. It leverages environment variables for configuration, ensuring flexibility and ease of integration into various workflows.
@@ -13,17 +13,14 @@ This package works by scanning all files within a specified directory, computing
1313
- A GitHub repository where the package will be implemented
1414
- A secure API endpoint that will receive the file hashes (see [Secure API Endpoint Setup](#secure-api-endpoint-setup))
1515

16-
### Installation
16+
## Installation and Setup (GitHub Actions Workflow)
1717
Install `SmartGitAnchor` via npm with the following command:
1818

1919
```bash
2020
npm install @smart-chain-fr/SmartGitAnchor
2121
```
2222

23-
## GitHub Actions Workflow Setup
24-
The following steps will guide you through the process of setting up a GitHub Actions workflow that will automatically compute and send file hashes to an API endpoint.
25-
26-
### Step 1: Create a GitHub Actions Workflow
23+
### Create a GitHub Actions Workflow
2724

2825
To utilize SmartGitAnchor within your GitHub Actions workflow, follow these steps to set up the .github/workflows YAML file in your project. this is an example of a workflow that will compute and send file hashes to an API endpoint when a push event occurs:
2926

@@ -49,7 +46,7 @@ jobs:
4946
run: smartgitanchor --callbackUrl=${{ secrets.CALLBACK_URL }} --apiUrl=${{ secrets.SECURE_API }} --apiKey=${{ secrets.API_KEY }} --filesPath=${{ secrets.FILES_PATH }}
5047
```
5148
52-
### Step 2: Create Secrets
49+
### Create Secrets
5350
5451
set the following secrets in your GitHub repository:
5552
@@ -58,7 +55,7 @@ set the following secrets in your GitHub repository:
5855
- `FILES_PATH`: The path to the directory containing the files whose hashes will be computed
5956
- `CALLBACK_URL`(optional): The URL callback that will be used to send the response from the API endpoint
6057

61-
### Step 3: Usage
58+
### Workflow Explanation
6259

6360
Once the workflow is set up, the hashes of the files in the specified directory will be computed and sent to the API endpoint. The API endpoint will then respond with a JSON payload containing the hashes of the files. If a callback URL is specified, the response from the API endpoint will be sent to the callback URL.
6461

@@ -68,21 +65,27 @@ Secure API, part of the [Bloom](https://3loom.io/) suite, that allows you to rec
6865

6966
## Command Line Interface (CLI) Usage
7067

68+
### installation
69+
70+
```bash
71+
npm install @smart-chain-fr/smartgitanchor -g
72+
```
73+
7174
### Usage
7275

7376
```bash
7477
smartgitanchor [options]
7578
```
7679
options:
7780
- `--callbackUrl`: The URL callback that will be used to send the response from the API endpoint
78-
- `--secureApi`: The URL of the API endpoint that will receive the file hashes (required)
81+
- `--apiUrl`: The URL of the API endpoint that will receive the file hashes (required)
7982
- `--apiKey`: The API key that will be used to authenticate the request to the API endpoint (required)
8083
- `--filesPath`: The path to the directory containing the files whose hashes will be computed (required)
8184

8285
### Example
8386

8487
```bash
85-
smartgitanchor --callbackUrl=https://example.com/callback --secureApi=https://example.com/api --apiKey=1234567890 --filesPath=/home/user/my-project
88+
smartgitanchor --callbackUrl=https://example.com/callback --apiUrl=https://example.com/api --apiKey=1234567890 --filesPath=/home/user/my-project
8689
```
8790

8891
## GitLab CI/CD Pipeline Setup (Coming Soon)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@smart-chain-fr/smartgitanchor",
3-
"version": "1.1.2",
4-
"description": "SmartGitAnchor is a versatile Node.js package designed for computing and securely transmitting file hashes.",
3+
"version": "1.1.3",
4+
"description": "SmartGitAnchor is a versatile Node.js package designed for computing and securely transmitting file hashes. It is used to anchor files on the Tezos or Ethereum blockchains.",
55
"main": "index.js",
66
"type": "module",
77
"outdir": "./dist",

0 commit comments

Comments
 (0)