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.
docs: Added a list of all possible hash algorithms and default hash function (#357)
* Added a link to the list of possible values for hash/hashAlg
* Added the link to the list of all possible hash functions as well as the default hash algorithm
Copy file name to clipboardExpand all lines: SPEC/FILES.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,7 @@ If no `content` is passed, then the path is treated as an empty directory
156
156
- cid-version (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, including it's version)
157
157
- progress (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
158
158
- recursive (boolean): for when a Path is passed, this option can be enabled to add recursively all the files.
159
-
- hashAlg || hash (string): multihash hashing algorithm to use.
159
+
- hashAlg || hash (string): multihash hashing algorithm to use. (default: `sha2-256`) [The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
160
160
- wrapWithDirectory (boolean): adds a wrapping node around the content.
161
161
- onlyHash (boolean): doesn't actually add the file to IPFS, but rather calculates its hash.
162
162
- pin (boolean, default true): pin this object when adding.
@@ -217,7 +217,7 @@ Returns a Readable Stream of class Duplex, where objects can be written of the f
217
217
218
218
- cid-version (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, including it's version)
219
219
- progress (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
220
-
- hashAlg || hash (string): multihash hashing algorithm to use
220
+
- hashAlg || hash (string): multihash hashing algorithm to use. (default: `sha2-256`) [The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
221
221
- wrapWithDirectory (boolean): adds a wrapping node around the content
222
222
- pin (boolean, default true): pin this object when adding.
223
223
@@ -267,7 +267,7 @@ Returns a Pull Stream, where objects can be written of the forms
267
267
268
268
- cid-version (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, including it's version)
269
269
- progress (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
270
-
- hashAlg || hash (string): multihash hashing algorithm to use
270
+
- hashAlg || hash (string): multihash hashing algorithm to use. (default: `sha2-256`) [The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
271
271
- wrapWithDirectory (boolean): adds a wrapping node around the content
272
272
- pin (boolean, default true): pin this object when adding.
273
273
@@ -618,7 +618,7 @@ Where:
618
618
-`options` is an optional Object that might contain the following keys:
619
619
-`parents` is a Boolean value to decide whether or not to make the parent directories if they don't exist (default: false)
620
620
-`format` is what type of nodes to write any newly created directories as (default: `dag-pb`)
621
-
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories (default: `sha2-256`)
621
+
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories. (default: `sha2-256`) [The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
622
622
-`flush` is a Boolean value to decide whether or not to immediately flush MFS changes to disk (default: true)
623
623
-`callback` is an optional function with the signature `function (error) {}`, where `error` may be an Error that occured if the operation was not successful
624
624
@@ -671,7 +671,7 @@ Where:
671
671
-`options` is an optional Object that might contain the following keys:
672
672
-`parents` is a Boolean value to decide whether or not to make the parent directories if they don't exist (default: false)
673
673
-`format` is what type of nodes to write any newly created directories as (default: `dag-pb`)
674
-
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories (default: `sha2-256`)
674
+
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories (default: `sha2-256`)[The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
675
675
-`flush` is a Boolean value to decide whether or not to immediately flush MFS changes to disk (default: true)
676
676
-`callback` is an optional function with the signature `function (error) {}`, where `error` may be an Error that occured if the operation was not successful
677
677
@@ -911,7 +911,7 @@ Where:
911
911
-`options` is an optional Object that might contain the following keys:
912
912
-`parents` is a Boolean value to decide whether or not to make the parent directories if they don't exist (default: false)
913
913
-`format` is what type of nodes to write any newly created directories as (default: `dag-pb`)
914
-
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories (default: `sha2-256`)
914
+
-`hashAlg` is which algorithm to use when creating CIDs for newly created directories (default: `sha2-256`)[The list of all possible values](https://github.com/multiformats/js-multihash/blob/master/src/constants.js#L5-L343)
915
915
-`flush` is a Boolean value to decide whether or not to immediately flush MFS changes to disk (default: true)
916
916
-`callback` is an optional function with the signature `function (error) {}`, where `error` may be an Error that occured if the operation was not successful
0 commit comments