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 Feb 12, 2024. It is now read-only.
Co-authored-by: Marcin Rataj <[email protected]>
Co-authored-by: achingbrain <[email protected]>
BREAKING CHANGE: `ipfs.dag.put` no longer accepts a `format` arg, it is now `storeCodec` and `inputCodec`. `'json'` has become `'dag-json'`, `'cbor'` has become `'dag-cbor'` and so on
Copy file name to clipboardExpand all lines: docs/core-api/DAG.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -88,12 +88,13 @@ An optional object which may have the following keys:
88
88
89
89
| Name | Type | Default | Description |
90
90
| ---- | ---- | ------- | ----------- |
91
-
| format |`String`|`'dag-cbor'`| The IPLD format multicodec |
91
+
| storeCodec |`String`|`'dag-cbor'`| The codec that the stored object will be encoded with |
92
+
| inputCodec |`String`|`undefined`| If an already encoded object is provided (as a `Uint8Array`), the codec that the object is encoded with, otherwise it is assumed the `dagNode` argument is an object to be encoded |
92
93
| hashAlg |`String`|`'sha2-256'`| The hash algorithm to be used over the serialized DAG node |
93
94
| cid |[CID][]|`'dag-cbor'`| The IPLD format multicodec |
94
95
| pin |`boolean`|`false`| Pin this node when adding to the blockstore |
95
96
| timeout |`Number`|`undefined`| A timeout in ms |
96
-
| signal |[AbortSignal][]|`undefined`|Can be used to cancel any long running requests started as a result of this call |
97
+
| signal |[AbortSignal][]|`undefined`| Can be used to cancel any long running requests started as a result of this call |
97
98
98
99
**Note**: You should pass `cid` or the `format` & `hashAlg` pair but _not both_.
99
100
@@ -107,7 +108,7 @@ An optional object which may have the following keys:
0 commit comments