From b5580f3b8f68cfca136fea335abf439edc4aea23 Mon Sep 17 00:00:00 2001
From: mlegner Show me
browser through the Walrus Site portal https://walrus.site. While the portal's operation is
explained in a later section, consider for now that there can be many portals (hosted
by whoever wants to have their own, and even on localhost
). Further, the only function of the
-portal is to provide the browser with some code (specifically, a service worker) that allows it to
-fetch the Walrus Site from Sui and Walrus.
If you have a Sui wallet with some Testnet SUI, you can try and "mint a new Flatlander" from the site. This creates an NFT from the collection and shows you two links: one to the explorer, and one to the "Flatlander site". This latter site is a special Walrus Site that exists only for that NFT, @@ -2645,7 +2645,7 @@
For simplicity, we will start by publishing the most frugal of the sites, the walrus-snake
game.
First, clone the repository of examples:
+First, clone the repository of the examples:
git clone https://github.com/MystenLabs/example-walrus-sites.git && cd walrus-snake/
We now describe the resolution process of a Walrus Site in the browser using the service-worker portal as an example.
@@ -3203,6 +3204,21 @@The server-side portal works similarly, but the resolution is performed by the server. Meaning that +the server will resolve the SuiNS name, fetch the dynamic fields, and return the resources to the +browser, without anything else happening on the user's side. So the steps 2-6 are no longer +relevant, and 7-10 are performed by the server. The resulting resources are transmitted to the +browser in a standard HTTP response.
+To facilitate the creation of Walrus Sites, we provide the "site builder" tool. The site builder takes care of creating Walrus Sites object on Sui, with the correct structure, and stores the site @@ -3307,7 +3323,7 @@
Here, the portal provider is only trusted to provide the correct service worker code to the user. The user's browser will then perform the fetching and authentication. The guarantees are therefore -the same as with the remote server-site portal, with the addition that the user can inspect the code +the same as with the remote server-side portal, with the addition that the user can inspect the code returned by the portal provider and verify its integrity (e.g., by comparing it the hash of the service worker code to one that is known to be correct).
Walrus Sites leverage service workers in the clients' browsers to perform essential operations:
+The following limitations only apply to portals based on service workers.
+If you need to support any of the features listed below, you should use a server-side portal.
+Service-worker portals leverage service workers in the clients' browsers to perform essential +operations:
Therefore, a site deployed on Walrus Sites cannot use service workers itself. Installing a service -worker from within a Walrus Site will result in a dysfunctional site and a poor experience for the -user.
-Therefore, a site accessed by a service-worker portal cannot use service workers itself. i.e. +you can't "stack" service workers! Installing a service worker from within a Walrus Site will +result in a dysfunctional site and a poor experience for the user.
+This limitation only applies to portal based on service workers. A web portal will not -have this limitation.
+This limitation only applies to portal based on service workers. If you need to access sites +that support this feature, you should use a server-side portal.
Service workers cannot be loaded inside an in-app browser on iOS, because of a limitation of the -WebKit engine. As a consequence, Walrus Sites cannot be used within Sui-compatible wallet apps on -iOS. Therefore, Sui wallets cannot currently be used on a service-worker portal on iOS. Note, -however, that browsing a Walrus Site is still possible on iOS through any browser.
-To provide a seamless experience for iOS users (and other users on browsers that do not support
-service workers), we implemented a redirect to a server-side portal (https://blob.store). Whenever
-a user on an iOS wallet browses a Walrus Site, the redirect will automatically take them to the
-<site_name>.blob.store
server-side portal. This way, the user can still use the wallet.
Given that you decided to use a service-worker portal as your main point of access to your sites,
+to provide a seamless experience for iOS users (and other users on browsers that do not support
+service workers), it is recommended to redirect to a server-side portal (https://walrus.site).
+Whenever a user on an iOS wallet browses a Walrus Site, the redirect will automatically take them
+to the <site_name>.walrus.site
server-side portal. This way, the user can still use the wallet.
This limitation only applies to portals based on service workers. A web portal will not -have this limitation.
+This limitation only applies to portal based on service workers. If you need to access sites +that support this feature, you should use a server-side portal.
With the current design, Walrus Sites cannot be used for progressive web apps (PWAs).
+With the current design, service-worker portals cannot be used to access progressive web apps +(PWAs).
Two characteristics of the service-worker portal prevent support for PWAs:
Here, the portal provider is only trusted to provide the correct service worker code to the user. The user's browser will then perform the fetching and authentication. The guarantees are therefore -the same as with the remote server-site portal, with the addition that the user can inspect the code +the same as with the remote server-side portal, with the addition that the user can inspect the code returned by the portal provider and verify its integrity (e.g., by comparing it the hash of the service worker code to one that is known to be correct).
localhost
). Further, the only function of the
-portal is to provide the browser with some code (specifically, a service worker) that allows it to
-fetch the Walrus Site from Sui and Walrus.
+portal is to retrieve the metadata (from Sui) and the resource files (from Walrus) that constitute
+the site.
If you have a Sui wallet with some Testnet SUI, you can try and "mint a new Flatlander" from the site. This creates an NFT from the collection and shows you two links: one to the explorer, and one to the "Flatlander site". This latter site is a special Walrus Site that exists only for that NFT, diff --git a/pr-preview/pr-202/walrus-sites/overview.html b/pr-preview/pr-202/walrus-sites/overview.html index 47aa918..86e5daa 100644 --- a/pr-preview/pr-202/walrus-sites/overview.html +++ b/pr-preview/pr-202/walrus-sites/overview.html @@ -303,9 +303,10 @@
We now describe the resolution process of a Walrus Site in the browser using the service-worker portal as an example.
@@ -334,6 +335,21 @@The server-side portal works similarly, but the resolution is performed by the server. Meaning that +the server will resolve the SuiNS name, fetch the dynamic fields, and return the resources to the +browser, without anything else happening on the user's side. So the steps 2-6 are no longer +relevant, and 7-10 are performed by the server. The resulting resources are transmitted to the +browser in a standard HTTP response.
+To facilitate the creation of Walrus Sites, we provide the "site builder" tool. The site builder takes care of creating Walrus Sites object on Sui, with the correct structure, and stores the site diff --git a/pr-preview/pr-202/walrus-sites/restrictions.html b/pr-preview/pr-202/walrus-sites/restrictions.html index f78bb36..0122ea1 100644 --- a/pr-preview/pr-202/walrus-sites/restrictions.html +++ b/pr-preview/pr-202/walrus-sites/restrictions.html @@ -243,51 +243,68 @@
Walrus Sites leverage service workers in the clients' browsers to perform essential operations:
+The following limitations only apply to portals based on service workers.
+If you need to support any of the features listed below, you should use a server-side portal.
+Service-worker portals leverage service workers in the clients' browsers to perform essential +operations:
Therefore, a site deployed on Walrus Sites cannot use service workers itself. Installing a service -worker from within a Walrus Site will result in a dysfunctional site and a poor experience for the -user.
-Therefore, a site accessed by a service-worker portal cannot use service workers itself. i.e. +you can't "stack" service workers! Installing a service worker from within a Walrus Site will +result in a dysfunctional site and a poor experience for the user.
+This limitation only applies to portal based on service workers. A web portal will not -have this limitation.
+This limitation only applies to portal based on service workers. If you need to access sites +that support this feature, you should use a server-side portal.
Service workers cannot be loaded inside an in-app browser on iOS, because of a limitation of the -WebKit engine. As a consequence, Walrus Sites cannot be used within Sui-compatible wallet apps on -iOS. Therefore, Sui wallets cannot currently be used on a service-worker portal on iOS. Note, -however, that browsing a Walrus Site is still possible on iOS through any browser.
-To provide a seamless experience for iOS users (and other users on browsers that do not support
-service workers), we implemented a redirect to a server-side portal (https://blob.store). Whenever
-a user on an iOS wallet browses a Walrus Site, the redirect will automatically take them to the
-<site_name>.blob.store
server-side portal. This way, the user can still use the wallet.
Given that you decided to use a service-worker portal as your main point of access to your sites,
+to provide a seamless experience for iOS users (and other users on browsers that do not support
+service workers), it is recommended to redirect to a server-side portal (https://walrus.site).
+Whenever a user on an iOS wallet browses a Walrus Site, the redirect will automatically take them
+to the <site_name>.walrus.site
server-side portal. This way, the user can still use the wallet.
This limitation only applies to portals based on service workers. A web portal will not -have this limitation.
+This limitation only applies to portal based on service workers. If you need to access sites +that support this feature, you should use a server-side portal.
With the current design, Walrus Sites cannot be used for progressive web apps (PWAs).
+With the current design, service-worker portals cannot be used to access progressive web apps +(PWAs).
Two characteristics of the service-worker portal prevent support for PWAs:
For simplicity, we will start by publishing the most frugal of the sites, the walrus-snake
game.
First, clone the repository of examples:
+First, clone the repository of the examples:
git clone https://github.com/MystenLabs/example-walrus-sites.git && cd walrus-snake/