The asset canister hosts static files (HTML, CSS, JS, images) directly on the Internet Computer. This is how web frontends are deployed on-chain. Responses are certified by the subnet, and HTTP gateways automatically verify integrity, i.e. that content was served by the blockchain. The content can also be verified in the browser -- not a centralized server.
Asset canisters are created per-project. There is no single global canister ID. After deployment, your canister ID is stored in .icp/data/mappings/ (per environment).
| Local | http:// .localhost:8000 | | Mainnet | https:// .ic0.app or https:// .icp0.io | | Custom domain | https://yourdomain.com (with DNS configuration) |
Implementar activos frontend en el IC. Cubre activos certificados, enrutamiento SPA con .ic-assets.json5, dominios personalizados, codificación de contenido y cargas programáticas. Úselo cuando aloje una interfaz, implemente archivos estáticos, configure dominios personalizados o configure el enrutamiento SPA en IC. NO lo use para patrones de código a nivel de recipiente. Fuente: dfinity/icskills.