Package Exports
- repo-configs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (repo-configs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
})