diff --git a/src/CoreApi/IDagApi.cs b/src/CoreApi/IDagApi.cs index 81d4a80..6620922 100644 --- a/src/CoreApi/IDagApi.cs +++ b/src/CoreApi/IDagApi.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; +using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -20,7 +21,7 @@ namespace Ipfs.CoreApi public interface IDagApi { /// - /// Put an IPLD node. + /// Put JSON data as an IPLD node. /// /// /// The JSON data to send to the network. @@ -50,6 +51,37 @@ Task PutAsync( bool pin = true, CancellationToken cancel = default(CancellationToken)); + /// + /// Put a stream JSON data as an IPLD node. + /// + /// + /// The stream of JSON. + /// + /// + /// The content type or format of the ; such as "raw" or "cbor". + /// See for more details. Defaults to "cbor". + /// + /// + /// The algorithm name used to produce the . + /// + /// + /// If true the is pinned to local storage and will not be + /// garbage collected. The default is true. + /// + /// + /// Is used to stop the task. When cancelled, the is raised. + /// + /// + /// A task that represents the asynchronous put operation. The task's value is + /// the data's . + /// + Task PutAsync( + Stream data, + string contentType = "cbor", + string multiHash = MultiHash.DefaultAlgorithmName, + bool pin = true, + CancellationToken cancel = default(CancellationToken)); + /// /// Get an IPLD node. ///