0.7.0 • Published 5 years ago

repo-configs v0.7.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

repo-configs

IPFS repo configs including PeerID, PrivKey & datastore_spec

import { blockstore, config } from 'repo-configs';
import Repo from 'ipfs';
const ipfsRepo = new Repo(<path to repo>);

config().then(({spec, repo, netkey}) => {
  writeFileSync(join(repoPath, 'datastore_spec'), JSON.stringify(spec, null, '\t'));
  writeFileSync(join(repoPath, 'config'), JSON.stringify(repo, null, '\t'));
  writeFileSync(join(repoPath, 'swarm.key'), netkey);
  
  // or
  ipfsRepo.init(repo) // full config
  
  ipfsRepo.init(blockstore) // minimal config for working with the blockstore  
})

API

config

0.7.0

5 years ago

0.5.5

5 years ago

0.5.7

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.4.0-preview

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago