All Projects → dat-ecosystem-archive → dat-storage

dat-ecosystem-archive / dat-storage

Licence: MIT license
Dat specific storage provider for Hyperdrive [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to dat-storage

Dat
💾 peer-to-peer sharing & live syncronization of files via command line
Stars: ✭ 8,259 (+22841.67%)
Mutual labels:  dat, dat-protocol
hyperdrive-network-speed
track upload and download speed on a hyperdrive archive [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
Stars: ✭ 18 (-50%)
Mutual labels:  dat, dat-protocol
dat-log
Log History of Dat [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
Stars: ✭ 12 (-66.67%)
Mutual labels:  dat, dat-protocol
dat
💾 peer-to-peer sharing & live syncronization of files via command line [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
Stars: ✭ 8,250 (+22816.67%)
Mutual labels:  dat, dat-protocol
Dat Keyserver
a distributed PGP keyserver project based on the dat protocol
Stars: ✭ 89 (+147.22%)
Mutual labels:  dat
Random Access Http
Continuous reading from a http(s) url using random offsets and lengths for peers in a distributed system
Stars: ✭ 39 (+8.33%)
Mutual labels:  dat
Dat Desktop
Peer to peer data syncronization
Stars: ✭ 627 (+1641.67%)
Mutual labels:  dat
Docs
Documentation resources for dat and the surrounding ecosystem
Stars: ✭ 532 (+1377.78%)
Mutual labels:  dat
Datbase
[DEPRECATED] Open data sharing powered by Dat
Stars: ✭ 251 (+597.22%)
Mutual labels:  dat
Sdk
Write your own dat app!
Stars: ✭ 215 (+497.22%)
Mutual labels:  dat
Datradio
p2p music player for {old} beaker and dat
Stars: ✭ 77 (+113.89%)
Mutual labels:  dat
Hyperdb Examples
a small introduction to getting started with hyperdb
Stars: ✭ 53 (+47.22%)
Mutual labels:  dat
Hypercloud
A hosting server for Dat. [ARCHIVED - Use Hashbase instead!]
Stars: ✭ 96 (+166.67%)
Mutual labels:  dat
Dat React Native
Browse through the web with the Dat protocol in your device!
Stars: ✭ 25 (-30.56%)
Mutual labels:  dat
Enoki
ultralight tools for creating p2p sites
Stars: ✭ 222 (+516.67%)
Mutual labels:  dat
Sciencefair
The futuristic, fabulous and free desktop app for working with scientific literature 🔬 📖
Stars: ✭ 561 (+1458.33%)
Mutual labels:  dat
Hypertweet
concept tweet -> hypercore thingy
Stars: ✭ 69 (+91.67%)
Mutual labels:  dat
How Dat Works
Protocol documentation for Dat
Stars: ✭ 164 (+355.56%)
Mutual labels:  dat
Hyperfeed
decentralized rss publishing
Stars: ✭ 60 (+66.67%)
Mutual labels:  dat
Blockchain Parser
The simpliest script for parsing Bitcoin blockchain. It made convertion of blk*****.dat files to the simple text.
Stars: ✭ 84 (+133.33%)
Mutual labels:  dat

deprecated

More info on active projects and modules at dat-ecosystem.org


dat-storage

Dat specific storage provider for Hyperdrive

npm install dat-storage

Usage

var storage = require('dat-storage')

// files are stored in ./my-dataset
// metadata (hashes and stuff) are stored in ./my-dataset/.dat
// secret keys are stored in ~/.dat/secret_keys/<discovery-key>
var archive = hyperdrive(storage('my-dataset'))

Custom storage provider

You can require this module in your own storage provider in order to override certain behaviors for some files while still using the default dat storage methods for other files. Here's an example of overriding only the secret key storage and nothing else:

const defaultStorage = require('dat-storage')
const alternativeSecretStorage = require('your-own-custom-random-access-file-module')

module.exports = function keychainStorage() {
  const storage = defaultStorage(...arguments)
  return {
    metadata: function(file, opts) {
      if (file === 'secret_key') alternativeSecretStorage(file)
      return storage.metadata(...arguments)
    },
    content: function(file, opts) {
      return storage.content(...arguments)
    }
  }
}

Options

  • secretDir - folder to store secret keys in (default is users home dir)
  • prefix - subfolder to put dat SLEEP files in (default is .dat/)

Secret Keys

By default secret keys are stored in the users home directory via dat-secret-storage. To change the directory, pass it as an option:

var storage = require('dat-storage')

var archive = hyperdrive(storage('my-dataset', {secretDir: '/secret_keys'})

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].