didat
v0.0.1
Published
DID + DAT
Downloads
2
Readme
DIDAT
DIDAT is a powerful, lightweight, and scalable peer-to-peer protocol library that leverages the principles of both the Decentralized Identifiers (DIDs) and the DAT protocol. It provides a robust foundation for building distributed and decentralized applications.
It allows the creation and verification of unique, user-controlled identifiers and ensures secure and consistent data sharing among network peers. With its pluggable design, you can choose to use any Distributed Hash Table (DHT) of your preference, making DIDAT highly flexible and adaptable to your specific needs.
Key Features
- Decentralized Identifiers (DIDs): Provides a standardized way for users to create and manage their identities without the need for a centralized authority.
- DAT-Inspired File Sharing: Employs Merkle trees for efficient, secure, and version-controlled data sharing.
- Pluggable DHT: Allows you to choose the DHT that best suits your use-case.
- Key Management: Simplifies the management of TweetNaCl cryptographic keys associated with DIDs and DATs.
- Bitfield Indexing: Utilizes bitfields for tracking downloaded blocks and enabling partial data transfer.
- Base58 Encoding: Uses bs58 for encoding, which is easier to read and includes a checksum for error detection.
Installation
Use the package manager npm to install DIDAT:
npm install didat
Usage
Here's a basic example to get you started:
const { Node, KeyManager, NameServer, DatServer } = require('didat')
const seedPhrase = 'my unique seed phrase'
const nameServer = new NameServer()
const datServer = new DatServer()
const keyManager = new KeyManager(seedPhrase)
const node = new Node('Alice', keyManager, nameServer, datServer)
const datLink = node.createDat('Hello, world!')
// datLink is now ready to be shared over the network
console.log(datLink)
Detailed API documentation is available in the API.md file.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update the tests as appropriate.
License
DIDAT's powerful combination of DIDs and the DAT protocol provides you with the tools necessary to build a new generation of decentralized applications. With its pluggable DHT design and enhanced data consistency mechanisms, DIDAT stands at the forefront of peer-to-peer networking libraries.