From c083e9b41f2ccfda8bac7307e911cd0a9a2e0a5c Mon Sep 17 00:00:00 2001 From: 3cL1p5e7 <3cL1p5e7@gmail.com> Date: Mon, 28 Feb 2022 11:47:08 +0300 Subject: [PATCH 1/2] update did for passing chunks tree and sha256 --- assets.did | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets.did b/assets.did index d11ecd9..4d61f35 100644 --- a/assets.did +++ b/assets.did @@ -59,6 +59,7 @@ type HttpResponse = record { type StreamingCallbackHttpResponse = record { body: blob; token: opt StreamingCallbackToken; + chunk_tree: opt text; }; type StreamingCallbackToken = record { @@ -110,7 +111,7 @@ service: { create_batch : (record {}) -> (record { batch_id: BatchId }); - create_chunk: (record { batch_id: BatchId; content: blob }) -> (record { chunk_id: ChunkId }); + create_chunk: (record { batch_id: BatchId; content: blob; sha256: opt blob }) -> (record { chunk_id: ChunkId }); // Perform all operations successfully, or reject commit_batch: (record { batch_id: BatchId; operations: vec BatchOperationKind }) -> (); @@ -134,7 +135,7 @@ service: { }) -> (); http_request: (request: HttpRequest) -> (HttpResponse) query; - http_request_streaming_callback: (token: StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query; + http_request_streaming_callback: (token: StreamingCallbackToken) -> (StreamingCallbackHttpResponse) query; authorize: (principal) -> (); } From 552518ecc31c34aa3a05c5642ff2aeedfabdbba5 Mon Sep 17 00:00:00 2001 From: 3cL1p5e7 <3cL1p5e7@gmail.com> Date: Fri, 11 Mar 2022 17:04:00 +0300 Subject: [PATCH 2/2] fix chunk_tree to opt blob --- assets.did | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets.did b/assets.did index 4d61f35..0f89ebd 100644 --- a/assets.did +++ b/assets.did @@ -59,7 +59,7 @@ type HttpResponse = record { type StreamingCallbackHttpResponse = record { body: blob; token: opt StreamingCallbackToken; - chunk_tree: opt text; + chunk_tree: opt blob; }; type StreamingCallbackToken = record {