diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 63c9405..36df9cb 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -22,5 +22,5 @@ jobs:
uses: fission-suite/publish-action@v1
with:
machine_key: ${{ secrets.FISSION_MACHINE_KEY }}
- app_url: webnative-template.fission.app
+ app_url: odd-template.fission.app
build_dir: ./build
diff --git a/README.md b/README.md
index b39802c..b64e192 100644
--- a/README.md
+++ b/README.md
@@ -1,32 +1,32 @@
-# Webnative App Template
+# ODD App Template
-[](https://fission.codes) [](https://github.com/fission-suite/webnative) [](https://discord.gg/zAQBDEq) [](https://talk.fission.codes)
+[](https://fission.codes) [](https://github.com/oddsdk/ts-odd) [](https://discord.gg/zAQBDEq) [](https://talk.fission.codes)
-
+
-The Webnative App Template is a clone-and-go template for building a web application using Webnative, fast. Clone, customize, and deploy to have a running distributed app in mere minutes.
+The ODD App Template is a clone-and-go template for building a web application using the ODD SDK, fast. Clone, customize, and deploy to have a running distributed app in mere minutes.
-
❗️Webnative is alpha software.
-
We recommend you do not develop production applications using the Webnative App Template at this time. We're working on making it reliable, fast, and awesome, but we're not there yet!
+
The ODD SDK is alpha software.
+
We recommend you do not develop production applications using the ODD App Template at this time. We're working on making it reliable, fast, and awesome, but we're not there yet!
-## 🤔 What's Webnative?
+## 🤔 What's The ODD SDK?
-[The Webnative SDK](https://github.com/fission-codes/webnative) empowers developers to build fully distributed web applications without needing a complex back-end. The SDK provides:
+[The ODD SDK](https://github.com/oddsdk/ts-odd) empowers developers to build fully distributed web applications without needing a complex back-end. The SDK provides:
- user accounts (via [the browser's Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)),
- authorization (using [UCAN](https://ucan.xyz))
-- encrypted file storage (via the [Webnative File System](https://guide.fission.codes/developers/webnative/file-system-wnfs), backed by the [InterPlanetary File System](https://ipfs.io/), or IPFS)
+- encrypted file storage (via the [ODD File System](https://guide.fission.codes/developers/odd/file-system-wnfs), backed by the [InterPlanetary File System](https://ipfs.io/), or IPFS)
- and key management (via websockets and a two-factor auth-like flow).
-Webnative applications work offline and store data encrypted for the user by leveraging the power of the web platform. You can read more about Webnative in Fission's [Webnative Guide](https://guide.fission.codes/developers/webnative).
+ODD applications work offline and store data encrypted for the user by leveraging the power of the web platform. You can read more about the ODD SDK in Fission's [ODD SDK Guide](https://guide.fission.codes/developers/odd).
## 📦 What does this template give me?
### 🥰 Silky-smooth end-user flows
-The Webnative App Template provides a _silky-smooth user experience_ out of the box. Creating an account and linking a second device feels familiar, comfortable, and obvious. Webnative authentication is key-based rather than password-based, so we've focused heavily on the authentication flows, borrowing language and screens from two-factor auth flows.
+The ODD App Template provides a _silky-smooth user experience_ out of the box. Creating an account and linking a second device feels familiar, comfortable, and obvious. ODD SDK authentication is key-based rather than password-based, so we've focused heavily on the authentication flows, borrowing language and screens from two-factor auth flows.
### 🧱 Built with a modern web stack
@@ -37,15 +37,15 @@ The app template is built with modern web technologies:
- [Tailwind](https://tailwindcss.com/)
- [DaisyUI](https://daisyui.com/)
-### 👩🏫 A simple Webnative demo to learn from
+### 👩🏫 A simple ODD demo to learn from

-The app template includes a functioning application: an image gallery. Check out the image gallery code to learn how a Webnative application handles things like file uploads, directories, etc.
+The app template includes a functioning application: an image gallery. Check out the image gallery code to learn how an ODD application handles things like file uploads, directories, etc.
## 🚀 Getting Started
-You can try out the template yourself [here](https://webnative-template.fission.app/).
+You can try out the template yourself [here](https://odd-template.fission.app/).
Ready? Let's go.
@@ -54,7 +54,7 @@ Prerequiste: ensure you are running Node 16.14 or greater, but _not_ Node 17 (18
1. Clone the repository:
```shell
- git clone git@github.com:webnative-examples/webnative-app-template.git
+ git clone git@github.com:oddsdk/odd-app-template.git
```
2. Install the dependencies.
@@ -81,7 +81,7 @@ The app template is designed to be easy for you to _make it your own._ Here's ho
- Change `appName` to the name of your app.
- Change `appDescription` to a simple, 1-sentence description of your app.
- - Update `webnativeNamespace` with your project details.
+ - Update `oddNamespace` with your project details.
- Once you [deploy](#deploy) your app, change `appURL` to the production URL.
In `package.json`, change `name` to your application's name.
@@ -111,19 +111,19 @@ The app template is designed to be easy for you to _make it your own._ Here's ho
👏 You're ready to start adding custom functionality! 🚀
-Check out the [Webnative Guide](https://guide.fission.codes/developers/webnative) for Webnative questions or [UCAN.xyz](https://ucan.xyz) for UCAN questions.
+Check out the [ODD SDK Guide](https://guide.fission.codes/developers/odd) for ODD SDK questions or [UCAN.xyz](https://ucan.xyz) for UCAN questions.
## 📛 Usernames
-When you go through the registration flow in WAT, the username you type in the form field has a `#{DID}` appended to it in the background. We did this to enable discord style usernames where users can share the same usernames, but have unique identifiers attached to the end to distinguish them from one another. We then create a hash of the `fullUsername`(the one with the `#{DID}` appended to the end) that is passed to Webnative. So Webnative only has a notion of the `hashed` username currently. This should also allow users to create usernames using emojis or non-English characters. Also, this is the only username schema that currently supports our File System recovery flow.
+When you go through the registration flow in WAT, the username you type in the form field has a `#{DID}` appended to it in the background. We did this to enable discord style usernames where users can share the same usernames, but have unique identifiers attached to the end to distinguish them from one another. We then create a hash of the `fullUsername`(the one with the `#{DID}` appended to the end) that is passed to the ODD SDK. So the ODD SDK only has a notion of the `hashed` username currently. This should also allow users to create usernames using emojis or non-English characters. Also, this is the only username schema that currently supports our File System recovery flow.
-You don’t necessarily need to follow that same pattern though. If you were to register two of the same usernames in the app without hashing them, you would be able to call `session.authStrategy.isUsernameAvailable(username)` to ensure duplicate usernames aren't present in the app. We will be working on porting some of this functionality over to the Webnative library over the next while and we will be updating the docs to reflect that.
+You don’t necessarily need to follow that same pattern though. If you were to register two of the same usernames in the app without hashing them, you would be able to call `session.authStrategy.isUsernameAvailable(username)` to ensure duplicate usernames aren't present in the app. We will be working on porting some of this functionality over to the `ts-ODD` library over the next while and we will be updating the docs to reflect that.
-[Please take a look at our init function](https://github.com/webnative-examples/webnative-app-template/blob/main/src/lib/init.ts#L34-L38) to see how we are currently constructing the username schema.
+[Please take a look at our init function](https://github.com/oddsdk/odd-app-template/blob/main/src/lib/init.ts#L34-L38) to see how we are currently constructing the username schema.
## 🧨 Deploy
-Any static hosting platform should be supported. The Webnative App Template is currently deployed on:
+Any static hosting platform should be supported. The ODD App Template is currently deployed on:
- [Fission](#fission-app-hosting)
- [Netlify](#netlify)
@@ -132,9 +132,9 @@ Any static hosting platform should be supported. The Webnative App Template is c
### Fission App Hosting
-Try out [Webnative App Template on Fission](https://webnative-template.fission.app)
+Try out [ODD App Template on Fission](https://odd-template.fission.app)
-A Webnative application can be published to IPFS with the [Fission CLI](https://guide.fission.codes/developers/cli) or the [Fission GitHub publish action](https://github.com/fission-suite/publish-action).
+An ODD application can be published to IPFS with the [Fission CLI](https://guide.fission.codes/developers/cli) or the [Fission GitHub publish action](https://github.com/fission-suite/publish-action).
**To publish with the Fission CLI:**
@@ -158,9 +158,9 @@ See the [Fission Guide](https://guide.fission.codes/developers/installation) and
### Netlify
-[](https://app.netlify.com/sites/webnative/deploys)
+[](https://app.netlify.com/sites/odd/deploys)
-In order to deploy your Webnative application on Netlify:
+In order to deploy your ODD application on Netlify:
1. Create a new Netlify site and connect your app's git repository. (If you don't have your application stored in a git repository, you can upload the output of a [static build](#static-build).)
2. Just click Deploy. Netlify takes care of the rest. No Netlify-specific configuration is needed.
@@ -168,9 +168,9 @@ In order to deploy your Webnative application on Netlify:
### Vercel
-Try out the [Webnative App Template on Vercel](https://webnative-app-template.vercel.app/).
+Try out the [ODD App Template on Vercel](https://odd-app-template.vercel.app/).
-In order to deploy your Webnative application on Vercel:
+In order to deploy your ODD application on Vercel:
1. Create a new Vercel project and connect your app's git repository. (If you don't have your application stored in a git repository, you can upload the output of a [static build](#static-build).)
2. Override the default output directory and set it to `build`.
@@ -178,9 +178,9 @@ In order to deploy your Webnative application on Vercel:
### Cloudflare Pages
-Try out the [Webnative App Template on Cloudflare Pages](https://webnative-template.pages.dev/).
+Try out the [ODD App Template on Cloudflare Pages](https://odd-template.pages.dev/).
-In order to deploy your Webnative application on Cloudflare Pages:
+In order to deploy your ODD application on Cloudflare Pages:
1. Create a new Pages project and connect your app's git repository. (If you don't have your application stored in a git repository, you can upload the output of a [static build](#static-build).)
2. Select `SvelteKit` from the "Framework preset".
diff --git a/fission.yaml b/fission.yaml
index 270f717..914f8bd 100644
--- a/fission.yaml
+++ b/fission.yaml
@@ -1,3 +1,3 @@
ignore: []
-url: webnative-template.fission.app
-build: ./build
\ No newline at end of file
+url: odd-template.fission.app
+build: ./build
diff --git a/package-lock.json b/package-lock.json
index 0a613ba..efec6fc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,17 +1,17 @@
{
- "name": "webnative-app-template",
+ "name": "odd-app-template",
"version": "0.1.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "name": "webnative-app-template",
+ "name": "odd-app-template",
"version": "0.1.0",
"dependencies": {
+ "@oddjs/odd": "0.37.0",
"clipboard-copy": "^4.0.1",
"qrcode-svg": "^1.1.0",
- "uint8arrays": "^4.0.2",
- "webnative": "^0.36.3"
+ "uint8arrays": "^4.0.2"
},
"devDependencies": {
"@playwright/test": "^1.29.2",
@@ -850,6 +850,59 @@
"node": ">= 8"
}
},
+ "node_modules/@oddjs/odd": {
+ "version": "0.37.0",
+ "resolved": "https://registry.npmjs.org/@oddjs/odd/-/odd-0.37.0.tgz",
+ "integrity": "sha512-QvDIRGjm8UXjv6/GD/xw39rHmouaYefl8ipJ4En++SoCXHcfInq4ZbgE0APmlxjBSAksJX7JGipkkkpe9gCc8A==",
+ "dependencies": {
+ "@ipld/dag-cbor": "^8.0.0",
+ "@ipld/dag-pb": "^3.0.1",
+ "@libp2p/interface-keys": "^1.0.4",
+ "@libp2p/peer-id": "^1.1.17",
+ "@multiformats/multiaddr": "^11.1.0",
+ "blockstore-core": "^2.0.2",
+ "blockstore-datastore-adapter": "^4.0.0",
+ "datastore-core": "^8.0.2",
+ "datastore-level": "^9.0.4",
+ "events": "^3.3.0",
+ "fission-bloom-filters": "1.7.1",
+ "ipfs-core-types": "0.13.0",
+ "ipfs-repo": "^16.0.0",
+ "keystore-idb": "^0.15.5",
+ "localforage": "^1.10.0",
+ "multiformats": "^10.0.2",
+ "one-webcrypto": "^1.0.3",
+ "throttle-debounce": "^3.0.1",
+ "tweetnacl": "^1.0.3",
+ "uint8arrays": "^3.0.0",
+ "wnfs": "0.1.7"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@oddjs/odd/node_modules/multiformats": {
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz",
+ "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw==",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@oddjs/odd/node_modules/uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "dependencies": {
+ "multiformats": "^9.4.2"
+ }
+ },
+ "node_modules/@oddjs/odd/node_modules/uint8arrays/node_modules/multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="
+ },
"node_modules/@playwright/test": {
"version": "1.29.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.2.tgz",
@@ -6321,59 +6374,6 @@
}
}
},
- "node_modules/webnative": {
- "version": "0.36.3",
- "resolved": "https://registry.npmjs.org/webnative/-/webnative-0.36.3.tgz",
- "integrity": "sha512-MucN6ydnyY5E8GczuARAWXSOn3+yjXKSLNTIPeJhcFmZpxPBDRfpZ0SpKJjKWtVLNiEaUQibeiKsIYDfij/wIQ==",
- "dependencies": {
- "@ipld/dag-cbor": "^8.0.0",
- "@ipld/dag-pb": "^3.0.1",
- "@libp2p/interface-keys": "^1.0.4",
- "@libp2p/peer-id": "^1.1.17",
- "@multiformats/multiaddr": "^11.1.0",
- "blockstore-core": "^2.0.2",
- "blockstore-datastore-adapter": "^4.0.0",
- "datastore-core": "^8.0.2",
- "datastore-level": "^9.0.4",
- "events": "^3.3.0",
- "fission-bloom-filters": "1.7.1",
- "ipfs-core-types": "0.13.0",
- "ipfs-repo": "^16.0.0",
- "keystore-idb": "^0.15.5",
- "localforage": "^1.10.0",
- "multiformats": "^10.0.2",
- "one-webcrypto": "^1.0.3",
- "throttle-debounce": "^3.0.1",
- "tweetnacl": "^1.0.3",
- "uint8arrays": "^3.0.0",
- "wnfs": "0.1.7"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/webnative/node_modules/multiformats": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz",
- "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw==",
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=7.0.0"
- }
- },
- "node_modules/webnative/node_modules/uint8arrays": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
- "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
- "dependencies": {
- "multiformats": "^9.4.2"
- }
- },
- "node_modules/webnative/node_modules/uint8arrays/node_modules/multiformats": {
- "version": "9.9.0",
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
- "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="
- },
"node_modules/well-known-symbols": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
@@ -7165,6 +7165,56 @@
"fastq": "^1.6.0"
}
},
+ "@oddjs/odd": {
+ "version": "0.37.0",
+ "resolved": "https://registry.npmjs.org/@oddjs/odd/-/odd-0.37.0.tgz",
+ "integrity": "sha512-QvDIRGjm8UXjv6/GD/xw39rHmouaYefl8ipJ4En++SoCXHcfInq4ZbgE0APmlxjBSAksJX7JGipkkkpe9gCc8A==",
+ "requires": {
+ "@ipld/dag-cbor": "^8.0.0",
+ "@ipld/dag-pb": "^3.0.1",
+ "@libp2p/interface-keys": "^1.0.4",
+ "@libp2p/peer-id": "^1.1.17",
+ "@multiformats/multiaddr": "^11.1.0",
+ "blockstore-core": "^2.0.2",
+ "blockstore-datastore-adapter": "^4.0.0",
+ "datastore-core": "^8.0.2",
+ "datastore-level": "^9.0.4",
+ "events": "^3.3.0",
+ "fission-bloom-filters": "1.7.1",
+ "ipfs-core-types": "0.13.0",
+ "ipfs-repo": "^16.0.0",
+ "keystore-idb": "^0.15.5",
+ "localforage": "^1.10.0",
+ "multiformats": "^10.0.2",
+ "one-webcrypto": "^1.0.3",
+ "throttle-debounce": "^3.0.1",
+ "tweetnacl": "^1.0.3",
+ "uint8arrays": "^3.0.0",
+ "wnfs": "0.1.7"
+ },
+ "dependencies": {
+ "multiformats": {
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz",
+ "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw=="
+ },
+ "uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "requires": {
+ "multiformats": "^9.4.2"
+ },
+ "dependencies": {
+ "multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="
+ }
+ }
+ }
+ }
+ },
"@playwright/test": {
"version": "1.29.2",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.2.tgz",
@@ -10970,56 +11020,6 @@
"dev": true,
"requires": {}
},
- "webnative": {
- "version": "0.36.3",
- "resolved": "https://registry.npmjs.org/webnative/-/webnative-0.36.3.tgz",
- "integrity": "sha512-MucN6ydnyY5E8GczuARAWXSOn3+yjXKSLNTIPeJhcFmZpxPBDRfpZ0SpKJjKWtVLNiEaUQibeiKsIYDfij/wIQ==",
- "requires": {
- "@ipld/dag-cbor": "^8.0.0",
- "@ipld/dag-pb": "^3.0.1",
- "@libp2p/interface-keys": "^1.0.4",
- "@libp2p/peer-id": "^1.1.17",
- "@multiformats/multiaddr": "^11.1.0",
- "blockstore-core": "^2.0.2",
- "blockstore-datastore-adapter": "^4.0.0",
- "datastore-core": "^8.0.2",
- "datastore-level": "^9.0.4",
- "events": "^3.3.0",
- "fission-bloom-filters": "1.7.1",
- "ipfs-core-types": "0.13.0",
- "ipfs-repo": "^16.0.0",
- "keystore-idb": "^0.15.5",
- "localforage": "^1.10.0",
- "multiformats": "^10.0.2",
- "one-webcrypto": "^1.0.3",
- "throttle-debounce": "^3.0.1",
- "tweetnacl": "^1.0.3",
- "uint8arrays": "^3.0.0",
- "wnfs": "0.1.7"
- },
- "dependencies": {
- "multiformats": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz",
- "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw=="
- },
- "uint8arrays": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
- "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
- "requires": {
- "multiformats": "^9.4.2"
- },
- "dependencies": {
- "multiformats": {
- "version": "9.9.0",
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
- "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="
- }
- }
- }
- }
- },
"well-known-symbols": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
diff --git a/package.json b/package.json
index 4258c10..36f8dbf 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "webnative-app-template",
+ "name": "odd-app-template",
"version": "0.1.0",
"scripts": {
"dev": "vite dev",
@@ -59,7 +59,7 @@
"clipboard-copy": "^4.0.1",
"qrcode-svg": "^1.1.0",
"uint8arrays": "^4.0.2",
- "webnative": "^0.36.3"
+ "@oddjs/odd": "0.37.0"
},
"engines": {
"node": ">=16.14"
diff --git a/src/app.html b/src/app.html
index 719304e..b0fe298 100644
--- a/src/app.html
+++ b/src/app.html
@@ -6,7 +6,7 @@
-
+
diff --git a/src/components/Footer.svelte b/src/components/Footer.svelte
index 33e5b5c..8edeb56 100644
--- a/src/components/Footer.svelte
+++ b/src/components/Footer.svelte
@@ -16,15 +16,13 @@
? 'text-orange-500'
: 'text-transparent bg-clip-text bg-gradient-to-r from-orange-300 to-orange-600'}"
>
- *** Experimental *** - You are currently previewing Webnative SDK Alpha
- 0.2
+ *** Experimental *** - You are currently previewing ODD SDK Alpha 0.2
{:else}
- *** Experimental *** - You are currently previewing Webnative SDK Alpha
- 0.2
+ *** Experimental *** - You are currently previewing ODD SDK Alpha 0.2
{/if}
diff --git a/src/components/about/AboutThisTemplate.svelte b/src/components/about/AboutThisTemplate.svelte
index a216e6b..5f4c5cb 100644
--- a/src/components/about/AboutThisTemplate.svelte
+++ b/src/components/about/AboutThisTemplate.svelte
@@ -7,10 +7,10 @@
- Webnative SDK
+ ODD SDK
⎋
is a true local-first edge computing stack.
@@ -19,19 +19,19 @@
You can fork this
template
⎋
- to start writing your own Webnative app. Learn more in the
+ to start writing your own ODD app. Learn more in the
- Webnative Guide
+ ODD SDK Guide
⎋
.
diff --git a/src/components/auth/recover/HasRecoveryKit.svelte b/src/components/auth/recover/HasRecoveryKit.svelte
index 1aaf05f..674dca2 100644
--- a/src/components/auth/recover/HasRecoveryKit.svelte
+++ b/src/components/auth/recover/HasRecoveryKit.svelte
@@ -17,7 +17,7 @@
/**
* Parse the user's `username` and `readKey` from the uploaded recovery kit and pass them into
- * webnative to recover the user's account and populate the `session` and `filesystem` stores
+ * ODD to recover the user's account and populate the `session` and `filesystem` stores
* @param files
*/
export const handleFileInput: (
@@ -118,7 +118,7 @@
{#if state !== RECOVERY_STATES.Done}
- {`It should be a file named Webnative-RecoveryKit-{yourUsername}.txt`}
+ {`It should be a file named ODD-RecoveryKit-{yourUsername}.txt`}
{/if}
diff --git a/src/components/auth/register/Register.svelte b/src/components/auth/register/Register.svelte
index 6e9fec8..1c58c9f 100644
--- a/src/components/auth/register/Register.svelte
+++ b/src/components/auth/register/Register.svelte
@@ -130,8 +130,9 @@
class="label mt-4 !p-0 hidden peer-checked:block"
>
- In order to ensure the security of your private data, Webnative does
- not recommend creating an account from a public or shared computer.
+ In order to ensure the security of your private data, the ODD SDK
+ does not recommend creating an account from a public or shared
+ computer.
diff --git a/src/components/home/Authed.svelte b/src/components/home/Authed.svelte
index 56ae0e4..197e6f3 100644
--- a/src/components/home/Authed.svelte
+++ b/src/components/home/Authed.svelte
@@ -10,7 +10,7 @@
Photo Gallery Demo
- Webnative makes it easy to implement private, encrypted, user-owned
+ The ODD SDK makes it easy to implement private, encrypted, user-owned
storage in your app. See it in action with our photo gallery demo.
Try the Photo Gallery Demo
@@ -19,8 +19,8 @@
Device Connection Demo
- With Webnative SDK, a user’s account lives only on their connected devices
- — entirely under their control. It’s easy for them to connect as many
+ With the ODD SDK, a user’s account lives only on their connected devices —
+ entirely under their control. It’s easy for them to connect as many
devices as they’d like. For recoverability, we recommend they always
connect at least two.
diff --git a/src/components/home/Public.svelte b/src/components/home/Public.svelte
index 4ab7544..9535e3f 100644
--- a/src/components/home/Public.svelte
+++ b/src/components/home/Public.svelte
@@ -12,8 +12,8 @@
- Webnative SDK is a true local-first edge computing stack. Effortlessly
- give your users:
+ The ODD SDK is a true local-first edge computing stack. Effortlessly give
+ your users:
@@ -38,9 +38,9 @@
Unsupported device
- It appears this device isn’t supported. Webnative requires IndexedDB
- in order to function. This browser doesn’t appear to implement this
- API. Are you in a Firefox private window?
+ It appears this device isn’t supported. ODD requires IndexedDB in
+ order to function. This browser doesn’t appear to implement this API.
+ Are you in a Firefox private window?
{:else}
diff --git a/src/components/settings/RecoveryKitModal.svelte b/src/components/settings/RecoveryKitModal.svelte
index 3300ce5..f03e524 100644
--- a/src/components/settings/RecoveryKitModal.svelte
+++ b/src/components/settings/RecoveryKitModal.svelte
@@ -26,7 +26,7 @@
$: if (downloadLinkRef && fileURL) {
downloadLinkRef.setAttribute(
'download',
- `Webnative-RecoveryKit-${$sessionStore.username.trimmed}.txt`
+ `ODD-RecoveryKit-${$sessionStore.username.trimmed}.txt`
)
downloadLinkRef.href = fileURL
diff --git a/src/lib/account-settings.ts b/src/lib/account-settings.ts
index 22529d9..0aa7caa 100644
--- a/src/lib/account-settings.ts
+++ b/src/lib/account-settings.ts
@@ -1,10 +1,10 @@
import { get as getStore } from 'svelte/store'
-import * as wn from 'webnative'
-import { retrieve } from 'webnative/common/root-key'
+import * as odd from '@oddjs/odd'
+import { retrieve } from '@oddjs/odd/common/root-key'
import * as uint8arrays from 'uint8arrays'
import type { CID } from 'multiformats/cid'
-import type { PuttableUnixTree, File as WNFile } from 'webnative/fs/types'
-import type { Metadata } from 'webnative/fs/metadata'
+import type { PuttableUnixTree, File as WNFile } from '@oddjs/odd/fs/types'
+import type { Metadata } from '@oddjs/odd/fs/metadata'
import { accountSettingsStore, filesystemStore, sessionStore } from '$src/stores'
import { addNotification } from '$lib/notifications'
@@ -31,9 +31,9 @@ interface AvatarFile extends PuttableUnixTree, WNFile {
}
}
-export const ACCOUNT_SETTINGS_DIR = wn.path.directory('private', 'settings')
-const AVATAR_DIR = wn.path.combine(ACCOUNT_SETTINGS_DIR, wn.path.directory('avatars'))
-const AVATAR_ARCHIVE_DIR = wn.path.combine(AVATAR_DIR, wn.path.directory('archive'))
+export const ACCOUNT_SETTINGS_DIR = odd.path.directory('private', 'settings')
+const AVATAR_DIR = odd.path.combine(ACCOUNT_SETTINGS_DIR, odd.path.directory('avatars'))
+const AVATAR_ARCHIVE_DIR = odd.path.combine(AVATAR_DIR, odd.path.directory('archive'))
const AVATAR_FILE_NAME = 'avatar'
const FILE_SIZE_LIMIT = 20
@@ -59,8 +59,8 @@ const archiveOldAvatar = async (): Promise
=> {
}`
// Move old avatar to archive dir
- const fromPath = wn.path.combine(AVATAR_DIR, wn.path.file(oldAvatarFileName))
- const toPath = wn.path.combine(AVATAR_ARCHIVE_DIR, wn.path.file(archiveFileName))
+ const fromPath = odd.path.combine(AVATAR_DIR, odd.path.file(oldAvatarFileName))
+ const toPath = odd.path.combine(AVATAR_ARCHIVE_DIR, odd.path.file(archiveFileName))
await fs.mv(fromPath, toPath)
// Announce the changes to the server
@@ -102,7 +102,7 @@ export const getAvatarFromWNFS = async (): Promise => {
return
}
- const file = await fs.get(wn.path.combine(AVATAR_DIR, wn.path.file(`${avatarName}`)))
+ const file = await fs.get(odd.path.combine(AVATAR_DIR, odd.path.file(`${avatarName}`)))
// The CID for private files is currently located in `file.header.content`
const cid = (file as AvatarFile).header.content.toString()
@@ -167,7 +167,7 @@ export const uploadAvatarToWNFS = async (image: File): Promise => {
// Create a sub directory and add the avatar
await fs.write(
- wn.path.combine(AVATAR_DIR, wn.path.file(updatedImage.name)),
+ odd.path.combine(AVATAR_DIR, odd.path.file(updatedImage.name)),
await fileToUint8Array(updatedImage)
)
diff --git a/src/lib/app-info.ts b/src/lib/app-info.ts
index 0ce8611..63fe89d 100644
--- a/src/lib/app-info.ts
+++ b/src/lib/app-info.ts
@@ -1,6 +1,6 @@
-export const appName = 'Webnative SDK Demo'
-export const appDescription = 'This is another awesome Webnative app.'
-export const appURL = 'https://webnative.netlify.app'
+export const appName = 'ODD SDK Demo'
+export const appDescription = 'This is another awesome ODD app.'
+export const appURL = 'https://odd.netlify.app'
export const appImageURL = `${appURL}/preview.png`
export const ipfsGatewayUrl = 'runfission.com'
-export const webnativeNamespace = { creator: 'Fission', name: 'WAT' }
+export const oddNamespace = { creator: 'Fission', name: 'OAT' }
diff --git a/src/lib/auth/account.ts b/src/lib/auth/account.ts
index 2af1c84..ea681b6 100644
--- a/src/lib/auth/account.ts
+++ b/src/lib/auth/account.ts
@@ -1,8 +1,8 @@
import * as uint8arrays from 'uint8arrays'
-import { sha256 } from 'webnative/components/crypto/implementation/browser'
-import { publicKeyToDid } from 'webnative/did/transformers'
-import type { Crypto } from 'webnative'
-import type FileSystem from 'webnative/fs/index'
+import { sha256 } from '@oddjs/odd/components/crypto/implementation/browser'
+import { publicKeyToDid } from '@oddjs/odd/did/transformers'
+import type { Crypto } from '@oddjs/odd'
+import type FileSystem from '@oddjs/odd/fs/index'
import { get as getStore } from 'svelte/store'
import { asyncDebounce } from '$lib/utils'
diff --git a/src/lib/auth/backup.ts b/src/lib/auth/backup.ts
index 4cc70d3..7f4a729 100644
--- a/src/lib/auth/backup.ts
+++ b/src/lib/auth/backup.ts
@@ -1,16 +1,16 @@
-import * as webnative from 'webnative'
-import type FileSystem from 'webnative/fs/index'
+import * as odd from '@oddjs/odd'
+import type FileSystem from '@oddjs/odd/fs/index'
export type BackupStatus = { created: boolean } | null
export const setBackupStatus = async (fs: FileSystem, status: BackupStatus): Promise => {
- const backupStatusPath = webnative.path.file('private', 'backup-status.json')
+ const backupStatusPath = odd.path.file('private', 'backup-status.json')
await fs.write(backupStatusPath, new TextEncoder().encode(JSON.stringify(status)))
await fs.publish()
}
export const getBackupStatus = async (fs: FileSystem): Promise => {
- const backupStatusPath = webnative.path.file('private', 'backup-status.json')
+ const backupStatusPath = odd.path.file('private', 'backup-status.json')
if (await fs.exists(backupStatusPath)) {
const fileContent = await fs.read(backupStatusPath)
diff --git a/src/lib/auth/linking.ts b/src/lib/auth/linking.ts
index f7185d5..59703a3 100644
--- a/src/lib/auth/linking.ts
+++ b/src/lib/auth/linking.ts
@@ -1,4 +1,4 @@
-import type * as webnative from 'webnative'
+import type * as odd from '@oddjs/odd'
import { get as getStore } from 'svelte/store'
import { sessionStore } from '$src/stores'
@@ -6,7 +6,7 @@ import { sessionStore } from '$src/stores'
export const createAccountLinkingConsumer = async (
username: string
-): Promise => {
+): Promise => {
const session = getStore(sessionStore)
if (session.authStrategy) return session.authStrategy.accountConsumer(username)
@@ -22,7 +22,7 @@ export const createAccountLinkingConsumer = async (
export const createAccountLinkingProducer = async (
username: string
-): Promise => {
+): Promise => {
const session = getStore(sessionStore)
return session.authStrategy.accountProducer(username)
}
diff --git a/src/lib/init.ts b/src/lib/init.ts
index 4889e35..b81f1a4 100644
--- a/src/lib/init.ts
+++ b/src/lib/init.ts
@@ -1,17 +1,17 @@
-import * as webnative from 'webnative'
+import * as odd from '@oddjs/odd'
import { dev } from '$app/environment'
import { filesystemStore, sessionStore } from '../stores'
import { getBackupStatus, type BackupStatus } from '$lib/auth/backup'
import { USERNAME_STORAGE_KEY, createDID } from '$lib/auth/account'
-import { webnativeNamespace } from '$lib/app-info'
+import { oddNamespace } from '$lib/app-info'
export const initialize = async (): Promise => {
try {
let backupStatus: BackupStatus = null
- const program: webnative.Program = await webnative.program({
- namespace: webnativeNamespace,
+ const program: odd.Program = await odd.program({
+ namespace: oddNamespace,
debug: dev
})
@@ -21,7 +21,7 @@ export const initialize = async (): Promise => {
let fullUsername = await program.components.storage.getItem(USERNAME_STORAGE_KEY) as string
- // If the user is migrating from a version webnative-app-template before https://github.com/webnative-examples/webnative-app-template/pull/97/files#diff-a180510e798b8f833ebfdbe691c5ec4a1095076980d3e2388de29c849b2b8361R44,
+ // If the user is migrating from a version odd-app-template before https://github.com/oddsdk/odd-app-template/pull/97/files#diff-a180510e798b8f833ebfdbe691c5ec4a1095076980d3e2388de29c849b2b8361R44,
// their username won't contain a did, so we will need to manually append a DID and add it storage here
if (!fullUsername) {
const did = await createDID(program.components.crypto)
@@ -62,7 +62,7 @@ export const initialize = async (): Promise => {
console.error(error)
switch (error) {
- case webnative.ProgramError.InsecureContext:
+ case odd.ProgramError.InsecureContext:
sessionStore.update(session => ({
...session,
loading: false,
@@ -70,7 +70,7 @@ export const initialize = async (): Promise => {
}))
break
- case webnative.ProgramError.UnsupportedBrowser:
+ case odd.ProgramError.UnsupportedBrowser:
sessionStore.update(session => ({
...session,
loading: false,
diff --git a/src/lib/session.ts b/src/lib/session.ts
index 181734e..d6cb573 100644
--- a/src/lib/session.ts
+++ b/src/lib/session.ts
@@ -1,4 +1,4 @@
-import type * as webnative from 'webnative'
+import type * as odd from '@oddjs/odd'
import { appName } from '$lib/app-info'
@@ -10,9 +10,9 @@ type Username = {
export type Session = {
username: Username
- session: webnative.Session | null
- authStrategy: webnative.AuthenticationStrategy | null
- program: webnative.Program
+ session: odd.Session | null
+ authStrategy: odd.AuthenticationStrategy | null
+ program: odd.Program
loading: boolean
backupCreated: boolean
error?: SessionError
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
index 520a0b3..e407af2 100644
--- a/src/routes/+error.svelte
+++ b/src/routes/+error.svelte
@@ -27,7 +27,7 @@
Github
diff --git a/src/routes/gallery/components/imageGallery/ImageModal.svelte b/src/routes/gallery/components/imageGallery/ImageModal.svelte
index 658b085..7ca81b5 100644
--- a/src/routes/gallery/components/imageGallery/ImageModal.svelte
+++ b/src/routes/gallery/components/imageGallery/ImageModal.svelte
@@ -160,7 +160,7 @@
Interested in private file sharing as a feature? Follow the
github issue.
diff --git a/src/routes/gallery/lib/gallery.ts b/src/routes/gallery/lib/gallery.ts
index 7f8bbb8..77eeae4 100644
--- a/src/routes/gallery/lib/gallery.ts
+++ b/src/routes/gallery/lib/gallery.ts
@@ -1,8 +1,8 @@
import { get as getStore } from 'svelte/store'
-import * as wn from 'webnative'
-import type PublicFile from 'webnative/fs/v1/PublicFile'
-import type PrivateFile from 'webnative/fs/v1/PrivateFile'
-import { isFile } from 'webnative/fs/types/check'
+import * as odd from '@oddjs/odd'
+import type PublicFile from '@oddjs/odd/fs/v1/PublicFile'
+import type PrivateFile from '@oddjs/odd/fs/v1/PrivateFile'
+import { isFile } from '@oddjs/odd/fs/types/check'
import { filesystemStore } from '$src/stores'
import { AREAS, galleryStore } from '$routes/gallery/stores'
@@ -30,8 +30,8 @@ type Link = {
}
export const GALLERY_DIRS = {
- [ AREAS.PUBLIC ]: wn.path.directory('public', 'gallery'),
- [ AREAS.PRIVATE ]: wn.path.directory('private', 'gallery')
+ [ AREAS.PUBLIC ]: odd.path.directory('public', 'gallery'),
+ [ AREAS.PRIVATE ]: odd.path.directory('private', 'gallery')
}
const FILE_SIZE_LIMIT = 20
@@ -56,7 +56,7 @@ export const getImagesFromWNFS: () => Promise = async () => {
let images = await Promise.all(
Object.entries(links).map(async ([ name ]) => {
const file = await fs.get(
- wn.path.combine(GALLERY_DIRS[ selectedArea ], wn.path.file(`${name}`))
+ odd.path.combine(GALLERY_DIRS[ selectedArea ], odd.path.file(`${name}`))
)
if (!isFile(file)) return null
@@ -131,7 +131,7 @@ export const uploadImageToWNFS: (
// Reject the upload if the image already exists in the directory
const imageExists = await fs.exists(
- wn.path.combine(GALLERY_DIRS[ selectedArea ], wn.path.file(image.name))
+ odd.path.combine(GALLERY_DIRS[ selectedArea ], odd.path.file(image.name))
)
if (imageExists) {
throw new Error(`${image.name} image already exists`)
@@ -139,7 +139,7 @@ export const uploadImageToWNFS: (
// Create a sub directory and add some content
await fs.write(
- wn.path.combine(GALLERY_DIRS[ selectedArea ], wn.path.file(image.name)),
+ odd.path.combine(GALLERY_DIRS[ selectedArea ], odd.path.file(image.name)),
await fileToUint8Array(image)
)
@@ -165,12 +165,12 @@ export const deleteImageFromWNFS: (
const fs = getStore(filesystemStore)
const imageExists = await fs.exists(
- wn.path.combine(GALLERY_DIRS[ selectedArea ], wn.path.file(name))
+ odd.path.combine(GALLERY_DIRS[ selectedArea ], odd.path.file(name))
)
if (imageExists) {
// Remove images from server
- await fs.rm(wn.path.combine(GALLERY_DIRS[ selectedArea ], wn.path.file(name)))
+ await fs.rm(odd.path.combine(GALLERY_DIRS[ selectedArea ], odd.path.file(name)))
// Announce the changes to the server
await fs.publish()
diff --git a/src/routes/link-device/+page.svelte b/src/routes/link-device/+page.svelte
index bddd3d8..7228123 100644
--- a/src/routes/link-device/+page.svelte
+++ b/src/routes/link-device/+page.svelte
@@ -1,5 +1,5 @@