Skip to content

Commit

Permalink
docs: add pin option to dag.put (ipfs#556)
Browse files Browse the repository at this point in the history
Was added in ipfs#2521 but not updated here.
  • Loading branch information
Alan Shaw authored Nov 18, 2019
1 parent 1ac0722 commit 5d81341
Showing 1 changed file with 4 additions and 9 deletions.
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

0 comments on commit 5d81341

Please sign in to comment.