You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IPFS repo exposes a well defined interface by the Repo Spec. Each of the individual repos has an interface defined by [abstract-blob-store](https://github.com/maxogden/abstract-blob-store), this enables us to make IPFS repo portable (running on Node.js vs the browser) and accept different types of storage mechanisms for each repo (fs, levelDB, etc).
44
+
This provides a well defined interface for creating and interacting with an IPFS
45
+
Repo backed by a group of abstract backends for keys, configuration, logs, and
46
+
more. Each of the individual repos has an interface defined by
47
+
[abstract-blob-store](https://github.com/maxogden/abstract-blob-store): this
48
+
enables us to make IPFS Repo portable (running on Node.js vs the browser) and
49
+
accept different types of storage mechanisms for each repo (fs, levelDB, etc).
45
50
46
51
## Good to know (historical context)
47
52
48
53
- The datastore folder holds the legacy version of datastore, still built in levelDB, there is a current endeavour of pushing it to fs completely.
49
54
- The blocks folder is the current version of datastore.
50
55
- The keys repo doesn't exist yet, as the private key is simply stored inside config
51
56
52
-
# Installation
53
-
54
-
## npm
55
-
56
-
```sh
57
-
> npm i ipfs-repo
58
-
```
59
-
60
-
## Use in Node.js
61
-
62
-
```JavaScript
63
-
var IPFSRepo =require('ipfs-repo')
64
-
```
65
-
66
-
## Use in a browser with browserify, webpack or any other bundler
67
-
68
-
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
69
-
70
-
```JavaScript
71
-
var IPFSRepo =require('ipfs-repo')
72
-
```
73
-
74
-
## Use in a browser Using a script tag
75
-
76
-
Loading this module through a script tag will make the `Unixfs` obj available in the global namespace.
var fsBlobStore =require('fs-blob-store') // an in-memory blob store
@@ -152,18 +124,42 @@ Read and write buffers to/from the repo's block store.
152
124
153
125
**WIP**
154
126
155
-
## Install
127
+
#Installation
156
128
157
-
Install via npm:
129
+
## npm
158
130
159
-
```bash
160
-
$ npm i ipfs-repo
131
+
```sh
132
+
> npm i ipfs-repo
133
+
```
134
+
135
+
## Use in Node.js
136
+
137
+
```JavaScript
138
+
var IPFSRepo =require('ipfs-repo')
139
+
```
140
+
141
+
## Use in a browser with browserify, webpack or any other bundler
142
+
143
+
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
144
+
145
+
```JavaScript
146
+
var IPFSRepo =require('ipfs-repo')
147
+
```
148
+
149
+
## Use in a browser Using a script tag
150
+
151
+
Loading this module through a script tag will make the `Unixfs` obj available in the global namespace.
0 commit comments