Project Type: Cooperative - Multiple workers can submit work, and the bounty is shared
Time Commitment: Weeks
Experience Level: Intermediate
Size: USD 5’000 in ICP (at time of distribution)
For some time,
dfx has included an assets canister. This canister facilitates the storage and retrieval of static assets. It is automatically provisioned when the canister type in
dfx.json is designated as
Assets can be delivered via either
raw.icp0.io or the more secure
icp0.io, with the latter being the recommended best practice. Assets served through
icp0.io are expected to be certified, with the boundary nodes verifying that the replica replying to the
http_request hasn’t altered the output. This behaviour is specified in the HTTP Gateway Protocol.
Currently, only a Rust version of a certified assets canister exists. Although DFINITY’s asset canister was originally crafted in Motoko and there are additional Motoko versions available, these lack asset certification. Consequently, they can only be accessed via the less secure
raw.icp0.io. A primary reason for this limitation was the absence of adequate developer tools for the smooth implementation of certified assets in Motoko. However, with the introduction of ic-certification, the situation has evolved, equipping developers with the essential components to construct a certified assets canister using Motoko.
Leveraging the ic-certification, we’ve introduced the certified-cache library, simplifying the caching of certified API responses. Another noteworthy library, assets, equips canisters with the essential logic to manage assets in line with the asset canister interface utilised by both
@dfinity/assets. Integrating these functionalities, the server library offers a straightforward HTTP server for Motoko. Within its repository, the http-greet example nearly achieves a full-fledged assets canister implementation in Motoko. However, it misses several key features:
- Chunked uploads
- V2 certification
- Access control
- The implementation shall fully mirror the existing Rust certified assets canister functionality and interface (including v2 certification)
- The code shall be of production quality, have good documentation and reasonable test coverage.
- The code shall be open sourced with an MIT license.
Include links to previous relevant work.
Include a brief overview of how you will complete the task.
Post your application to this forum thread.
- motoko ic-certification
- http gateway specification
- asset canister interface
- motoko asset canister
- DFINITY motoko asset canister
- rust certified assets canister
- asset canister docs
- http asset certification wiki
- service worker
- boundary nodes wiki
- rust certified assets library
- motoko server
- motoko certified cache
- motoko assets
- v2 certification
- motoko certified HTTP