@@ -54,78 +54,6 @@ test.all(common)
54
54
55
55
A valid (read: that follows this interface) IPFS core implementation, must expose the following API.
56
56
57
- ## Block
58
-
59
- ### ` block.put `
60
-
61
- > Create a new IPFS Block.
62
-
63
- ##### ` Go ` ** WIP**
64
-
65
- ##### ` JavaScript ` - ipfs.block.put(data, [ callback] )
66
-
67
- Where ` data ` can be a
68
-
69
- - Buffer, requiring that the encoding is specified on the options. If no
70
- encoding is specified, Buffer is treated as the Data field
71
- - [ Block] [ ] instance
72
-
73
- ` callback ` has the signature ` function (err, block) {} ` , where ` err ` is an error
74
- if the operation was not successful. and ` block ` is a [ Block] [ ] .
75
-
76
-
77
-
78
-
79
- ### ` block.get `
80
-
81
- > Retrieve an IPFS Block from the underlying Block Store by its mulithash.
82
-
83
- ##### ` Go ` ** WIP**
84
-
85
- ##### ` JavaScript ` - ipfs.block.get(multihash, [ callback] )
86
-
87
- ` multihash ` is a [ multihash] [ ] which can be passed as a
88
-
89
- - Buffer, the raw Buffer of the multihash (or of and encoded version)
90
- - String, the toString version of the multihash (or of an encoded version)
91
-
92
- ` callback ` must follow the signature ` function (err, node) {} ` , where ` err ` is
93
- an error if the operation was not successful and ` block ` is a [ Block] [ ] .
94
-
95
- If no ` callback ` is passed, a promise is returned.
96
-
97
-
98
-
99
-
100
- ### ` block.stat `
101
-
102
- > Returns various stats of an IPFS Block
103
-
104
- ##### ` Go ` ** WIP**
105
-
106
- ##### ` JavaScript ` - ipfs.block.stat(multihash, [ options, callback] )
107
-
108
- ` multihash ` is a [ multihash] [ ] which can be passed as:
109
-
110
- - Buffer, the raw Buffer of the multihash (or of and encoded version)
111
- - String, the toString version of the multihash (or of an encoded version)
112
-
113
- ` callback ` must follow the signature ` function (err, stats) {} ` , where ` err ` is
114
- an error if the operation was not successful and ` stats ` is an object with
115
- the format
116
-
117
- ``` JavaScript
118
- {
119
- Key: ' QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD' ,
120
- Size: 10
121
- }
122
- ```
123
-
124
- If no ` callback ` is passed, a promise is returned.
125
-
126
-
127
-
128
-
129
57
## Object
130
58
131
59
### ` object.new `
@@ -191,6 +119,10 @@ If no `callback` is passed, a promise is returned.
191
119
192
120
If no ` callback ` is passed, a promise is returned.
193
121
122
+ ### ` object.data `
123
+
124
+ > Returns the Data field of an object
125
+
194
126
##### ` Go ` ** WIP**
195
127
196
128
##### ` JavaScript ` - ipfs.object.data(multihash, [ options, callback] )
@@ -377,6 +309,5 @@ If no `callback` is passed, a promise is returned.
377
309
If no ` callback ` is passed, a promise is returned.
378
310
379
311
380
- [ Block ] : https://github.com/ipfs/js-ipfs-block
381
312
[ DAGNode ] : https://github.com/vijayee/js-ipfs-merkle-dag
382
313
[ multihash ] : http://github.com/jbenet/multihash
0 commit comments