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

docs: add pin option to dag.put #556

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions SPEC/DAG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ Although not listed in the documentation, all the following APIs that actually r

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

**Returns**

Expand Down