candid-kt
candid-kt copied to clipboard
Add retrieveAssets function
The retrieveAsset
function is a special function that has the next signature
suspend fun __retrieveAsset(path: String): ByteArray
It is needed to enable a client code to fetch some static resources from a canister (e.g. images, fonts...)
It is done via requesting a canister with a built-in method __dfx_asset_path(path)
(every canister has this function by default).
You can find example implementation inside js-user-library/http_agent.js
.