Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 5d81341

Browse files
author
Alan Shaw
authored
docs: add pin option to dag.put (#556)
Was added in ipfs/js-ipfs#2521 but not updated here.
1 parent 1ac0722 commit 5d81341

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

SPEC/DAG.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@ Although not listed in the documentation, all the following APIs that actually r
2121

2222
- `dagNode` - a DAG node that follows one of the supported IPLD formats.
2323
- `options` - a object that might contain the following values:
24-
- `format` - The IPLD format multicodec.
25-
- `hashAlg` - The hash algorithm to be used over the serialized dagNode.
26-
- or
27-
- `cid` - the CID of the node passed.
28-
- or
29-
- if no `options` are given, `ipfs.dag.put()` uses the following defaults:
30-
- `format: 'dag-cbor'`
31-
- `hashAlg: 'sha2-256'`
32-
- **Note** - You should only pass the CID or the format + hashAlg pair and not both
24+
- `format` - The IPLD format multicodec (default `dag-cbor`).
25+
- `hashAlg` - The hash algorithm to be used over the serialized DAG node (default `sha2-256`).
26+
- `cid` - The CID of the node passed. **Note**: You should pass the CID or the `format` + `hashAlg` pair but _not both_.
27+
- `pin` - Pin this node when adding (default `false`)
3328

3429
**Returns**
3530

0 commit comments

Comments
 (0)