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
{{ message }}
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: SPEC/NAME.md
+39-41
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Name API
2
2
3
3
*[name.publish](#namepublish)
4
-
*[name.resolve](#nameresolve)
5
4
*[name.pubsub.cancel](#namepubsubcancel)
6
5
*[name.pubsub.state](#namepubsubstate)
7
6
*[name.pubsub.subs](#namepubsubsubs)
7
+
*[name.resolve](#nameresolve)
8
8
9
9
#### `name.publish`
10
10
@@ -58,41 +58,6 @@ ipfs.name.publish(addr, function (err, res) {
58
58
59
59
This way, you can republish a new version of your website under the same address. By default, `ipfs.name.publish` will use the Peer ID. If you want to have multiple websites (for example) under the same IPFS module, you can always check the [key API](./KEY.md).
`value` is a IPNS address, such as: `/ipns/ipfs.io`.
70
-
71
-
`options` is an object that may contain:
72
-
73
-
```JavaScript
74
-
{
75
-
recursive:// bool - Resolve until the result is not an IPNS name. Default: false.
76
-
nocache:// bool - Do not use cached entries. Default: false.
77
-
}
78
-
```
79
-
80
-
`callback` must follow `function (err, result) {}` signature, where `err` is an error if the operation was not successful. `result` is an object that contains the resulting path.
81
-
82
-
If no `callback` is passed, a promise is returned.
`callback` must follow `function (err, result) {}` signature, where `err` is an error if the operation was not successful. `result` is an object that contains the result of the operation, such as:
127
+
`callback` must follow `function (err, result) {}` signature, where `err` is an error if the operation was not successful. `result` is an array of subscriptions, such as:
`value` is a IPNS address, such as: `/ipns/ipfs.io`.
153
+
154
+
`options` is an object that may contain:
155
+
156
+
```JavaScript
157
+
{
158
+
recursive:// bool - Resolve until the result is not an IPNS name. Default: false.
159
+
nocache:// bool - Do not use cached entries. Default: false.
160
+
}
161
+
```
162
+
163
+
`callback` must follow `function (err, name) {}` signature, where `err` is an error if the operation was not successful. `name` is a string that contains the IPFS hash.
164
+
165
+
If no `callback` is passed, a promise is returned.
0 commit comments