Description
Simple CLI tool for importing and exporting data from a Candid Spaces canister.
The Rust crate may provide almost enough.
But, we need to "re-encode" and "re-decode" the Candid data as a Candid AST, as the API accepts and emits these ASTs, as to be generic and multi-purpose.
That is to say,
-
for importing into the canister with the tool (from a local machine), we want to read ordinary Candid data as human readable text or in serialized binary form, and then represent and import this data as Candid value AST, sent to the canister (see
put
). -
for exporting, we want to reverse the process, converting a Candid value AST into either ordinary text or serialized binary form (see
getFullImage
andgetSubImage
, which respond with the same data types accepted byput
).
Perhaps this is best done as a feature added to either the Candid tools, or ic-repl
, since those are the tools that already exist?
Thoughts @chenyan-dfinity?