Skip to content

Commit 5c7f74c

Browse files
committed
chore: add CHANGELOG.md
1 parent f7d3736 commit 5c7f74c

File tree

10 files changed

+765
-728
lines changed

10 files changed

+765
-728
lines changed

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit ""

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"files": ["dist", "LICENSE", "README.md", "package.json"],
3+
}

CHANGELOG.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
### [0.0.2](https://github.com/SynapseMedia/dendritejs/compare/v0.0.1...v0.0.2) (2023-07-28)
6-
7-
8-
### Features
9-
10-
* decoder Raw, DagJose ([6084d1c](https://github.com/SynapseMedia/dendritejs/commit/6084d1cf92273994ef4e8c49a796d8e649c46b88))
11-
12-
### 0.0.1 (2023-07-05)
5+
## [0.1.0](https://github.com/SynapseMedia/dendritejs/compare/v0.0.2...v0.1.0) (2023-07-28)

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testcov:
2121

2222
.PHONY: build ## compile typescript to /build
2323
build:
24-
tsc --config=tscconfig.json
24+
tsc -p tsconfig.json
2525

2626
.PHONY: clean ## clean installation and dist files
2727
clean:

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
1-
# Requirements Document - Dendrite
2-
3-
## Introduction
1+
# Dendrite
42

53
Dendrite is a tool designed for the retrieval and validation of the SEP-001 standard. Its main goal is to provide a user-friendly and easy-to-use interface to interact with the standard.
64

7-
## Technical Requirements
5+
## Key features
86

9-
1. Initialization of the library with the CID corresponding to the standard:
10-
- The tool should allow the initialization of the library by providing the CID corresponding to the SEP-001 standard.
7+
* Fetches metadata from the Meta Lake (IPFS).
8+
* Automatically detects the serialization format of the metadata and applies the appropriate strategy to fetch and decode it.
9+
* Validates the metadata's signature to ensure its authenticity and integrity.
10+
* Verifies that the retrieved metadata adheres to the defined schema, ensuring its correctness and compliance with standards.
11+
* Provides a standardized interface for interacting with the metadata, allowing users to:
12+
* Validate the fingerprint of the metadata.
13+
* Determine the type of multimedia represented by the metadata.
14+
* Handle and manage the results of the payload recovered from the metadata.
1115

12-
2. Retrieval of the CID from the IPFS network:
13-
- The tool should be capable of retrieving the CID from the IPFS network using the DAG or Block services.
16+
## Install
1417

15-
3. Determination of the serialization type using the multiformat codec:
16-
- The tool should be capable of determining the serialization type (e.g., dag-jose, raw) using the multiformat codec.
18+
Dendrite is available as a NPM package.
1719

18-
4. Implementation of modules for each serialization type:
19-
- For each serialization type, a module should be implemented, each one implementing an interface (e.g., "Serialization", "Codec", etc.).
20-
- The interface should specify methods/properties that facilitate the navigation through the content of the "claims" in the SEP-001 standard.
21-
- Each module should be capable of validating the schema of the SEP-001 standard, including the "claims", data types, etc.
22-
- Each module should be capable of validating the signature in the serialization format. If the token does not contain a signature, it should be considered invalid.
23-
- If a public key is not detected in the serialization, the validation method should require passing the public key as a parameter.
20+
`npm install dendritejs`
2421

25-
5. Client interface based on serialization and deserialization results:
26-
- A client interface should be implemented to provide a user-friendly and easy-to-use interface.
27-
- The client interface should be based on the detected serialization and the results obtained from the deserialization process.
2822

29-
## Expected Deliverables
23+
## Usage
3024

31-
- The library should be compatible with browser and node.
32-
- Clean and well-documented source code in TypeScript and Node.js (github repo).
33-
- Technical documentation describing the architecture and functionality of the tool, including details on the implementation of SEP-001 and any integration with Multiformats and IPFS.
34-
- Unit and integration tests demonstrating the functionality and validity of the tool.
25+
```typescript
26+
import {create} from 'ipfs-core'
27+
import dendrite from 'dendritejs'
3528

36-
## References
29+
const node = await create()
30+
const decoder = dendrite(node)
31+
32+
const dagJose = 'bagcqcerann63enqn2vssm6gko624gojakrswyppm56rao7m6e6vfnvtcxzha'
33+
const decoded = await decoder(dagJose)
3734

38-
- [Multiformats JS Library](https://github.com/multiformats/js-multiformats)
39-
- [DAG Service Documentation](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)
40-
- [Block Service Documentation](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)
35+
// ...
36+
const mediaType = decoded.type()
37+
const payload = decoded.metadata()
38+
39+
// fingerprint verification with shared fingerprint
40+
const expectedFingerprint = 'aba44a9673c452de6183c82919de2cdb8b830615e9ac684841502ba7173ee00a'
41+
const validFingerprint = decoded.validate(expectedFingerprint)
42+
43+
```
44+
## References
4145

42-
This requirements document defines the key technical aspects of the Dendrite tool, providing a guide for the development and implementation of the software. \
46+
* [Multiformats JS Library](https://github.com/multiformats/js-multiformats)
47+
* [DAG Service Documentation](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md)
48+
* [Block Service Documentation](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md)

0 commit comments

Comments
 (0)